sc 12 months ago
parent
commit
56cd18f08a
  1. 6
      App.xaml
  2. 71
      MainWindow.xaml
  3. 17
      MainWindow.xaml.cs
  4. 6
      Properties/AssemblyInfo.cs
  5. 27
      Properties/Resources.Designer.cs
  6. 9
      Properties/Resources.en-US.resx
  7. 9
      Properties/Resources.resx
  8. 9
      Properties/Resources.zh-CN.resx
  9. 9
      Properties/Resources.zh-TW.resx
  10. 31
      SunlightCentralizedControlManagement(SCCM).csproj

6
App.xaml

@ -7,9 +7,9 @@
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"/> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml"/> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml"/> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Secondary/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

71
MainWindow.xaml

@ -11,7 +11,8 @@
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
Title="SUNLIGHT SCCM b0.0.1 (2024/08/10)" Title="SUNLIGHT SCCM b0.0.1 (2024/08/10)"
Height="1080" Width="1920" Background="#FF003640"> Height="1080" Width="1920" Background="#FF003640"
WindowState ="Maximized" WindowStyle="None">
<Window.Resources> <Window.Resources>
<Storyboard x:Key="MenuOpen"> <Storyboard x:Key="MenuOpen">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
@ -37,63 +38,93 @@
</Window.Triggers> </Window.Triggers>
<Grid Background="LightGray"> <Grid Background="LightGray">
<Grid x:Name="GridTitle" Height="50" VerticalAlignment="Top" Background="#FF1368BD" MouseDown="GridTitle_MouseDown" Margin="60,0,0,0"> <Grid x:Name="GridTitle" Height="50" VerticalAlignment="Top" Background="#FF006361" MouseDown="GridTitle_MouseDown" Margin="60,0,0,0">
<TextBlock Text="抽屉式菜单风格-材料设计主题控件" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Foreground="White"/> <TextBlock Text="Sunlight Centralized Control Management (SCCM)" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Foreground="White"/>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="欢迎使用" VerticalAlignment="Center" FontSize="14" Foreground="White"/> <TextBlock Text="{Binding Sys_Time}" VerticalAlignment="Center" FontSize="14" Foreground="White"/>
<materialDesign:PopupBox Foreground="White" Margin="10" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False"> <materialDesign:PopupBox Foreground="White" Margin="10" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
<StackPanel Width="150"> <StackPanel Width="150">
<Button Content="账号"/> <Button Content="账号"/>
<Button Content="设置"/> <Button Content="{x:Static lang:Resources.SysSet}"/>
<Button Content="帮助"/> <Button Content="帮助"/>
<Separator/> <Separator/>
<Button Content="最小化"/> <Button x:Name="ButtonMinimize" Content="最小化" Click="ButtonMinimize_Click"/>
<Button Content="最大化"/> <Button x:Name="ButtonMaximize" Content="最大化" Click="ButtonMaximize_Click"/>
<Button x:Name="ButtonPopUpLogout" Content="退出" Click="ButtonPopUpLogout_Click"/> <Button x:Name="ButtonPopUpLogout" Content="{x:Static lang:Resources.PopUpLogout}" Click="ButtonPopUpLogout_Click"/>
</StackPanel> </StackPanel>
</materialDesign:PopupBox> </materialDesign:PopupBox>
</StackPanel> </StackPanel>
</Grid> </Grid>
<Grid x:Name="GridMenu" Width="60" HorizontalAlignment="Left" Background="#FF1B3861" Margin="0" SizeChanged="GridMenu_SizeChanged"> <Grid x:Name="GridMenu" Width="60" HorizontalAlignment="Left" Background="#FF00204E" Margin="0" SizeChanged="GridMenu_SizeChanged">
<StackPanel> <StackPanel>
<Grid Background="#FF1368BD"> <Grid Background="#FF006361">
<Button x:Name="ButtonCloseMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="Collapsed" Click="ButtonCloseMenu_Click"> <Button x:Name="ButtonCloseMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="Collapsed" Click="ButtonCloseMenu_Click">
<materialDesign:PackIcon Kind="ArrowLeft" Foreground="#FF1B3861" Width="25" Height="25"/> <materialDesign:PackIcon Kind="ArrowLeft" Foreground="#FF00204E" Width="25" Height="25"/>
</Button> </Button>
<Button x:Name="ButtonOpenMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Click="ButtonOpenMenu_Click"> <Button x:Name="ButtonOpenMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Click="ButtonOpenMenu_Click">
<materialDesign:PackIcon Kind="Menu" Foreground="#FF1B3861" Width="25" Height="25"/> <materialDesign:PackIcon Kind="Menu" Foreground="#FF00204E" Width="25" Height="25"/>
</Button> </Button>
</Grid> </Grid>
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD"> <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ListBox" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
<TextBlock Text="总览" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel>
</ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> <ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ViewDashboard" Width="25" Height="25" Margin="10" VerticalAlignment="Center" /> <materialDesign:PackIcon Kind="ViewDashboard" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
<TextBlock Text="系统首页" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> <TextBlock Text="工单" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel>
</ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ClipboardTextClock" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
<TextBlock Text="排程" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel>
</ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ShowChart" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="曲线" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel>
</ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ClipboardText" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="程序" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel>
</ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ArrowExpand" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="输入输出" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> <ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="DebugStepOver" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/> <materialDesign:PackIcon Kind="Set" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="设备调试" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> <TextBlock Text="参数" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> <ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Settings" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/> <materialDesign:PackIcon Kind="SettingsApplications" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="参数设置" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> <TextBlock Text="系统参数" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> <ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Text" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/> <materialDesign:PackIcon Kind="MathLog" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="工作记录" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> <TextBlock Text="工作记录" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> <ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="User" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/> <materialDesign:PackIcon Kind="Database" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
<TextBlock Text="用户中心" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> <TextBlock Text="程序组" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
</StackPanel> </StackPanel>
</ListViewItem> </ListViewItem>
</ListView> </ListView>

17
MainWindow.xaml.cs

@ -34,6 +34,21 @@ namespace SunlightCentralizedControlManagement_SCCM_
{ {
Application.Current.Shutdown(); Application.Current.Shutdown();
} }
private void ButtonMaximize_Click(object sender, RoutedEventArgs e)
{
if (WindowState == WindowState.Maximized)
{ WindowState = WindowState.Normal; }
else
{ WindowState = WindowState.Maximized; }
}
private void ButtonMinimize_Click(object sender, RoutedEventArgs e)
{
if (WindowState == WindowState.Minimized)
{ WindowState = WindowState.Normal; }
else
{ WindowState = WindowState.Minimized; }
}
private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e) private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e)
{ {
@ -62,5 +77,7 @@ namespace SunlightCentralizedControlManagement_SCCM_
{ {
} }
} }
} }

6
Properties/AssemblyInfo.cs

@ -7,11 +7,11 @@ using System.Windows;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改 // 控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("DyeingComputer")] [assembly: AssemblyTitle("SCCM")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("SUNLIGHT")]
[assembly: AssemblyProduct("DyeingComputer")] [assembly: AssemblyProduct("SCCM")]
[assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

27
Properties/Resources.Designer.cs

@ -1104,6 +1104,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
} }
} }
/// <summary>
/// 查找类似 Maximize 的本地化字符串。
/// </summary>
public static string Maximize {
get {
return ResourceManager.GetString("Maximize", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Measure 的本地化字符串。 /// 查找类似 Measure 的本地化字符串。
/// </summary> /// </summary>
@ -1176,6 +1185,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
} }
} }
/// <summary>
/// 查找类似 Minimize 的本地化字符串。
/// </summary>
public static string Minimize {
get {
return ResourceManager.GetString("Minimize", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Mixing 的本地化字符串。 /// 查找类似 Mixing 的本地化字符串。
/// </summary> /// </summary>
@ -1428,6 +1446,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.Properties {
} }
} }
/// <summary>
/// 查找类似 PopUpLogout 的本地化字符串。
/// </summary>
public static string PopUpLogout {
get {
return ResourceManager.GetString("PopUpLogout", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Port 的本地化字符串。 /// 查找类似 Port 的本地化字符串。
/// </summary> /// </summary>

9
Properties/Resources.en-US.resx

@ -849,4 +849,13 @@
<data name="Bottom1" xml:space="preserve"> <data name="Bottom1" xml:space="preserve">
<value>Bottom</value> <value>Bottom</value>
</data> </data>
<data name="Minimize" xml:space="preserve">
<value>MINIMIZED</value>
</data>
<data name="Maximize" xml:space="preserve">
<value>Maximize</value>
</data>
<data name="PopUpLogout" xml:space="preserve">
<value>Quit</value>
</data>
</root> </root>

9
Properties/Resources.resx

@ -849,4 +849,13 @@
<data name="Bottom1" xml:space="preserve"> <data name="Bottom1" xml:space="preserve">
<value>Bottom</value> <value>Bottom</value>
</data> </data>
<data name="Minimize" xml:space="preserve">
<value>Minimize</value>
</data>
<data name="Maximize" xml:space="preserve">
<value>Maximize</value>
</data>
<data name="PopUpLogout" xml:space="preserve">
<value>PopUpLogout</value>
</data>
</root> </root>

9
Properties/Resources.zh-CN.resx

@ -849,4 +849,13 @@
<data name="Bottom1" xml:space="preserve"> <data name="Bottom1" xml:space="preserve">
<value>底</value> <value>底</value>
</data> </data>
<data name="Minimize" xml:space="preserve">
<value>最小化</value>
</data>
<data name="Maximize" xml:space="preserve">
<value>最大化</value>
</data>
<data name="PopUpLogout" xml:space="preserve">
<value>退出</value>
</data>
</root> </root>

9
Properties/Resources.zh-TW.resx

@ -849,4 +849,13 @@
<data name="Bottom1" xml:space="preserve"> <data name="Bottom1" xml:space="preserve">
<value>底</value> <value>底</value>
</data> </data>
<data name="Minimize" xml:space="preserve">
<value>最小化</value>
</data>
<data name="Maximize" xml:space="preserve">
<value>最大化</value>
</data>
<data name="PopUpLogout" xml:space="preserve">
<value>退出</value>
</data>
</root> </root>

31
SunlightCentralizedControlManagement(SCCM).csproj

@ -14,9 +14,24 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@ -175,7 +190,7 @@
<Version>2.0.0-rc4.5</Version> <Version>2.0.0-rc4.5</Version>
</PackageReference> </PackageReference>
<PackageReference Include="MaterialDesignThemes"> <PackageReference Include="MaterialDesignThemes">
<Version>5.1.1-ci795</Version> <Version>5.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Web.WebView2"> <PackageReference Include="Microsoft.Web.WebView2">
<Version>1.0.2895-prerelease</Version> <Version>1.0.2895-prerelease</Version>
@ -225,6 +240,18 @@
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterResolveReferences"> <Target Name="AfterResolveReferences">
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save