Skip to content

Commit

Permalink
迁移到新代码基架
Browse files Browse the repository at this point in the history
  • Loading branch information
MyBlueHorizon committed Sep 12, 2021
1 parent 2da1a82 commit 8ec00bb
Show file tree
Hide file tree
Showing 24 changed files with 335 additions and 423 deletions.
76 changes: 38 additions & 38 deletions src/ClassTable/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,53 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<ClassTable.MySettings>
<setting name="WindowMode" serializeAs="String">
<value>Wide</value>
</setting>
<setting name="BackgroundColor_Red" serializeAs="String">
<value>0</value>
</setting>
<setting name="BackgroundColor_Green" serializeAs="String">
<value>96</value>
</setting>
<setting name="BackgroundColor_Blue" serializeAs="String">
<value>96</value>
</setting>
<setting name="BackgroundColor_Alpha" serializeAs="String">
<value>122</value>
</setting>
<setting name="ForegroundColor_Red" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Green" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Blue" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Alpha" serializeAs="String">
<value>255</value>
</setting>
<setting name="Mdate" serializeAs="String">
<value>No</value>
</setting>
<setting name="Ndate" serializeAs="String">
<value>0</value>
</setting>
</ClassTable.MySettings>
</userSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.13.0.0" newVersion="2.13.0.0" />
<bindingRedirect oldVersion="0.0.0.0-2.13.1.0" newVersion="2.13.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ExcelNumberFormat" publicKeyToken="23c6f5d73be07eca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<userSettings>
<ClassTable.MySettings>
<setting name="WindowMode" serializeAs="String">
<value>Wide</value>
</setting>
<setting name="BackgroundColor_Red" serializeAs="String">
<value>0</value>
</setting>
<setting name="BackgroundColor_Green" serializeAs="String">
<value>96</value>
</setting>
<setting name="BackgroundColor_Blue" serializeAs="String">
<value>96</value>
</setting>
<setting name="BackgroundColor_Alpha" serializeAs="String">
<value>122</value>
</setting>
<setting name="ForegroundColor_Red" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Green" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Blue" serializeAs="String">
<value>255</value>
</setting>
<setting name="ForegroundColor_Alpha" serializeAs="String">
<value>255</value>
</setting>
<setting name="Mdate" serializeAs="String">
<value>No</value>
</setting>
<setting name="Ndate" serializeAs="String">
<value>0</value>
</setting>
</ClassTable.MySettings>
</userSettings>
</configuration>
2 changes: 1 addition & 1 deletion src/ClassTable/Application.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ClassTable"
StartupUri="MainWindow.xaml">
StartupUri="LegacySidebarWindow.xaml">
<Application.Resources>

</Application.Resources>
Expand Down
98 changes: 35 additions & 63 deletions src/ClassTable/ClassTable.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,6 @@
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<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>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -66,17 +49,14 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
<ApplicationIcon>Resource\Icons\AppIcon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="ClosedXML, Version=0.95.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.13.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.13.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
<Reference Include="DocumentFormat.OpenXml, Version=2.13.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.13.1\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
Expand Down Expand Up @@ -117,16 +97,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Excel.vb" />
<Compile Include="Network.vb" />
<Compile Include="SettingWindow.xaml.vb">
<DependentUpon>SettingWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="UpdateWindow.xaml.vb">
<DependentUpon>UpdateWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="LegacySettingWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LegacySidebarWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LegacyUpdateWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -135,19 +117,22 @@
<DependentUpon>Application.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Core.vb" />
<Compile Include="LegacyCore.vb" />
<Compile Include="LegacyExcel.vb" />
<Compile Include="LegacyNetwork.vb" />
<Compile Include="LegacySettingWindow.xaml.vb">
<DependentUpon>LegacySettingWindow.xaml</DependentUpon>
</Compile>
<Compile Include="LegacySidebarWindow.xaml.vb">
<DependentUpon>LegacySidebarWindow.xaml</DependentUpon>
</Compile>
<Compile Include="LegacyUpdateWindow.xaml.vb">
<DependentUpon>LegacyUpdateWindow.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.vb">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="SettingWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UpdateWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Import Include="System.Threading.Tasks" />
Expand Down Expand Up @@ -187,43 +172,30 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>PublicVbMyResourcesResXFileCodeGenerator</Generator>
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<None Include="My Project\app.manifest" />
<None Include="My Project\Settings.settings">
<Generator>PublicSettingsSingleFileGenerator</Generator>
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
<None Include="tablefile.xlsx" />
<None Include="TableFile.xlsx" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</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>
<ItemGroup>
<Resource Include="Resources\Icon.ico" />
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<SplashScreen Include="SplashScreen.png" />
<SplashScreen Include="Resource\SplashScreen.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TableIcon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resource\Icons\AppIcon.ico" />
<Resource Include="Resource\Icons\TableIcon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
4 changes: 2 additions & 2 deletions src/ClassTable/Core.vb → src/ClassTable/LegacyCore.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Public Class Core
Public Class LegacyCore

'字符串转换

Expand Down Expand Up @@ -51,4 +51,4 @@
Dim WindowBrush As Brush = New SolidColorBrush(Color.FromArgb(A, R, G, B))
Return WindowBrush
End Function
End Class
End Class
4 changes: 2 additions & 2 deletions src/ClassTable/Excel.vb → src/ClassTable/LegacyExcel.vb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Imports Newtonsoft.Json
Imports ClosedXML.Excel
Imports System.IO
Public Class Excel
Public Class LegacyExcel

'读取表格部分

Expand All @@ -23,4 +23,4 @@ Public Class Excel
Dim ClassName As String = GetName(ClassBlock)
Return ClassName
End Function
End Class
End Class
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Imports System.IO
Imports System.Net
Imports Newtonsoft.Json
Public Class Network
Public Class LegacyNetwork

'网络与更新部分

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Window
<Window x:Class="LegacySettingWindow"
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:local="clr-namespace:ClassTable" x:Class="SettingWindow"
xmlns:local="clr-namespace:ClassTable"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen" Background="#7A006060"
ResizeMode="NoResize"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Imports System.ComponentModel
Imports System.Windows.Media
Public Class SettingWindow
ReadOnly Core As New Core
Public Class LegacySettingWindow
ReadOnly Core As New LegacyCore
Dim BackgroundRedValue = My.Settings.BackgroundColor_Red
Dim BackgroundBlueValue = My.Settings.BackgroundColor_Blue
Dim BackgroundGreenValue = My.Settings.BackgroundColor_Green
Expand All @@ -10,7 +10,7 @@ Public Class SettingWindow
Dim ForegroundBlueValue = My.Settings.ForegroundColor_Blue
Dim ForegroundGreenValue = My.Settings.ForegroundColor_Green
Dim ForegroundAlphaValue = My.Settings.ForegroundColor_Alpha
Dim SetDate = MainWindow.NowWeekday
Dim SetDate = LegacySidebarWindow.NowWeekday
Private Sub Slider_AlphaBar_ValueChanged(sender As Object, e As RoutedPropertyChangedEventArgs(Of Double)) Handles Slider_AlphaBar.ValueChanged
If Radio_Back.IsChecked = True Then
BackgroundAlphaValue = Slider_AlphaBar.Value
Expand Down
31 changes: 31 additions & 0 deletions src/ClassTable/LegacySidebarWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Window x:Class="LegacySidebarWindow"
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:local="clr-namespace:ClassTable"
mc:Ignorable="d"
AllowsTransparency="True"
ResizeMode="NoResize"
WindowStyle="None"
Height="720"
Width="96"
ShowInTaskbar="False"
Background="#7A006060"
WindowStartupLocation="CenterScreen" Topmost="True">
<Grid>
<TextBlock x:Name="MorRead" HorizontalAlignment="Left" TextWrapping="Wrap" Text="语 文" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,49,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorA" HorizontalAlignment="Left" TextWrapping="Wrap" Text="数 学" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,102,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorB" HorizontalAlignment="Left" TextWrapping="Wrap" Text="英 语" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,155,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorC" HorizontalAlignment="Left" TextWrapping="Wrap" Text="政 治" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,208,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorD" HorizontalAlignment="Left" TextWrapping="Wrap" Text="历 史" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,261,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorE" HorizontalAlignment="Left" TextWrapping="Wrap" Text="地 理" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,314,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorF" HorizontalAlignment="Left" TextWrapping="Wrap" Text="生 物" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,397,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorG" HorizontalAlignment="Left" TextWrapping="Wrap" Text="物 理" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,450,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorH" HorizontalAlignment="Left" TextWrapping="Wrap" Text="化 学" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,503,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorI" HorizontalAlignment="Left" TextWrapping="Wrap" Text="体 育" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,556,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorJ" HorizontalAlignment="Left" TextWrapping="Wrap" Text="艺 术" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,609,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorStudy" HorizontalAlignment="Left" TextWrapping="Wrap" Text="规 划" VerticalAlignment="Top" Height="48" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="38" Margin="0,662,0,0" TextAlignment="Center" Foreground="{Binding Foreground, ElementName=MorWeekday}"/>
<TextBlock x:Name="MorWeekday" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Height="34" Width="96" FontWeight="Bold" FontFamily="STZhongsong" FontSize="28" TextAlignment="Center" Foreground="White" Text="周 一" Margin="0,10,0,0"/>
</Grid>
</Window>
Loading

0 comments on commit 8ec00bb

Please sign in to comment.