-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 87f6a44
Showing
82 changed files
with
1,712 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31515.178 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesktopClock", "DesktopClock\DesktopClock.csproj", "{220621AB-9CDB-4EC3-A3EA-C7CD2C8384FD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{220621AB-9CDB-4EC3-A3EA-C7CD2C8384FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{220621AB-9CDB-4EC3-A3EA-C7CD2C8384FD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{220621AB-9CDB-4EC3-A3EA-C7CD2C8384FD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{220621AB-9CDB-4EC3-A3EA-C7CD2C8384FD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {91489923-CF1C-4D9C-8F63-DC8A7B1F5045} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
// Use IntelliSense to find out which attributes exist for C# debugging | ||
// Use hover for the description of the existing attributes | ||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md | ||
"name": ".NET Core Launch (console)", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "build", | ||
// If you have changed target frameworks, make sure to update the program path. | ||
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/DesktopClock.dll", | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console | ||
"console": "internalConsole", | ||
"stopAtEntry": false | ||
}, | ||
{ | ||
"name": ".NET Core Attach", | ||
"type": "coreclr", | ||
"request": "attach" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"build", | ||
"${workspaceFolder}/DesktopClock.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "publish", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"publish", | ||
"${workspaceFolder}/DesktopClock.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "watch", | ||
"command": "dotnet", | ||
"type": "process", | ||
"args": [ | ||
"watch", | ||
"run", | ||
"${workspaceFolder}/DesktopClock.csproj", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"problemMatcher": "$msCompile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="DesktopClock.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:DesktopClock" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace DesktopClock | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Windows; | ||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<UseWPF>true</UseWPF> | ||
<ApplicationIcon>Clock.ico</ApplicationIcon> | ||
<StartupObject>DesktopClock.App</StartupObject> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<WarningLevel>5</WarningLevel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="ILMerge" Version="3.0.41" /> | ||
</ItemGroup> | ||
|
||
<Target Name="AfterResolveReferences"> | ||
<ItemGroup> | ||
<EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'"> | ||
<LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName> | ||
</EmbeddedResource> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup /> | ||
<ItemGroup> | ||
<ApplicationDefinition Update="App.xaml"> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Update="MainWindow.xaml"> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<Window x:Class="DesktopClock.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" | ||
xmlns:local="clr-namespace:DesktopClock" | ||
mc:Ignorable="d" | ||
WindowStyle="None" ResizeMode="NoResize" | ||
Background="{x:Null}" | ||
AllowsTransparency="True" | ||
MouseLeftButtonDown="Window_MouseLeftButtonDown" | ||
Title="MainWindow" Height="190" Width="278"> | ||
<Window.ContextMenu> | ||
<ContextMenu> | ||
<MenuItem Header="Quit" Click="AppExit"/> | ||
</ContextMenu> | ||
</Window.ContextMenu> | ||
<Grid Background="{x:Null}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="2*"/> | ||
<RowDefinition Height="2*"/> | ||
<RowDefinition Height="1*"/> | ||
</Grid.RowDefinitions> | ||
<Label Grid.Row="0" x:Name="Label_ModernClock" Content="24 : 60 : 60" | ||
VerticalAlignment="Center" HorizontalAlignment="Center" | ||
FontFamily="Constantia" Foreground="#161a52" | ||
FontSize="50"/> | ||
<Label Grid.Row="1" x:Name="Chinese_Clock" Content="子初 阳气始萌" | ||
VerticalAlignment="Center" HorizontalAlignment="Center" | ||
FontFamily="STSong" Foreground="#161a52" | ||
FontSize="30"/> | ||
<Label Grid.Row="2" x:Name="Label_Date" Content="07-07-19" | ||
VerticalAlignment="Center" HorizontalAlignment="Center" | ||
FontFamily="Constantia" Foreground="#7546c2" | ||
FontSize="20"/> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using System.Windows.Threading; | ||
|
||
namespace DesktopClock | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
DispatcherTimer _Timer = new DispatcherTimer(); | ||
string[] _ChineseHour = null; | ||
|
||
|
||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
|
||
_ChineseHour = new string[] | ||
{ | ||
"丑初", "丑正", "寅初", "寅正", "卯初", "卯正", "辰初", "辰正", | ||
"巳初", "巳正 大荒落", "午初 阳气炽盛", "午正 阴阳交相", "未初", "未正", "申初", "申正", | ||
"酉初", "酉正", "戌初", "戌正", "亥初", "亥正", "子初", "子正 阳气始萌", | ||
}; | ||
_Timer.Interval = TimeSpan.FromSeconds(1); | ||
_Timer.Tick += new EventHandler(Update_Time); | ||
_Timer.Start(); | ||
|
||
} | ||
|
||
private void Update_Time(object sender, EventArgs e) | ||
{ | ||
//throw new NotImplementedException(); | ||
this.Label_ModernClock.Content = $"{DateTime.Now.Hour.ToString("00")} : {DateTime.Now.Minute.ToString("00")} : {DateTime.Now.Second.ToString("00")}"; | ||
this.Chinese_Clock.Content = _ChineseHour[DateTime.Now.Hour == 24 ? 0 : DateTime.Now.Hour - 1]; | ||
this.Label_Date.Content = $"{DateTime.Now.Month.ToString("00")}-{DateTime.Now.Day.ToString("00")}-{DateTime.Now.Year.ToString("00").Substring(2,2)}"; // Substring 从第二位开始取两位 | ||
} | ||
|
||
private void AppExit(object sender, RoutedEventArgs e) | ||
{ | ||
Application.Current.Shutdown(); | ||
} | ||
|
||
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) | ||
{ | ||
base.OnMouseLeftButtonDown(e); | ||
|
||
// Begin drag the window | ||
this.DragMove(); | ||
} | ||
|
||
} | ||
} |
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
DesktopClock/bin/Debug/netcoreapp3.1/DesktopClock.deps.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"runtimeTarget": { | ||
"name": ".NETCoreApp,Version=v3.1", | ||
"signature": "" | ||
}, | ||
"compilationOptions": {}, | ||
"targets": { | ||
".NETCoreApp,Version=v3.1": { | ||
"DesktopClock/1.0.0": { | ||
"dependencies": { | ||
"ILMerge": "3.0.41" | ||
}, | ||
"runtime": { | ||
"DesktopClock.dll": {} | ||
} | ||
}, | ||
"ILMerge/3.0.41": {} | ||
} | ||
}, | ||
"libraries": { | ||
"DesktopClock/1.0.0": { | ||
"type": "project", | ||
"serviceable": false, | ||
"sha512": "" | ||
}, | ||
"ILMerge/3.0.41": { | ||
"type": "package", | ||
"serviceable": true, | ||
"sha512": "sha512-u9n45xs40bSGoNFcmMYJkh3zkGYKR4BqzQaX2uHc2Ay4drdiQOTeo/1ECps3ttDXOu4Q6qbTnsIbQWb/06ShqA==", | ||
"path": "ilmerge/3.0.41", | ||
"hashPath": "ilmerge.3.0.41.nupkg.sha512" | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
DesktopClock/bin/Debug/netcoreapp3.1/DesktopClock.runtimeconfig.dev.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"runtimeOptions": { | ||
"additionalProbingPaths": [ | ||
"C:\\Users\\seanw\\.dotnet\\store\\|arch|\\|tfm|", | ||
"C:\\Users\\seanw\\.nuget\\packages", | ||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", | ||
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet" | ||
] | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
DesktopClock/bin/Debug/netcoreapp3.1/DesktopClock.runtimeconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"runtimeOptions": { | ||
"tfm": "netcoreapp3.1", | ||
"framework": { | ||
"name": "Microsoft.WindowsDesktop.App", | ||
"version": "3.1.0" | ||
} | ||
} | ||
} |
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
DesktopClock/bin/Release/DesktopClock/DesktopClock.deps.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"runtimeTarget": { | ||
"name": ".NETCoreApp,Version=v3.1", | ||
"signature": "" | ||
}, | ||
"compilationOptions": {}, | ||
"targets": { | ||
".NETCoreApp,Version=v3.1": { | ||
"DesktopClock/1.0.0": { | ||
"dependencies": { | ||
"ILMerge": "3.0.41" | ||
}, | ||
"runtime": { | ||
"DesktopClock.dll": {} | ||
} | ||
}, | ||
"ILMerge/3.0.41": {} | ||
} | ||
}, | ||
"libraries": { | ||
"DesktopClock/1.0.0": { | ||
"type": "project", | ||
"serviceable": false, | ||
"sha512": "" | ||
}, | ||
"ILMerge/3.0.41": { | ||
"type": "package", | ||
"serviceable": true, | ||
"sha512": "sha512-u9n45xs40bSGoNFcmMYJkh3zkGYKR4BqzQaX2uHc2Ay4drdiQOTeo/1ECps3ttDXOu4Q6qbTnsIbQWb/06ShqA==", | ||
"path": "ilmerge/3.0.41", | ||
"hashPath": "ilmerge.3.0.41.nupkg.sha512" | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
DesktopClock/bin/Release/DesktopClock/DesktopClock.runtimeconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"runtimeOptions": { | ||
"tfm": "netcoreapp3.1", | ||
"framework": { | ||
"name": "Microsoft.WindowsDesktop.App", | ||
"version": "3.1.0" | ||
} | ||
} | ||
} |
Oops, something went wrong.