Skip to content

Commit f180fa8

Browse files
committed
修改名称及安装程序图标
1 parent b850022 commit f180fa8

File tree

10 files changed

+55
-29
lines changed

10 files changed

+55
-29
lines changed

TCSetup/TCSetup.vdproj

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
}
2222
"Entry"
2323
{
24+
"MsmKey" = "8:_9BF8F60AD5F2474D82994CD2D95F44A1"
25+
"OwnerKey" = "8:_UNDEFINED"
26+
"MsmSig" = "8:_UNDEFINED"
27+
}
28+
"Entry"
29+
{
2430
"MsmKey" = "8:_B7C31D1C4E42443D89CA87F9596A43B7"
2531
"OwnerKey" = "8:_UNDEFINED"
2632
"MsmSig" = "8:_UNDEFINED"
@@ -127,6 +133,26 @@
127133
}
128134
"File"
129135
{
136+
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9BF8F60AD5F2474D82994CD2D95F44A1"
137+
{
138+
"SourcePath" = "8:..\\TimeControl\\icons8_sand_watch.ico"
139+
"TargetName" = "8:icons8_sand_watch.ico"
140+
"Tag" = "8:"
141+
"Folder" = "8:_57FF55C0487B4507A7ADC64F8E5966A5"
142+
"Condition" = "8:"
143+
"Transitive" = "11:FALSE"
144+
"Vital" = "11:TRUE"
145+
"ReadOnly" = "11:FALSE"
146+
"Hidden" = "11:FALSE"
147+
"System" = "11:FALSE"
148+
"Permanent" = "11:FALSE"
149+
"SharedLegacy" = "11:FALSE"
150+
"PackageAs" = "3:1"
151+
"Register" = "3:1"
152+
"Exclude" = "11:FALSE"
153+
"IsDependency" = "11:FALSE"
154+
"IsolateTo" = "8:"
155+
}
130156
}
131157
"FileType"
132158
{
@@ -183,15 +209,15 @@
183209
{
184210
"Name" = "8:Microsoft Visual Studio"
185211
"ProductName" = "8:TimeControl"
186-
"ProductCode" = "8:{BB3E5E5C-6F52-48B4-893C-57EB236F23D6}"
187-
"PackageCode" = "8:{65B804AE-9561-4656-8793-2FB8B8BEBCDF}"
212+
"ProductCode" = "8:{9EE926BC-8A8C-4684-A53E-1EF64E1537E1}"
213+
"PackageCode" = "8:{1E6EC692-5BBF-4CB3-B4B3-5DE3068A184B}"
188214
"UpgradeCode" = "8:{A7DC5BC4-7E3E-4B58-A0AD-3C9AC9F873C1}"
189215
"AspNetVersion" = "8:4.0.30319.0"
190216
"RestartWWWService" = "11:FALSE"
191217
"RemovePreviousVersions" = "11:TRUE"
192218
"DetectNewerInstalledVersion" = "11:TRUE"
193219
"InstallAllUsers" = "11:FALSE"
194-
"ProductVersion" = "8:3.1.1"
220+
"ProductVersion" = "8:3.1.2"
195221
"Manufacturer" = "8:SamHou"
196222
"ARPHELPTELEPHONE" = "8:"
197223
"ARPHELPLINK" = "8:"
@@ -201,7 +227,7 @@
201227
"Keywords" = "8:"
202228
"ARPCOMMENTS" = "8:TimeControl安装程序"
203229
"ARPURLINFOABOUT" = "8:"
204-
"ARPPRODUCTICON" = "8:"
230+
"ARPPRODUCTICON" = "8:_9BF8F60AD5F2474D82994CD2D95F44A1"
205231
"ARPIconIndex" = "3:0"
206232
"SearchPath" = "8:"
207233
"UseSystemSearchPath" = "11:TRUE"
@@ -379,7 +405,7 @@
379405
"Target" = "8:_B7C31D1C4E42443D89CA87F9596A43B7"
380406
"Folder" = "8:_EF355E43AD4E49F3B0AE27E1F063797B"
381407
"WorkingFolder" = "8:_57FF55C0487B4507A7ADC64F8E5966A5"
382-
"Icon" = "8:"
408+
"Icon" = "8:_9BF8F60AD5F2474D82994CD2D95F44A1"
383409
"Feature" = "8:"
384410
}
385411
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_5426797F4F7D48478759844D9558460B"
@@ -393,7 +419,7 @@
393419
"Target" = "8:_B7C31D1C4E42443D89CA87F9596A43B7"
394420
"Folder" = "8:_24D444A51FBD4D6AB659A544BB198230"
395421
"WorkingFolder" = "8:_57FF55C0487B4507A7ADC64F8E5966A5"
396-
"Icon" = "8:"
422+
"Icon" = "8:_9BF8F60AD5F2474D82994CD2D95F44A1"
397423
"Feature" = "8:"
398424
}
399425
}
@@ -797,7 +823,7 @@
797823
{
798824
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_5003B007B32D429B83CC5372AB9FC0AF"
799825
{
800-
"SourcePath" = "8:..\\TimeControlConsole\\obj\\x64\\Release\\net6.0-windows10.0.22000.0\\apphost.exe"
826+
"SourcePath" = "8:..\\TimeControlConsole\\obj\\Release\\net6.0-windows10.0.22000.0\\apphost.exe"
801827
"TargetName" = "8:"
802828
"Tag" = "8:"
803829
"Folder" = "8:_57FF55C0487B4507A7ADC64F8E5966A5"
@@ -825,7 +851,7 @@
825851
}
826852
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_B7C31D1C4E42443D89CA87F9596A43B7"
827853
{
828-
"SourcePath" = "8:..\\TimeControl\\obj\\x64\\Release\\net6.0-windows10.0.22000.0\\apphost.exe"
854+
"SourcePath" = "8:..\\TimeControl\\obj\\Release\\net6.0-windows10.0.22000.0\\apphost.exe"
829855
"TargetName" = "8:"
830856
"Tag" = "8:"
831857
"Folder" = "8:_57FF55C0487B4507A7ADC64F8E5966A5"

TimeControl/ListController.cs renamed to TimeControl/AppController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99

1010
namespace TimeControl
1111
{
12-
public class ListController
12+
public class AppController
1313
{
14-
private FileStream fileStream = new(TimeControlFile.tcTimeFileLocation,
14+
private FileStream fileStream = new(TimeControlFile.TimeFileLocation,
1515
FileMode.OpenOrCreate,
1616
FileAccess.ReadWrite, FileShare.None);
1717
private StreamWriter streamWriter;
1818
private ListBox listBox;
1919
private List<App> apps;
2020
private Timer timer;
2121

22-
public ListController(ListBox listBox, Timer timer)
22+
public AppController(ListBox listBox, Timer timer)
2323
{
2424
streamWriter = new(fileStream);
2525
this.listBox = listBox;

TimeControl/ControlPanel.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TimeControl/ControlPanel.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ public partial class ControlPanel : Form
1919
private bool hide = false;//指示启动后是否需要隐藏
2020
private bool isClosable = false;//指示当前是否可以关闭
2121
private int unlockPasswordHash = 0;//密码哈希值,用作比对
22-
private ListController controller;//列表、计时控制器
22+
private AppController controller;//列表、计时控制器
2323
public ControlPanel(bool hide)
2424
{
2525
InitializeComponent();
2626
this.hide = hide;
27-
if (File.Exists(TimeControlFile.tcPassLocation))//加载密码哈希值
27+
if (File.Exists(TimeControlFile.PassLocation))//加载密码哈希值
2828
{
29-
unlockPasswordHash = Convert.ToInt32(File.ReadAllText(TimeControlFile.tcPassLocation));
29+
unlockPasswordHash = Convert.ToInt32(File.ReadAllText(TimeControlFile.PassLocation));
3030
PasswordSet();
3131
}
3232
controller = new(usageBox, processMonitorTimer);
@@ -140,8 +140,8 @@ private void ControlPanel_Shown(object sender, EventArgs e)//启动隐藏参数
140140
private void UnloackPasswordSetButton_Click(object sender, EventArgs e)//保存密码
141141
{
142142
unlockPasswordHash = unlockPasswordBox.Text.GetHashCode();//保存哈希值
143+
File.WriteAllText(TimeControlFile.PassLocation, unlockPasswordHash.ToString());//保存哈希值到文件
143144
PasswordSet();
144-
File.WriteAllText(TimeControlFile.tcPassLocation, unlockPasswordHash.ToString());//保存哈希值到文件
145145
}
146146
private void PasswordSet()//密码设置后调用
147147
{
@@ -150,7 +150,7 @@ private void PasswordSet()//密码设置后调用
150150
unloackPasswordSetButton.Enabled = false;
151151
}
152152

153-
private void clearButton_Click(object sender, EventArgs e)//移除所有的已添加窗口
153+
private void ClearButton_Click(object sender, EventArgs e)//移除所有的已添加窗口
154154
{
155155
if (PasswordCheck())
156156
{

TimeControl/LimitWarningWindow.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TimeControl/LimitWarningWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public LimitWarningWindow(LimitedApp warningApp)
2020
this.warningApp = warningApp;
2121
}
2222

23-
private void closeButton_Click(object sender, EventArgs e)
23+
private void CloseButton_Click(object sender, EventArgs e)
2424
{
2525
warningApp.Ban();//禁用掉app
2626
Close();

TimeControl/PasswordInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private void OkButton_Click(object sender, EventArgs e)
2525
{
2626
if (passwordTextBox.Text.GetHashCode()==passwordHash)
2727
{
28-
File.Delete(TimeControlFile.tcPassLocation);
28+
File.Delete(TimeControlFile.PassLocation);
2929
DialogResult = DialogResult.OK;
3030
Close();
3131
}

TimeControl/TimeControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
66
<UseWindowsForms>true</UseWindowsForms>
77
<Authors>SamHou</Authors>
8-
<Version>3.1.1</Version>
8+
<Version>3.1.2</Version>
99
<StartupObject>TimeControl.Program</StartupObject>
1010
<AssemblyVersion></AssemblyVersion>
1111
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>

TimeControl/TimeControlFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace TimeControl
88
{
99
internal class TimeControlFile
1010
{
11-
public static readonly string tcPassLocation = Environment.GetFolderPath
11+
public static readonly string PassLocation = Environment.GetFolderPath
1212
(Environment.SpecialFolder.ApplicationData) + "\\TCPass.txt";//获取密码位置
13-
public static readonly string tcTimeFileLocation = Environment.GetFolderPath
13+
public static readonly string TimeFileLocation = Environment.GetFolderPath
1414
(Environment.SpecialFolder.ApplicationData) + "\\TCTimeData.txt";
1515
}
1616
}

TimeControl/TimeInput.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ namespace TimeControl
1212
{
1313
public partial class TimeInput : Form
1414
{
15-
private ListController listController;
15+
private AppController appController;
1616
private readonly string appName;
1717
/// <summary>
1818
/// 创建一个新的输入窗口,并添加进程
1919
/// </summary>
20-
/// <param name="listController">进程列表控制器,用于添加进程</param>
20+
/// <param name="appController">进程列表控制器,用于添加进程</param>
2121
/// <param name="appName">需要添加进程的名称</param>
22-
public TimeInput(ListController listController, string appName)
22+
public TimeInput(AppController appController, string appName)
2323
{
2424
InitializeComponent();
25-
this.listController = listController;
25+
this.appController = appController;
2626
this.appName = appName;
2727
}
2828

2929
private void OkButton_Click(object sender, EventArgs e)
3030
{
3131
if (timeBox.Value == 0)
3232
{
33-
listController.AddByName(appName);
33+
appController.AddByName(appName);
3434
}
3535
else
3636
{
37-
listController.AddByName(appName, Convert.ToInt32(timeBox.Value));
37+
appController.AddByName(appName, Convert.ToInt32(timeBox.Value));
3838
}
3939
Close();
4040
}

0 commit comments

Comments
 (0)