2018-05-27 21:44:15 +08:00
<Window x:Class="CMWTAT_DIGITAL.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"
2018-05-31 19:30:34 +08:00
xmlns:domain="clr-namespace:CMWTAT_DIGITAL.Domain"
2018-05-27 21:44:15 +08:00
xmlns:local="clr-namespace:CMWTAT_DIGITAL"
mc:Ignorable="d"
2018-05-31 19:30:34 +08:00
Title="CMWTAT Digital Edition V2" Height="550" Width="450"
2018-05-27 21:44:15 +08:00
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
2018-05-31 19:30:34 +08:00
FontFamily="{DynamicResource MaterialDesignFont}"
ResizeMode="NoResize"
d:DataContext="{d:DesignInstance domain:ViewModel, d:IsDesignTimeCreatable=False}"
>
2018-05-27 21:44:15 +08:00
<Grid>
2018-05-31 19:30:34 +08:00
<StackPanel>
<materialDesign:Card Padding="32" Margin="15,15,15,0">
<TextBlock Style="{DynamicResource MaterialDesignTitleTextBlock}"><Run Text="CMWTAT Digital Edition V2"/></TextBlock>
</materialDesign:Card>
<materialDesign:Card Padding="32" Margin="15,15,15,0">
<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 x:Name="SystemEditionText" Style="{DynamicResource MaterialDesignTitleTextBlock}" Text="Checking System" />-->
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,30,0,0">
<RadioButton x:Name="AutoRadio" Content="Auto Mode" Margin="30,0,30,0" IsChecked="True" Checked="A_RadioButton_Checked"/>
<RadioButton x:Name="ManualRadio" Content="Manual Mode" Margin="30,0,30,0" Checked="M_RadioButton_Checked"/>
</StackPanel>
</StackPanel>
</materialDesign:Card>
<Button x:Name="actbtn" Content="Activate" Margin="30,30,30,0" VerticalAlignment="Top" Click="Activate_Button_Click" Height="65"/>
<Button x:Name="installbtn" Content="Convert versions (Install Key without Activate)" Margin="30,30,30,0" VerticalAlignment="Top" Click="installbtn_Click" Height="65"/>
</StackPanel>
<Grid x:Name="DialogHostGrid" Visibility="Hidden">
<materialDesign:DialogHost x:Name="DialogWait" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Loading</TextBlock>
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogActProg" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 x:Name="activatingtext" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,24,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Activating</TextBlock>
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogWithCancel" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="24,16,24,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Loading</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
CommandParameter="Sample2Cancel"
HorizontalAlignment="Center">CANCEL</Button>
2018-05-31 19:30:34 +08:00
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogWithOK" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Title</TextBlock>
<TextBlock Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Hello World</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
CommandParameter="Sample2Cancel"
HorizontalAlignment="Center">OK</Button>
2018-05-31 19:30:34 +08:00
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogWithExit" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 x:Name="DialogWithExitTitle" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Error</TextBlock>
<TextBlock x:Name="DialogWithExitText" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,8,0,0" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="14" >Unable to connect to server, program will exit.</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Click="Exit_Button_Click"
HorizontalAlignment="Center">Exit</Button>
2018-05-31 19:30:34 +08:00
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogWithOKToCloseDialog" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 x:Name="DialogWithOKToCloseDialogTitle" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Title</TextBlock>
<TextBlock x:Name="DialogWithOKToCloseDialogText" Style="{DynamicResource MaterialDesignTitleTextBlock}" 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 Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
HorizontalAlignment="Center">OK</Button>
2018-05-31 19:30:34 +08:00
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
<materialDesign:DialogHost x:Name="DialogWithOKToCloseDialogDonate" IsOpen="False">
<materialDesign:DialogHost.DialogContent>
<Grid>
<materialDesign:Card>
<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 x:Name="DialogWithOKToCloseDialogDonateTitle" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="16" FontWeight="Bold" >Title</TextBlock>
<TextBlock x:Name="DialogWithOKToCloseDialogDonateText" Style="{DynamicResource MaterialDesignTitleTextBlock}" Margin="0,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="14" >Text</TextBlock>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8,0,8,8">
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Click="Donate_Button_Click"
HorizontalAlignment="Center">Thanks developer and donate a dinner</Button>
2018-05-31 19:30:34 +08:00
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
2018-05-27 21:44:15 +08:00
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
HorizontalAlignment="Center">Refuse</Button>
2018-05-31 19:30:34 +08:00
</StackPanel>
2018-05-27 21:44:15 +08:00
</StackPanel>
2018-05-31 19:30:34 +08:00
</materialDesign:Card>
</Grid>
</materialDesign:DialogHost.DialogContent>
</materialDesign:DialogHost>
</Grid>
2018-05-27 21:44:15 +08:00
</Grid>
</Window>