mirror of
https://github.com/ckaczor/ProcessCpuUsageStatusWindow.git
synced 2026-01-14 01:25:41 -05:00
Add setting to show process ID
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
@@ -23,20 +24,34 @@
|
||||
Name="StartWithWindows"
|
||||
VerticalAlignment="Top"
|
||||
VerticalContentAlignment="Center"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.ColumnSpan="2" />
|
||||
<Label Grid.Column="0"
|
||||
<Label Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Content="{x:Static properties:Resources.NumberOfProcesses}"
|
||||
Margin="0,4,6,0"
|
||||
Padding="0"
|
||||
VerticalContentAlignment="Center" VerticalAlignment="Center" Target="{x:Reference NumberOfProcesses}" />
|
||||
Margin="0,4,6,4"
|
||||
Padding="0"
|
||||
VerticalContentAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Target="{x:Reference NumberOfProcesses}" />
|
||||
<xctk:IntegerUpDown Grid.Column="1"
|
||||
Grid.Row="1" x:Name="NumberOfProcesses"
|
||||
Minimum="1" Maximum="20"
|
||||
TextAlignment="Left" Margin="0,12,6,6"
|
||||
Grid.Row="1"
|
||||
x:Name="NumberOfProcesses"
|
||||
Minimum="1"
|
||||
Maximum="20"
|
||||
TextAlignment="Left"
|
||||
Margin="0,12,6,12"
|
||||
Width="50"
|
||||
VerticalContentAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
<CheckBox Content="{x:Static properties:Resources.ShowProcessId}"
|
||||
Name="ShowProcessId"
|
||||
VerticalAlignment="Top"
|
||||
VerticalContentAlignment="Center"
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Grid.ColumnSpan="2" />
|
||||
</Grid>
|
||||
</windows:CategoryPanel>
|
||||
</windows:CategoryPanel>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user