123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <Window x:Class="CmwtatDigital.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:domain="clr-namespace:CmwtatDigital.Domain"
- xmlns:local="clr-namespace:CmwtatDigital"
- mc:Ignorable="d"
- Title="{DynamicResource TitleName}" Height="645" Width="450"
- ResizeMode="NoResize"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- TextElement.Foreground="{DynamicResource MaterialDesignBody}"
- TextElement.FontWeight="Regular"
- TextElement.FontSize="13"
- TextOptions.TextFormattingMode="Ideal"
- TextOptions.TextRenderingMode="Aliased"
- Background="{DynamicResource MaterialDesignPaper}"
- d:DataContext="{d:DesignInstance domain:ViewModel, d:IsDesignTimeCreatable=False}"
- Icon="CMWTAT.ico"
- Closing="Window_Closing"
- FontFamily="{DynamicResource Font}"
- Activated="Window_Activated"
- WindowStartupLocation="CenterScreen"
- >
- <!--FontFamily="{DynamicResource MaterialDesignFont}"-->
- <Grid>
- <Grid Margin="30,30,30,30" VerticalAlignment="Center">
- <StackPanel>
- <materialDesign:Card Padding="30" Margin="0,0,0,0" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8">
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" ><Run Text="{DynamicResource AppName}"/></TextBlock>
- </materialDesign:Card>
- <materialDesign:Card Padding="30,30" Margin="0,30,0,0" materialDesign:ShadowAssist.ShadowDepth="Depth3" UniformCornerRadius="8">
- <StackPanel>
- <Grid>
- <ComboBox x:Name="SystemEditionText" DisplayMemberPath="DisplayOS" VerticalAlignment="Center" Visibility="Visible"/>
- <TextBox x:Name="SystemEditionTextInput" materialDesign:HintAssist.Hint="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" MaxLength="29" xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore" input:InputMethod.IsInputMethodEnabled="False" VerticalAlignment="Center" Visibility="Hidden" TextChanged="SystemEditionTextInput_TextChanged">
- <TextBox.Text>
- <Binding Path="SN" UpdateSourceTrigger="PropertyChanged">
- <Binding.ValidationRules>
- <domain:IsSN ValidatesOnTargetUpdated="True"/>
- </Binding.ValidationRules>
- </Binding>
- </TextBox.Text>
- </TextBox>
- </Grid>
- <!--<TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignTitleTextBlock}" x:Name="SystemEditionText" Text="Checking System" />-->
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,30,0,0">
- <RadioButton x:Name="AutoRadio" Content="{DynamicResource Auto_Mode}" Margin="30,0,30,0" IsChecked="True" Checked="A_RadioButton_Checked"/>
- <RadioButton x:Name="ManualRadio" Content="{DynamicResource Manual_Mode}" Margin="30,0,30,0" Checked="M_RadioButton_Checked"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- <Button FontFamily="{DynamicResource Font}" x:Name="actbtn" Click="Activate_Button_Click" Content="{DynamicResource Activate_Button}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand" />
- <Button FontFamily="{DynamicResource Font}" x:Name="installbtn" Click="installbtn_Click" Content="{DynamicResource Convert_versions}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand"/>
- <Button FontFamily="{DynamicResource Font}" x:Name="upgradefullbtn" Click="upgradefullbtn_Click" Content="{DynamicResource Upgrade_full_version}" materialDesign:ShadowAssist.ShadowDepth="Depth3" materialDesign:ShadowAssist.Darken="False" materialDesign:ButtonAssist.CornerRadius="8" Margin="0,30,0,0" Height="65" Cursor="Hand"/>
- </StackPanel>
- </Grid>
- <Grid x:Name="DialogHostGrid" Visibility="Hidden">
- <materialDesign:DialogHost x:Name="DialogWait" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="32,24,32,24">
- <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Loading}" />
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogActProg" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="32,24,32,24">
- <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="activatingtext" Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Activating}" />
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogWithCancel" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="24,24,24,8">
- <ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="24,16,24,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Loading}" />
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
- CommandParameter="Sample2Cancel"
- HorizontalAlignment="Center" Content="{DynamicResource Cancel}" />
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogWithOK" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="Title" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="Hello World" />
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
- CommandParameter="Sample2Cancel"
- HorizontalAlignment="Center" Content="{DynamicResource OK}" />
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogHelp" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="Help"></TextBlock>
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource HelpText}"></TextBlock>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
- CommandParameter="Sample2Cancel"
- HorizontalAlignment="Center" Content="{DynamicResource OK}" />
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogWithExit" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithExitTitle" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource ErrorTitle}"/>
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithExitText" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource Disconnect_to_server_exit}"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Click="Exit_Button_Click"
- HorizontalAlignment="Center" Content="{DynamicResource Exit}"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogWithOKToCloseDialog" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogTitle" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Title</TextBlock>
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogText" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Text</TextBlock>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
- HorizontalAlignment="Center" Content="{DynamicResource OK}"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogWithOKToCloseDialogDonate" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogDonateTitle" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource Complete}" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogWithOKToCloseDialogDonateText" Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource DonateTextActivated}" />
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Refuse}"/>
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Click="Donate_Button_Click" HorizontalAlignment="Center" Content="{DynamicResource DonateBtn}"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogUpdate" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogUpdateTitle" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource UpdateTitle}" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignHeadline6TextBlock}" x:Name="DialogUpdateText" Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource UpdateText}" />
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button x:Name="IgnoreUpdate" FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Ignore}"/>
- <Button x:Name="UpdateBtn" FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Click="UpdateBtn_Click" HorizontalAlignment="Center" Content="{DynamicResource UpdateNow}"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- <materialDesign:DialogHost x:Name="DialogUpgradeFullVersion" IsOpen="False">
- <materialDesign:DialogHost.DialogContent>
- <Grid>
- <materialDesign:Card UniformCornerRadius="8" materialDesign:ShadowAssist.ShadowDepth="Depth3">
- <StackPanel>
- <StackPanel Margin="16,16,16,8">
- <!--<ProgressBar Style="{DynamicResource MaterialDesignCircularProgressBar}" HorizontalAlignment="Center" Margin="0,0,0,0" IsIndeterminate="True" Value="0" VerticalAlignment="Top" Width="32" Height="32" />-->
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" Text="{DynamicResource UpgradeFullVersionWindowsTitle}" />
- <TextBlock FontFamily="{DynamicResource Font}" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" Text="{DynamicResource UpgradeFullVersionWindowsText}" />
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" HorizontalAlignment="Center" Content="{DynamicResource Cancel}"/>
- <Button FontFamily="{DynamicResource Font}" Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
- Click="UpgradeFullVersionWindows_Click" HorizontalAlignment="Center" Content="{DynamicResource OK}"/>
- </StackPanel>
- </StackPanel>
- </materialDesign:Card>
- </Grid>
- </materialDesign:DialogHost.DialogContent>
- </materialDesign:DialogHost>
- </Grid>
- </Grid>
- </Window>
|