diff --git a/App.config b/App.config
index 6e50766..174f2fe 100644
--- a/App.config
+++ b/App.config
@@ -29,6 +29,9 @@
True
+
+ False
+
\ No newline at end of file
diff --git a/Options/GeneralOptionsPanel.xaml b/Options/GeneralOptionsPanel.xaml
index 886edcd..8c50e61 100644
--- a/Options/GeneralOptionsPanel.xaml
+++ b/Options/GeneralOptionsPanel.xaml
@@ -15,6 +15,7 @@
+
@@ -23,20 +24,34 @@
Name="StartWithWindows"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
+ Grid.Column="0"
+ Grid.Row="0"
Grid.ColumnSpan="2" />
-
+ Margin="0,4,6,4"
+ Padding="0"
+ VerticalContentAlignment="Center"
+ VerticalAlignment="Center"
+ Target="{x:Reference NumberOfProcesses}" />
+
-
+
\ No newline at end of file
diff --git a/Options/GeneralOptionsPanel.xaml.cs b/Options/GeneralOptionsPanel.xaml.cs
index 5aeea70..c013829 100644
--- a/Options/GeneralOptionsPanel.xaml.cs
+++ b/Options/GeneralOptionsPanel.xaml.cs
@@ -18,6 +18,7 @@ namespace ProcessCpuUsageStatusWindow.Options
StartWithWindows.IsChecked = settings.AutoStart;
NumberOfProcesses.Text = settings.ProcessCount.ToString();
+ ShowProcessId.IsChecked = settings.ShowProcessId;
}
public override bool ValidatePanel()
@@ -34,6 +35,9 @@ namespace ProcessCpuUsageStatusWindow.Options
settings.ProcessCount = int.Parse(NumberOfProcesses.Text);
+ if (ShowProcessId.IsChecked.HasValue && settings.ShowProcessId != ShowProcessId.IsChecked.Value)
+ settings.ShowProcessId = ShowProcessId.IsChecked.Value;
+
Application.Current.SetStartWithWindows(settings.AutoStart);
}
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 168e215..284df37 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -225,7 +225,7 @@ namespace ProcessCpuUsageStatusWindow.Properties {
}
///
- /// Looks up a localized string similar to CPU: {1,4:f1}% - {0} ({2}).
+ /// Looks up a localized string similar to CPU: {1,4:f1}% - {0}.
///
public static string ProcessLine {
get {
@@ -233,6 +233,15 @@ namespace ProcessCpuUsageStatusWindow.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to CPU: {1,4:f1}% - {0} ({2}).
+ ///
+ public static string ProcessLineWithProcessId {
+ get {
+ return ResourceManager.GetString("ProcessLineWithProcessId", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Restarting application....
///
@@ -242,6 +251,15 @@ namespace ProcessCpuUsageStatusWindow.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Show _process ID.
+ ///
+ public static string ShowProcessId {
+ get {
+ return ResourceManager.GetString("ShowProcessId", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to _Start when Windows starts.
///
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 985a0af..da9a6ce 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -173,7 +173,7 @@
Options
- CPU: {1,4:f1}% - {0} ({2})
+ CPU: {1,4:f1}% - {0}
_Start when Windows starts
@@ -184,4 +184,10 @@
Restarting application...
+
+ CPU: {1,4:f1}% - {0} ({2})
+
+
+ Show _process ID
+
\ No newline at end of file
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
index f0ed91a..ffe6c05 100644
--- a/Properties/Settings.Designer.cs
+++ b/Properties/Settings.Designer.cs
@@ -82,5 +82,17 @@ namespace ProcessCpuUsageStatusWindow.Properties {
this["FirstRun"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool ShowProcessId {
+ get {
+ return ((bool)(this["ShowProcessId"]));
+ }
+ set {
+ this["ShowProcessId"] = value;
+ }
+ }
}
}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
index 250074c..4fafc05 100644
--- a/Properties/Settings.settings
+++ b/Properties/Settings.settings
@@ -17,5 +17,8 @@
True
+
+ False
+
\ No newline at end of file
diff --git a/WindowSource.cs b/WindowSource.cs
index 95a6036..da17be7 100644
--- a/WindowSource.cs
+++ b/WindowSource.cs
@@ -155,7 +155,7 @@ namespace ProcessCpuUsageStatusWindow
var processId = colonPosition == -1 ? string.Empty : processCpuUsage.ProcessName.Substring(colonPosition + 1);
// Format the process information into a string to display
- stringBuilder.AppendFormat(Resources.ProcessLine, processName, processCpuUsage.PercentUsage, processId);
+ stringBuilder.AppendFormat(Settings.Default.ShowProcessId ? Resources.ProcessLineWithProcessId : Resources.ProcessLine, processName, processCpuUsage.PercentUsage, processId);
}
// Add the footer line (if any)