MainView.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <wnd:CustomWnd x:Class="FurnaceGasPanelUI.Client.MainView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  5. xmlns:cal="http://www.caliburn.org"
  6. WindowState="Normal"
  7. WindowStartupLocation="CenterScreen"
  8. xmlns:wnd="http://OpenSEMI.Ctrlib.com/presentation"
  9. xmlns:client="clr-namespace:FurnaceGasPanelUI.Client"
  10. xmlns:converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter;assembly=MECF.Framework.UI.Client"
  11. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
  12. Title="MainView" Height="900" Width="1280" FontFamily="Segoe" Loaded="CustomWnd_Loaded" >
  13. <!--显示器最佳分辨率 1024 * 768 , 内容页面 1000*560 -->
  14. <Window.Resources>
  15. <client:DateTimeToTextConverter x:Key="dateTimeToTextConverter"/>
  16. <client:CollectionLastIndexConverter x:Key="collectionLastIndexConverter" />
  17. <converter:UnitOnlineBorderColorConverter x:Key="UnitOnlineBorderColorConverter"/>
  18. <converter:BoolReverseConverter x:Key="BoolReverseConverter"></converter:BoolReverseConverter>
  19. </Window.Resources>
  20. <Viewbox Stretch="Fill">
  21. <Grid Background="{DynamicResource MainArea_BG}" Width="1280" Height="900">
  22. <Grid x:Name="LoginPart" Background="{StaticResource Login_BG}">
  23. <Ellipse MaxWidth="1000" MaxHeight="800" Fill="{DynamicResource Login_BG_Highlight}"/>
  24. <Grid Width="590" Height="365">
  25. <Grid.Effect>
  26. <DropShadowEffect Color="#FF0B1E5A" BlurRadius="30" ShadowDepth="0"/>
  27. </Grid.Effect>
  28. <Border BorderBrush="{DynamicResource LoginPanel_BD}" BorderThickness="1" CornerRadius="3" Background="{DynamicResource Login_BG}">
  29. <Grid>
  30. <Path Data="M0,0 L0.67857742,0.054499656 C95.091171,7.7605554 387.09985,38.266688 589.03564,132.3875 L590,132.84716 590,249.338 C590,250.99486 588.65686,252.338 587,252.338 L441.29346,252.338 440.83957,252.18517 C350.99802,222.35816 203.01686,189.00345 6.2653065,198.4652 L0,198.80318 z" Stretch="Fill" Height="252.338" VerticalAlignment="Bottom" Width="590" Fill="{DynamicResource Login_BG}"/>
  31. <Grid Margin="60,40">
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="70"/>
  34. <RowDefinition Height="10"/>
  35. <RowDefinition/>
  36. <RowDefinition Height="Auto"/>
  37. </Grid.RowDefinitions>
  38. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  39. <TextBlock TextWrapping="Wrap" Text="Login" FontWeight="Bold" FontFamily="Arial" FontSize="50" Foreground="White" VerticalAlignment="Bottom" Margin="0,0,0,5"/>
  40. <TextBlock TextWrapping="Wrap" Text="登录" FontFamily="SimHei" FontSize="32" Foreground="White" Opacity="0.5" Margin="10,0,0,12" VerticalAlignment="Bottom" FontWeight="Bold"/>
  41. </StackPanel>
  42. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="-20,0">
  43. <Rectangle Fill="#19FFFFFF" Width="10" Height="10"/>
  44. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  45. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  46. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  47. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  48. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  49. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  50. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  51. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  52. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  53. <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="20,0,0,0"/>
  54. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  55. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  56. <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  57. <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  58. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
  59. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  60. <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  61. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="30,0,0,0"/>
  62. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  63. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  64. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  65. <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  66. <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  67. <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  68. <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
  69. </StackPanel>
  70. <Grid Margin="40" Grid.Row="2">
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition Width="130"/>
  73. <ColumnDefinition/>
  74. </Grid.ColumnDefinitions>
  75. <Grid.RowDefinitions>
  76. <RowDefinition/>
  77. <RowDefinition/>
  78. <RowDefinition/>
  79. </Grid.RowDefinitions>
  80. <TextBox x:Name="tbLoginName" Grid.Column="1" Text="" TabIndex="0" TextWrapping="Wrap" Height="18" VerticalAlignment="Center" Style="{DynamicResource Login_TextBox}"/>
  81. <PasswordBox x:Name="pdbPassword" Grid.Column="1" Grid.Row="1" TabIndex="1" Style="{DynamicResource Login_PasswordBox}" Margin="0,0,0,2">
  82. <i:Interaction.Triggers>
  83. <i:EventTrigger EventName="KeyDown">
  84. <cal:ActionMessage MethodName="Enter">
  85. <cal:Parameter Value="$eventargs" />
  86. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  87. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  88. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  89. </cal:ActionMessage>
  90. </i:EventTrigger>
  91. </i:Interaction.Triggers>
  92. </PasswordBox>
  93. <ComboBox x:Name="cbRole" Style="{DynamicResource Login_ComboBox}" Grid.Column="1" Grid.Row="1" ItemsSource="{Binding Roles}" DisplayMemberPath="RoleName" SelectedIndex="0" TabIndex="2" Margin="0,20,0,0" Grid.RowSpan="2"/>
  94. <TextBlock TextWrapping="Wrap" Text="User Name" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0"/>
  95. <TextBlock TextWrapping="Wrap" Text="Password" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="1"/>
  96. <TextBlock TextWrapping="Wrap" Text="Role" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="2"/>
  97. </Grid>
  98. <Button Style="{StaticResource Login_Button}" Content="Login" Grid.Row="3" FontFamily="Arial" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Height="55" Width="160">
  99. <i:Interaction.Triggers>
  100. <i:EventTrigger EventName="Click">
  101. <cal:ActionMessage MethodName="Login">
  102. <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
  103. <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
  104. <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
  105. </cal:ActionMessage>
  106. </i:EventTrigger>
  107. </i:Interaction.Triggers>
  108. </Button>
  109. </Grid>
  110. </Grid>
  111. </Border>
  112. </Grid>
  113. <Grid.Style>
  114. <Style>
  115. <Style.Triggers>
  116. <DataTrigger Binding="{Binding IsLogin}" Value="True">
  117. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  118. </DataTrigger>
  119. </Style.Triggers>
  120. </Style>
  121. </Grid.Style>
  122. </Grid>
  123. <Border >
  124. <Grid x:Name="MainPage">
  125. <Grid.RowDefinitions>
  126. <RowDefinition Height="*"/>
  127. </Grid.RowDefinitions>
  128. <Grid Grid.Row="0" Background="{DynamicResource MainArea_BG}">
  129. <Rectangle Fill="{DynamicResource MainArea_InnerBG}" Margin="20,8" RadiusX="5" RadiusY="5">
  130. <Rectangle.Effect>
  131. <BlurEffect Radius="40"/>
  132. </Rectangle.Effect>
  133. </Rectangle>
  134. <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="0" Padding="0" >
  135. </ContentControl>
  136. </Grid>
  137. <Grid.Style>
  138. <Style>
  139. <Style.Triggers>
  140. <DataTrigger Binding="{Binding IsLogin}" Value="False">
  141. <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
  142. </DataTrigger>
  143. </Style.Triggers>
  144. </Style>
  145. </Grid.Style>
  146. </Grid>
  147. </Border>
  148. </Grid>
  149. </Viewbox>
  150. </wnd:CustomWnd>