MainWindow.xaml (4792B)
1 <Window x:Class="BusynessNotification.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 5 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 6 xmlns:ui="http://schemas.modernwpf.com/2019" 7 ui:WindowHelper.UseModernWindowStyle="True" 8 xmlns:local="clr-namespace:BusynessNotification" 9 mc:Ignorable="d" 10 Title="SettingWindow" Height="450" Width="900"> 11 <Grid ShowGridLines="True"> 12 <Grid.RowDefinitions> 13 <RowDefinition/> 14 <RowDefinition/> 15 <RowDefinition/> 16 <RowDefinition/> 17 </Grid.RowDefinitions> 18 <Grid.ColumnDefinitions> 19 <ColumnDefinition/> 20 <ColumnDefinition/> 21 <ColumnDefinition/> 22 </Grid.ColumnDefinitions> 23 24 <CheckBox x:Name="CPUcheck" Content="CPU" HorizontalAlignment="Center" VerticalAlignment="Center" d:LayoutOverrides="LeftPosition, RightPosition"/> 25 <CheckBox x:Name="Memorycheck" Content="Memory" HorizontalAlignment="Center" Grid.Row="1" VerticalAlignment="Center"/> 26 <CheckBox x:Name="Diskcheck" Content="Disk" HorizontalAlignment="Center" Grid.Row="2" VerticalAlignment="Center" d:LayoutOverrides="LeftPosition, RightPosition"/> 27 <Button x:Name="SaveSettingButton" Content="Save" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Center" d:LayoutOverrides="Width" Click="SaveSettingButton_Click"/> 28 29 <Slider x:Name="CPUSlider" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" ValueChanged="CPUSlider_ValueChanged" Maximum="100" LargeChange="10" SmallChange="1"/> 30 <TextBox x:Name="TextBox_CPUSlider" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right" TextChanged="TextBox_CPUSlider_TextChanged" VerticalAlignment="Center" Text="0" MaxLines="4" MaxLength="3" Margin="0,0,5,0"/> 31 <TextBlock x:Name="sec_CPU" Grid.Column="2" TextWrapping="Wrap" Text="sec." IsEnabled="False" IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,50,0"/> 32 <TextBox x:Name="CPUSecTextBox" Grid.Column="2" TextWrapping="Wrap" VerticalAlignment="Center" d:LayoutOverrides="TopPosition, BottomPosition" Text="10" UndoLimit="4" HorizontalAlignment="Center" TextAlignment="Center" TextChanged="CPUSecTextBox_TextChanged" MaxLines="1" MaxLength="3"/> 33 34 <Slider x:Name="MemorySlider" Grid.Column="1" HorizontalAlignment="Center" Width="150" Grid.Row="1" d:LayoutOverrides="Height" ValueChanged="MemorySlider_ValueChanged" Maximum="100" VerticalAlignment="Center" LargeChange="10" SmallChange="1"/> 35 <TextBox x:Name="TextBox_MemorySlider" Grid.Column="1" TextChanged="TextBox_MemorySlider_TextChanged" Grid.Row="1" d:LayoutOverrides="Width, Height" Text="0" VerticalAlignment="Center" MaxLength="3" MaxLines="1" HorizontalAlignment="Right" Margin="0,0,5,0"/> 36 <TextBlock x:Name="sec_Memory" Grid.Column="2" TextWrapping="Wrap" Text="sec." IsEnabled="False" IsHitTestVisible="False" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,50,0"/> 37 <TextBox x:Name="MemorySecTextBox" Grid.Column="2" TextWrapping="Wrap" Text="10" UndoLimit="4" HorizontalAlignment="Center" TextAlignment="Center" d:LayoutOverrides="Height" Grid.Row="1" TextChanged="MemorySecTextBox_TextChanged" MaxLines="1" MaxLength="3" VerticalAlignment="Center"/> 38 39 <Slider x:Name="DiskSlider" Grid.Column="1" HorizontalAlignment="Center" Width="150" Grid.Row="2" d:LayoutOverrides="Height" ValueChanged="DiskSlider_ValueChanged" Maximum="100" VerticalAlignment="Center" LargeChange="10" SmallChange="1"/> 40 <TextBox x:Name="TextBox_DiskSlider" Grid.Column="1" HorizontalAlignment="Right" Grid.Row="2" TextWrapping="Wrap" Text="0" VerticalAlignment="Center" d:LayoutOverrides="TopPosition, BottomPosition" TextChanged="TextBox_DiskSlider_TextChanged" MaxLength="3" MaxLines="2" Margin="0,0,5,0"/> 41 <TextBlock x:Name="sec_Disk" Grid.Column="2" TextWrapping="Wrap" Text="sec." IsEnabled="False" IsHitTestVisible="False" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,50,0"/> 42 <TextBox x:Name="DiskSecTextBox" Grid.Column="2" TextWrapping="Wrap" Text="10" UndoLimit="4" HorizontalAlignment="Center" TextAlignment="Center" Grid.Row="2" d:LayoutOverrides="Height" TextChanged="DiskSecTextBox_TextChanged" MaxLength="3" MaxLines="1" VerticalAlignment="Center"/> 43 <Button x:Name="TestNotify" Grid.Column="2" Content="TestNotify" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center" Click="TestNotify_Click"/> 44 45 </Grid> 46 </Window>