Skip to content

Commit

Permalink
Merge pull request #3 from MyBlueHorizon/1.7-next
Browse files Browse the repository at this point in the history
同步
  • Loading branch information
MyBlueHorizon authored Aug 3, 2024
2 parents fbdadeb + 333779a commit 8e4c6ff
Show file tree
Hide file tree
Showing 18 changed files with 284 additions and 301 deletions.
2 changes: 1 addition & 1 deletion src/ClassTable/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.17.1.0" newVersion="2.17.1.0" />
<bindingRedirect oldVersion="0.0.0.0-2.20.0.0" newVersion="2.20.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ExcelNumberFormat" publicKeyToken="23c6f5d73be07eca" culture="neutral" />
Expand Down
2 changes: 0 additions & 2 deletions src/ClassTable/AppCore.vb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Public Class AppCore

'字符串转换

'日期单字转换
Public Shared Function GetChineseWeekLiteName(ByVal NowWeekday)
Dim ChineseWeekName = "期"
Expand Down Expand Up @@ -54,7 +53,6 @@
End Function

'程序UI

'获取窗口笔刷
Public Shared Function GetWindowBrush(ByVal R As String, ByVal G As String, ByVal B As String, ByVal A As String)
Dim WindowBrush As Brush = New SolidColorBrush(Color.FromArgb(A, R, G, B))
Expand Down
2 changes: 1 addition & 1 deletion src/ClassTable/AppProperty.vb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
'颜色相关
Public Property AppForegroundColorBrush As Brush = AppCore.GetWindowBrush(My.Settings.ForegroundColor_Red, My.Settings.ForegroundColor_Green, My.Settings.ForegroundColor_Blue, My.Settings.ForegroundColor_Alpha)
Public Property AppBackgroundColorBrush As Brush = AppCore.GetWindowBrush(My.Settings.BackgroundColor_Red, My.Settings.BackgroundColor_Green, My.Settings.BackgroundColor_Blue, My.Settings.BackgroundColor_Alpha)
End Class
End Class
50 changes: 30 additions & 20 deletions src/ClassTable/ClassTable.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,42 +89,49 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="LegacyAboutWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LegacySettingWindow.xaml">
<Compile Include="FunctionWindow.xaml.vb">
<DependentUpon>FunctionWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Page\AboutPage.xaml.vb">
<DependentUpon>AboutPage.xaml</DependentUpon>
</Compile>
<Compile Include="Page\SettingPage.xaml.vb">
<DependentUpon>SettingPage.xaml</DependentUpon>
</Compile>
<Compile Include="Page\UpdatePage.xaml.vb">
<DependentUpon>UpdatePage.xaml</DependentUpon>
</Compile>
<Page Include="FunctionWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LegacyUpdateWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="AppProperty.vb" />
<Compile Include="LegacyAboutWindow.xaml.vb">
<DependentUpon>LegacyAboutWindow.xaml</DependentUpon>
</Compile>
<Compile Include="AppCore.vb" />
<Compile Include="Library\ExcelManager.vb" />
<Compile Include="Library\NetworkManager.vb" />
<Compile Include="LegacySettingWindow.xaml.vb">
<DependentUpon>LegacySettingWindow.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.vb">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="LegacyUpdateWindow.xaml.vb">
<DependentUpon>LegacyUpdateWindow.xaml</DependentUpon>
</Compile>
<Page Include="Page\AboutPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Page\SettingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Page\UpdatePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Import Include="System.Threading.Tasks" />
Expand Down Expand Up @@ -202,10 +209,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ClosedXML">
<Version>0.102.2</Version>
<Version>0.102.3</Version>
</PackageReference>
<PackageReference Include="DocumentFormat.OpenXml">
<Version>3.0.1</Version>
<Version>2.20.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version>
Expand All @@ -220,5 +227,8 @@
<Version>8.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Module\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
20 changes: 20 additions & 0 deletions src/ClassTable/FunctionWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Window x:Class="FunctionWindow"
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"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Background="{Binding AppBackgroundColorBrush}"
Foreground="{Binding AppForegroundColorBrush}"
Title="ClassTable - 功能窗口" Height="180" Width="320" AllowsTransparency="True"
WindowStyle="None" Topmost="True" Icon="Resource/Icons/AppIcon.ico">
<Window.DataContext>
<local:AppProperty/>
</Window.DataContext>
<Grid>
<Frame x:Name="MainFrame" Source="Page/SettingPage.xaml" NavigationUIVisibility="Hidden"/>
</Grid>
</Window>
21 changes: 21 additions & 0 deletions src/ClassTable/FunctionWindow.xaml.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Public Class FunctionWindow
Public Sub ChangeToSetting()
MainFrame.Navigate(New Uri("Page/SettingPage.xaml", UriKind.Relative))
End Sub
Public Sub ChangeToAbout()
MainFrame.Navigate(New Uri("Page/AboutPage.xaml", UriKind.Relative))
End Sub
Public Sub ChangeToUpdate()
MainFrame.Navigate(New Uri("Page/UpdatePage.xaml", UriKind.Relative))
End Sub
Public Sub HideFunctionWindow()
Hide()
End Sub
Private Sub FunctionWindow_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
Hide()
e.Cancel = True
End Sub
Private Sub LegacySettingWindow_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs) Handles Me.MouseLeftButtonDown
DragMove()
End Sub
End Class
13 changes: 0 additions & 13 deletions src/ClassTable/LegacyAboutWindow.xaml.vb

This file was deleted.

26 changes: 0 additions & 26 deletions src/ClassTable/LegacyUpdateWindow.xaml

This file was deleted.

24 changes: 12 additions & 12 deletions src/ClassTable/Library/ExcelManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ Public Class ExcelManager
Dim TableSheet As IXLWorksheet = TableWorkBook.Worksheet(Sheet)
Dim TableString As String
TableString =
"{" + "RangeA" + ":" + Chr(34) & TableSheet.Cell("A3").Value & Chr(34) + "," +
"RangeB" + ":" + Chr(34) & TableSheet.Cell("A4").Value & Chr(34) + "," +
"RangeC" + ":" + Chr(34) & TableSheet.Cell("A5").Value & Chr(34) + "," +
"RangeD" + ":" + Chr(34) & TableSheet.Cell("A6").Value & Chr(34) + "," +
"RangeE" + ":" + Chr(34) & TableSheet.Cell("A7").Value & Chr(34) + "," +
"RangeF" + ":" + Chr(34) & TableSheet.Cell("A8").Value & Chr(34) + "," +
"RangeG" + ":" + Chr(34) & TableSheet.Cell("A10").Value & Chr(34) + "," +
"RangeH" + ":" + Chr(34) & TableSheet.Cell("A11").Value & Chr(34) + "," +
"RangeI" + ":" + Chr(34) & TableSheet.Cell("A12").Value & Chr(34) + "," +
"RangeJ" + ":" + Chr(34) & TableSheet.Cell("A13").Value & Chr(34) + "," +
"RangeK" + ":" + Chr(34) & TableSheet.Cell("A14").Value & Chr(34) + "," +
"RangeL" + ":" + Chr(34) & TableSheet.Cell("A15").Value & Chr(34) + "}"
"{" + "RangeA" + ":" + Chr(34) & TableSheet.Cell("A3").Value.ToString & Chr(34) + "," +
"RangeB" + ":" + Chr(34) & TableSheet.Cell("A4").Value.ToString & Chr(34) + "," +
"RangeC" + ":" + Chr(34) & TableSheet.Cell("A5").Value.ToString & Chr(34) + "," +
"RangeD" + ":" + Chr(34) & TableSheet.Cell("A6").Value.ToString & Chr(34) + "," +
"RangeE" + ":" + Chr(34) & TableSheet.Cell("A7").Value.ToString & Chr(34) + "," +
"RangeF" + ":" + Chr(34) & TableSheet.Cell("A8").Value.ToString & Chr(34) + "," +
"RangeG" + ":" + Chr(34) & TableSheet.Cell("A10").Value.ToString & Chr(34) + "," +
"RangeH" + ":" + Chr(34) & TableSheet.Cell("A11").Value.ToString & Chr(34) + "," +
"RangeI" + ":" + Chr(34) & TableSheet.Cell("A12").Value.ToString & Chr(34) + "," +
"RangeJ" + ":" + Chr(34) & TableSheet.Cell("A13").Value.ToString & Chr(34) + "," +
"RangeK" + ":" + Chr(34) & TableSheet.Cell("A14").Value.ToString & Chr(34) + "," +
"RangeL" + ":" + Chr(34) & TableSheet.Cell("A15").Value.ToString & Chr(34) + "}"
Return TableString
TableWorkBook.Dispose()
FileStream.Dispose()
Expand Down
2 changes: 1 addition & 1 deletion src/ClassTable/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Window x:Class="LegacySidebarWindow"
<Window x:Class="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"
Expand Down
Loading

0 comments on commit 8e4c6ff

Please sign in to comment.