跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
新增TaiBug/App.config+6 −0看文件
@@ -0,0 +1,6 @@
1新增:<?xml version="1.0" encoding="utf-8" ?>
2新增:<configuration>
3新增: <startup>
4新增: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5新增: </startup>
6新增:</configuration>
文件末尾没有换行
新增TaiBug/App.xaml+10 −0看文件
@@ -0,0 +1,10 @@
1新增:<Application x:Class="TaiBug.App"
2新增: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4新增: xmlns:local="clr-namespace:TaiBug"
5新增: StartupUri="MainWindow.xaml"
6新增: Startup="OnStartup">
7新增: <Application.Resources>
8新增:
9新增: </Application.Resources>
10新增:</Application>
新增TaiBug/App.xaml.cs+42 −0看文件
@@ -0,0 +1,42 @@
1新增:using System;
2新增:using System.Collections.Generic;
3新增:using System.Configuration;
4新增:using System.Data;
5新增:using System.Linq;
6新增:using System.Threading.Tasks;
7新增:using System.Windows;
8新增:
9新增:namespace TaiBug
10新增:{
11新增: /// <summary>
12新增: /// App.xaml 的交互逻辑
13新增: /// </summary>
14新增: public partial class App : Application
15新增: {
16新增: private System.Threading.Mutex mutex;
17新增:
18新增: private void OnStartup(object sender, StartupEventArgs e)
19新增: {
20新增: // 阻止多开和用户主动启动
21新增: if (e.Args.Length == 0 || IsRuned())
22新增: {
23新增: Shutdown();
24新增: }
25新增: }
26新增: #region 获取当前程序是否已运行
27新增: /// <summary>
28新增: /// 获取当前程序是否已运行
29新增: /// </summary>
30新增: private bool IsRuned()
31新增: {
32新增: bool ret;
33新增: mutex = new System.Threading.Mutex(true, System.Reflection.Assembly.GetEntryAssembly().ManifestModule.Name, out ret);
34新增: if (!ret)
35新增: {
36新增: return true;
37新增: }
38新增: return false;
39新增: }
40新增: #endregion
41新增: }
42新增:}
新增TaiBug/MainWindow.xaml+72 −0看文件
@@ -0,0 +1,72 @@
1新增:<Window x:Class="TaiBug.MainWindow"
2新增: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3新增: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4新增: xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5新增: xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6新增: xmlns:local="clr-namespace:TaiBug"
7新增: mc:Ignorable="d"
8新增: Title="Tai 程序崩溃" Height="372" Width="390" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
9新增: <Grid Margin="10">
10新增: <Grid.Triggers>
11新增: <EventTrigger RoutedEvent="Loaded">
12新增: <BeginStoryboard>
13新增: <Storyboard AutoReverse="True" RepeatBehavior="Forever">
14新增: <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.RenderTransform).
15新增: (TranslateTransform.Y)"
16新增: Storyboard.TargetName="IconGray">
17新增: <EasingDoubleKeyFrame KeyTime="00:00:4.0"
18新增: Value="20" />
19新增: </DoubleAnimationUsingKeyFrames>
20新增: </Storyboard>
21新增: </BeginStoryboard>
22新增: </EventTrigger>
23新增: </Grid.Triggers>
24新增: <StackPanel>
25新增:
26新增: <Image x:Name="IconGray" Width="120"
27新增: HorizontalAlignment="Center" VerticalAlignment="Top" Source="/ghost_gray (320).ico" >
28新增: <Image.Effect>
29新增: <DropShadowEffect BlurRadius="10" Direction="0" ShadowDepth="0" Color="Black" Opacity="0.1"/>
30新增: </Image.Effect>
31新增: <Image.RenderTransform>
32新增: <TranslateTransform Y="0"/>
33新增: </Image.RenderTransform>
34新增:
35新增: </Image>
36新增: <Border Background="#f3f3f3" CornerRadius="6" Padding="10" Margin="0,-50,0,20">
37新增: <Border.Effect>
38新增: <DropShadowEffect BlurRadius="0" Direction="40" ShadowDepth="4" Color="#FFF7F7F7" Opacity="1"/>
39新增: </Border.Effect>
40新增:
41新增: <StackPanel>
42新增: <TextBlock Foreground="Gray" Text="Tai 发生了一个预料之外的错误!" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,0,0,0"/>
43新增: <TextBlock Foreground="Gray" TextWrapping="WrapWithOverflow" FontSize="14" HorizontalAlignment="Center" Margin="0,10,0,0">
44新增: <Run Text="对此非常抱歉!本次崩溃的"/><Hyperlink ToolTip="在资源文件管理器中定位到该日志文件" Click="LogHyperlinkClick">日志</Hyperlink><Run Text="已经保存,如果方便请将它提交给开发者处理,非常谢谢。"/>
45新增: </TextBlock>
46新增: <TextBlock Foreground="Gray" Text="如何给开发者提交日志?" FontSize="14" FontWeight="Bold" HorizontalAlignment="Left" Margin="0,10,0,0"/>
47新增:
48新增: <TextBlock Foreground="Gray" TextWrapping="WrapWithOverflow" FontSize="14" HorizontalAlignment="Left" Margin="0,5,0,0">
49新增: <Run Text="1. 通过"/> <Hyperlink ToolTip="浏览器打开" Click="IssuesHyperlinkClick">Github Issues</Hyperlink>
50新增: </TextBlock>
51新增: <TextBlock Foreground="Gray" TextWrapping="WrapWithOverflow" FontSize="14" HorizontalAlignment="Left" Margin="0,5,0,0">
52新增: <Run Text="2. 通过电子邮件"/> <Hyperlink ToolTip="点击复制开发者邮箱地址" Click="EmailHyperlinkClick">[email protected]</Hyperlink>
53新增: </TextBlock>
54新增: </StackPanel>
55新增: </Border>
56新增:
57新增: </StackPanel>
58新增:
59新增: <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
60新增: <Button Click="Restart">
61新增: <Button.Template>
62新增: <ControlTemplate>
63新增: <Border Background="#2b20d9" Padding="10,10" CornerRadius="4">
64新增: <TextBlock Text="重新启动 Tai" Foreground="White"/>
65新增: </Border>
66新增: </ControlTemplate>
67新增: </Button.Template>
68新增: </Button>
69新增: </StackPanel>
70新增: </Grid>
71新增:
72新增:</Window>
新增TaiBug/MainWindow.xaml.cs+64 −0看文件
@@ -0,0 +1,64 @@
1新增:using System;
2新增:using System.Collections.Generic;
3新增:using System.Diagnostics;
4新增:using System.IO;
5新增:using System.Linq;
6新增:using System.Text;
7新增:using System.Threading.Tasks;
8新增:using System.Windows;
9新增:using System.Windows.Controls;
10新增:using System.Windows.Data;
11新增:using System.Windows.Documents;
12新增:using System.Windows.Input;
13新增:using System.Windows.Media;
14新增:using System.Windows.Media.Imaging;
15新增:using System.Windows.Navigation;
16新增:using System.Windows.Shapes;
17新增:
18新增:namespace TaiBug
19新增:{
20新增: /// <summary>
21新增: /// MainWindow.xaml 的交互逻辑
22新增: /// </summary>
23新增: public partial class MainWindow : Window
24新增: {
25新增: public MainWindow()
26新增: {
27新增: InitializeComponent();
28新增: }
29新增:
30新增: private void LogHyperlinkClick(object sender, RoutedEventArgs e)
31新增: {
32新增: string loggerName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
33新增: "Log", DateTime.Now.ToString("yyyy-MM-dd") + ".log");
34新增: if (File.Exists(loggerName))
35新增: {
36新增: System.Diagnostics.Process.Start("explorer.exe", "/select, " + loggerName);
37新增: }
38新增: }
39新增: private void IssuesHyperlinkClick(object sender, RoutedEventArgs e)
40新增: {
41新增: Process.Start(new ProcessStartInfo("https://github.com/Planshit/Tai/issues/new"));
42新增: }
43新增: private void EmailHyperlinkClick(object sender, RoutedEventArgs e)
44新增: {
45新增: Clipboard.SetText("[email protected]");
46新增: MessageBox.Show("邮箱已复制");
47新增: }
48新增: private void Restart(object sender, RoutedEventArgs e)
49新增: {
50新增: string taiPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
51新增: "Tai.exe");
52新增: if (File.Exists(taiPath))
53新增: {
54新增: Process.Start(taiPath);
55新增: }
56新增: else
57新增: {
58新增: MessageBox.Show("Tai.exe 似乎已被删除", "重启失败提示", MessageBoxButton.OK, MessageBoxImage.Error);
59新增: Process.Start(new ProcessStartInfo("https://github.com/Planshit/Tai"));
60新增: }
61新增: Close();
62新增: }
63新增: }
64新增:}
新增TaiBug/Properties/AssemblyInfo.cs+55 −0看文件
@@ -0,0 +1,55 @@
1新增:using System.Reflection;
2新增:using System.Resources;
3新增:using System.Runtime.CompilerServices;
4新增:using System.Runtime.InteropServices;
5新增:using System.Windows;
6新增:
7新增:// 有关程序集的一般信息由以下
8新增:// 控制。更改这些特性值可修改
9新增:// 与程序集关联的信息。
10新增:[assembly: AssemblyTitle("TaiBug")]
11新增:[assembly: AssemblyDescription("")]
12新增:[assembly: AssemblyConfiguration("")]
13新增:[assembly: AssemblyCompany("")]
14新增:[assembly: AssemblyProduct("TaiBug")]
15新增:[assembly: AssemblyCopyright("Copyright © 2021")]
16新增:[assembly: AssemblyTrademark("")]
17新增:[assembly: AssemblyCulture("")]
18新增:
19新增:// 将 ComVisible 设置为 false 会使此程序集中的类型
20新增://对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
21新增://请将此类型的 ComVisible 特性设置为 true。
22新增:[assembly: ComVisible(false)]
23新增:
24新增://若要开始生成可本地化的应用程序,请设置
25新增://.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
26新增://例如,如果您在源文件中使用的是美国英语,
27新增://使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
28新增://对以下 NeutralResourceLanguage 特性的注释。 更新
29新增://以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30新增:
31新增://[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32新增:
33新增:
34新增:[assembly: ThemeInfo(
35新增: ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36新增: //(未在页面中找到资源时使用,
37新增: //或应用程序资源字典中找到时使用)
38新增: ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39新增: //(未在页面中找到资源时使用,
40新增: //、应用程序或任何主题专用资源字典中找到时使用)
41新增:)]
42新增:
43新增:
44新增:// 程序集的版本信息由下列四个值组成:
45新增://
46新增:// 主版本
47新增:// 次版本
48新增:// 生成号
49新增:// 修订号
50新增://
51新增://可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
52新增://通过使用 "*",如下所示:
53新增:// [assembly: AssemblyVersion("1.0.*")]
54新增:[assembly: AssemblyVersion("1.0.0.0")]
55新增:[assembly: AssemblyFileVersion("1.0.0.0")]
新增TaiBug/Properties/Resources.Designer.cs+71 −0看文件
@@ -0,0 +1,71 @@
1新增://------------------------------------------------------------------------------
2新增:// <auto-generated>
3新增:// 此代码由工具生成。
4新增:// 运行时版本: 4.0.30319.42000
5新增://
6新增:// 对此文件的更改可能导致不正确的行为,如果
7新增:// 重新生成代码,则所做更改将丢失。
8新增:// </auto-generated>
9新增://------------------------------------------------------------------------------
10新增:
11新增:namespace TaiBug.Properties
12新增:{
13新增:
14新增:
15新增: /// <summary>
16新增: /// 强类型资源类,用于查找本地化字符串等。
17新增: /// </summary>
18新增: // 此类是由 StronglyTypedResourceBuilder
19新增: // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20新增: // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21新增: // (以 /str 作为命令选项),或重新生成 VS 项目。
22新增: [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23新增: [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24新增: [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25新增: internal class Resources
26新增: {
27新增:
28新增: private static global::System.Resources.ResourceManager resourceMan;
29新增:
30新增: private static global::System.Globalization.CultureInfo resourceCulture;
31新增:
32新增: [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33新增: internal Resources()
34新增: {
35新增: }
36新增:
37新增: /// <summary>
38新增: /// 返回此类使用的缓存 ResourceManager 实例。
39新增: /// </summary>
40新增: [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41新增: internal static global::System.Resources.ResourceManager ResourceManager
42新增: {
43新增: get
44新增: {
45新增: if ((resourceMan == null))
46新增: {
47新增: global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TaiBug.Properties.Resources", typeof(Resources).Assembly);
48新增: resourceMan = temp;
49新增: }
50新增: return resourceMan;
51新增: }
52新增: }
53新增:
54新增: /// <summary>
55新增: /// 重写当前线程的 CurrentUICulture 属性,对
56新增: /// 使用此强类型资源类的所有资源查找执行重写。
57新增: /// </summary>
58新增: [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59新增: internal static global::System.Globalization.CultureInfo Culture
60新增: {
61新增: get
62新增: {
63新增: return resourceCulture;
64新增: }
65新增: set
66新增: {
67新增: resourceCulture = value;
68新增: }
69新增: }
70新增: }
71新增:}
新增TaiBug/Properties/Resources.resx+117 −0看文件
@@ -0,0 +1,117 @@
1新增:<?xml version="1.0" encoding="utf-8"?>
2新增:<root>
3新增: <!--
4新增: Microsoft ResX Schema
5新增:
6新增: Version 2.0
7新增:
8新增: The primary goals of this format is to allow a simple XML format
9新增: that is mostly human readable. The generation and parsing of the
10新增: various data types are done through the TypeConverter classes
11新增: associated with the data types.
12新增:
13新增: Example:
14新增:
15新增: ... ado.net/XML headers & schema ...
16新增: <resheader name="resmimetype">text/microsoft-resx</resheader>
17新增: <resheader name="version">2.0</resheader>
18新增: <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19新增: <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20新增: <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21新增: <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22新增: <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23新增: <value>[base64 mime encoded serialized .NET Framework object]</value>
24新增: </data>
25新增: <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26新增: <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27新增: <comment>This is a comment</comment>
28新增: </data>
29新增:
30新增: There are any number of "resheader" rows that contain simple
31新增: name/value pairs.
32新增:
33新增: Each data row contains a name, and value. The row also contains a
34新增: type or mimetype. Type corresponds to a .NET class that support
35新增: text/value conversion through the TypeConverter architecture.
36新增: Classes that don't support this are serialized and stored with the
37新增: mimetype set.
38新增:
39新增: The mimetype is used for serialized objects, and tells the
40新增: ResXResourceReader how to depersist the object. This is currently not
41新增: extensible. For a given mimetype the value must be set accordingly:
42新增:
43新增: Note - application/x-microsoft.net.object.binary.base64 is the format
44新增: that the ResXResourceWriter will generate, however the reader can
45新增: read any of the formats listed below.
46新增:
47新增: mimetype: application/x-microsoft.net.object.binary.base64
48新增: value : The object must be serialized with
49新增: : System.Serialization.Formatters.Binary.BinaryFormatter
50新增: : and then encoded with base64 encoding.
51新增:
52新增: mimetype: application/x-microsoft.net.object.soap.base64
53新增: value : The object must be serialized with
54新增: : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55新增: : and then encoded with base64 encoding.
56新增:
57新增: mimetype: application/x-microsoft.net.object.bytearray.base64
58新增: value : The object must be serialized into a byte array
59新增: : using a System.ComponentModel.TypeConverter
60新增: : and then encoded with base64 encoding.
61新增: -->
62新增: <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63新增: <xsd:element name="root" msdata:IsDataSet="true">
64新增: <xsd:complexType>
65新增: <xsd:choice maxOccurs="unbounded">
66新增: <xsd:element name="metadata">
67新增: <xsd:complexType>
68新增: <xsd:sequence>
69新增: <xsd:element name="value" type="xsd:string" minOccurs="0" />
70新增: </xsd:sequence>
71新增: <xsd:attribute name="name" type="xsd:string" />
72新增: <xsd:attribute name="type" type="xsd:string" />
73新增: <xsd:attribute name="mimetype" type="xsd:string" />
74新增: </xsd:complexType>
75新增: </xsd:element>
76新增: <xsd:element name="assembly">
77新增: <xsd:complexType>
78新增: <xsd:attribute name="alias" type="xsd:string" />
79新增: <xsd:attribute name="name" type="xsd:string" />
80新增: </xsd:complexType>
81新增: </xsd:element>
82新增: <xsd:element name="data">
83新增: <xsd:complexType>
84新增: <xsd:sequence>
85新增: <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
86新增: <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
87新增: </xsd:sequence>
88新增: <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
89新增: <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
90新增: <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
91新增: </xsd:complexType>
92新增: </xsd:element>
93新增: <xsd:element name="resheader">
94新增: <xsd:complexType>
95新增: <xsd:sequence>
96新增: <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
97新增: </xsd:sequence>
98新增: <xsd:attribute name="name" type="xsd:string" use="required" />
99新增: </xsd:complexType>
100新增: </xsd:element>
101新增: </xsd:choice>
102新增: </xsd:complexType>
103新增: </xsd:element>
104新增: </xsd:schema>
105新增: <resheader name="resmimetype">
106新增: <value>text/microsoft-resx</value>
107新增: </resheader>
108新增: <resheader name="version">
109新增: <value>2.0</value>
110新增: </resheader>
111新增: <resheader name="reader">
112新增: <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
113新增: </resheader>
114新增: <resheader name="writer">
115新增: <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116新增: </resheader>
117新增:</root>
文件末尾没有换行
新增TaiBug/Properties/Settings.Designer.cs+30 −0看文件
@@ -0,0 +1,30 @@
1新增://------------------------------------------------------------------------------
2新增:// <auto-generated>
3新增:// This code was generated by a tool.
4新增:// Runtime Version:4.0.30319.42000
5新增://
6新增:// Changes to this file may cause incorrect behavior and will be lost if
7新增:// the code is regenerated.
8新增:// </auto-generated>
9新增://------------------------------------------------------------------------------
10新增:
11新增:namespace TaiBug.Properties
12新增:{
13新增:
14新增:
15新增: [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16新增: [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17新增: internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18新增: {
19新增:
20新增: private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21新增:
22新增: public static Settings Default
23新增: {
24新增: get
25新增: {
26新增: return defaultInstance;
27新增: }
28新增: }
29新增: }
30新增:}
新增TaiBug/Properties/Settings.settings+7 −0看文件
@@ -0,0 +1,7 @@
1新增:<?xml version='1.0' encoding='utf-8'?>
2新增:<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
3新增: <Profiles>
4新增: <Profile Name="(Default)" />
5新增: </Profiles>
6新增: <Settings />
7新增:</SettingsFile>
文件末尾没有换行
新增TaiBug/TaiBug.csproj+103 −0看文件
@@ -0,0 +1,103 @@
1新增:<?xml version="1.0" encoding="utf-8"?>
2新增:<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3新增: <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4新增: <PropertyGroup>
5新增: <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6新增: <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7新增: <ProjectGuid>{758D59B2-C438-4DE4-B135-7FF0614FE4B7}</ProjectGuid>
8新增: <OutputType>WinExe</OutputType>
9新增: <RootNamespace>TaiBug</RootNamespace>
10新增: <AssemblyName>TaiBug</AssemblyName>
11新增: <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12新增: <FileAlignment>512</FileAlignment>
13新增: <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14新增: <WarningLevel>4</WarningLevel>
15新增: <Deterministic>true</Deterministic>
16新增: </PropertyGroup>
17新增: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18新增: <PlatformTarget>AnyCPU</PlatformTarget>
19新增: <DebugSymbols>true</DebugSymbols>
20新增: <DebugType>full</DebugType>
21新增: <Optimize>false</Optimize>
22新增: <OutputPath>bin\Debug\</OutputPath>
23新增: <DefineConstants>DEBUG;TRACE</DefineConstants>
24新增: <ErrorReport>prompt</ErrorReport>
25新增: <WarningLevel>4</WarningLevel>
26新增: </PropertyGroup>
27新增: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28新增: <PlatformTarget>AnyCPU</PlatformTarget>
29新增: <DebugType>pdbonly</DebugType>
30新增: <Optimize>true</Optimize>
31新增: <OutputPath>bin\Release\</OutputPath>
32新增: <DefineConstants>TRACE</DefineConstants>
33新增: <ErrorReport>prompt</ErrorReport>
34新增: <WarningLevel>4</WarningLevel>
35新增: </PropertyGroup>
36新增: <PropertyGroup>
37新增: <ApplicationIcon>ghost_gray %28320%29.ico</ApplicationIcon>
38新增: </PropertyGroup>
39新增: <ItemGroup>
40新增: <Reference Include="System" />
41新增: <Reference Include="System.Data" />
42新增: <Reference Include="System.Xml" />
43新增: <Reference Include="Microsoft.CSharp" />
44新增: <Reference Include="System.Core" />
45新增: <Reference Include="System.Xml.Linq" />
46新增: <Reference Include="System.Data.DataSetExtensions" />
47新增: <Reference Include="System.Net.Http" />
48新增: <Reference Include="System.Xaml">
49新增: <RequiredTargetFramework>4.0</RequiredTargetFramework>
50新增: </Reference>
51新增: <Reference Include="WindowsBase" />
52新增: <Reference Include="PresentationCore" />
53新增: <Reference Include="PresentationFramework" />
54新增: </ItemGroup>
55新增: <ItemGroup>
56新增: <ApplicationDefinition Include="App.xaml">
57新增: <Generator>MSBuild:Compile</Generator>
58新增: <SubType>Designer</SubType>
59新增: </ApplicationDefinition>
60新增: <Page Include="MainWindow.xaml">
61新增: <Generator>MSBuild:Compile</Generator>
62新增: <SubType>Designer</SubType>
63新增: </Page>
64新增: <Compile Include="App.xaml.cs">
65新增: <DependentUpon>App.xaml</DependentUpon>
66新增: <SubType>Code</SubType>
67新增: </Compile>
68新增: <Compile Include="MainWindow.xaml.cs">
69新增: <DependentUpon>MainWindow.xaml</DependentUpon>
70新增: <SubType>Code</SubType>
71新增: </Compile>
72新增: </ItemGroup>
73新增: <ItemGroup>
74新增: <Compile Include="Properties\AssemblyInfo.cs">
75新增: <SubType>Code</SubType>
76新增: </Compile>
77新增: <Compile Include="Properties\Resources.Designer.cs">
78新增: <AutoGen>True</AutoGen>
79新增: <DesignTime>True</DesignTime>
80新增: <DependentUpon>Resources.resx</DependentUpon>
81新增: </Compile>
82新增: <Compile Include="Properties\Settings.Designer.cs">
83新增: <AutoGen>True</AutoGen>
84新增: <DependentUpon>Settings.settings</DependentUpon>
85新增: <DesignTimeSharedInput>True</DesignTimeSharedInput>
86新增: </Compile>
87新增: <EmbeddedResource Include="Properties\Resources.resx">
88新增: <Generator>ResXFileCodeGenerator</Generator>
89新增: <LastGenOutput>Resources.Designer.cs</LastGenOutput>
90新增: </EmbeddedResource>
91新增: <None Include="Properties\Settings.settings">
92新增: <Generator>SettingsSingleFileGenerator</Generator>
93新增: <LastGenOutput>Settings.Designer.cs</LastGenOutput>
94新增: </None>
95新增: </ItemGroup>
96新增: <ItemGroup>
97新增: <None Include="App.config" />
98新增: </ItemGroup>
99新增: <ItemGroup>
100新增: <Resource Include="ghost_gray %28320%29.ico" />
101新增: </ItemGroup>
102新增: <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
103新增:</Project>
文件末尾没有换行
新增TaiBug/ghost_gray (320).ico看文件

二进制文件,不显示改动。

修改UI/App.xaml.cs+19 −1看文件
@@ -1,4 +1,5 @@
1删除:using Core.Servicers.Instances;
1新增:using Core.Librarys;
2新增:using Core.Servicers.Instances;
23using Core.Servicers.Interfaces;
34using Microsoft.Extensions.DependencyInjection;
45using System;
@@ -39,11 +40,28 @@ namespace UI
3940 private DefaultWindow mainWindow;
4041 public App()
4142 {
43新增: DispatcherUnhandledException += App_DispatcherUnhandledException;
44新增:
4245 var serviceCollection = new ServiceCollection();
4346 ConfigureServices(serviceCollection);
4447 serviceProvider = serviceCollection.BuildServiceProvider();
4548 }
4649
50新增: private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
51新增: {
52新增: // 记录崩溃错误
53新增: Logger.Error("[程序崩溃异常] " + e.Exception.Message);
54新增:
55新增: e.Handled = true;
56新增:
57新增: Shutdown();
58新增:
59新增: // 显示崩溃弹窗
60新增: string taiBugPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
61新增: "TaiBug.exe");
62新增: ProcessHelper.Run(taiBugPath, new string[] { string.Empty });
63新增: }
64新增:
4765 #region 获取当前程序是否已运行
4866 /// <summary>
4967 /// 获取当前程序是否已运行