-
Notifications
You must be signed in to change notification settings - Fork 10
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
Showing
13 changed files
with
143 additions
and
166 deletions.
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -42,7 +42,15 @@ private void FrmMain_Load(object sender, EventArgs e) | |
new {Text="不留存", Value=0}, | ||
}; | ||
cboRecordScreen.DisplayMember = "Text"; | ||
cboRecordScreen.ValueMember = "Value"; | ||
cboRecordScreen.ValueMember = "Value"; | ||
|
||
cboImageQuality.DataSource = new[] { | ||
new {Text="最省磁盘", Value=63}, | ||
new {Text="均衡", Value=50}, | ||
new {Text="高质量", Value=40}, | ||
}; | ||
cboImageQuality.DisplayMember = "Text"; | ||
cboImageQuality.ValueMember = "Value"; | ||
} | ||
|
||
private void btnOpen_Click(object sender, EventArgs e) | ||
|
@@ -88,8 +96,7 @@ private void btnOK_Click(object sender, EventArgs e) | |
{ | ||
MessageBox.Show("数据存储位置无效,请重新选择。"); | ||
} | ||
Settings.Default.BufferSeconds = trackBufferSeconds.Value; | ||
Settings.Default.ImageQuality = trackImageQuality.Value; | ||
Settings.Default.ImageQuality = (int) cboImageQuality.SelectedValue; | ||
Settings.Default.RecordScreenDays = (int)cboRecordScreen.SelectedValue; | ||
Settings.Default.Save(); | ||
|
||
|
@@ -130,10 +137,8 @@ private void btnSetting_Click(object sender, EventArgs e) | |
{ | ||
txtDataPath.Text = Settings.Default.DataPath; | ||
} | ||
cboRecordScreen.SelectedValue = Settings.Default.RecordScreenDays; | ||
trackBufferSeconds.Value = Settings.Default.BufferSeconds; | ||
trackImageQuality.Value = Settings.Default.ImageQuality; | ||
trackBufferSeconds_Scroll(null, null); | ||
cboRecordScreen.SelectedValue = Settings.Default.RecordScreenDays; | ||
cboImageQuality.SelectedValue = Settings.Default.ImageQuality; | ||
|
||
using var reg = Registry.CurrentUser.CreateSubKey(regkey); | ||
chkAutoRun.Checked = (reg.GetValue(appname) as string) == Application.ExecutablePath; | ||
|
@@ -144,7 +149,7 @@ private void btnSetting_Click(object sender, EventArgs e) | |
|
||
private void btnAbout_Click(object sender, EventArgs e) | ||
{ | ||
MessageBox.Show($"AppTime桌面时间管理\r\n\r\n联系作者:[email protected]", "关于", MessageBoxButtons.OK, MessageBoxIcon.Information); | ||
MessageBox.Show($"AppTime桌面时间管理\r\nV{Application.ProductVersion}\r\n\r\n联系作者:[email protected]", "关于", MessageBoxButtons.OK, MessageBoxIcon.Information); | ||
} | ||
|
||
private void btnDataPath_Click(object sender, EventArgs e) | ||
|
@@ -153,12 +158,8 @@ private void btnDataPath_Click(object sender, EventArgs e) | |
if(dlg.ShowDialog()== DialogResult.OK) | ||
{ | ||
txtDataPath.Text = dlg.SelectedPath; | ||
} | ||
} | ||
|
||
private void trackBufferSeconds_Scroll(object sender, EventArgs e) | ||
{ | ||
lblBufferSeconds.Text = Math.Round(TimeSpan.FromSeconds(trackBufferSeconds.Value).TotalMinutes) + "分钟"; | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.