### 2022-03-02更新

------
#### TimeClock    V1.0.2203.0202
- *.[新增]新增自动加载用户音频文件的功能。
This commit is contained in:
紫林软件 2022-03-02 23:07:54 +08:00
parent 3fb4fa4be9
commit 13159fc2d1
14 changed files with 116 additions and 93 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,2 @@
[TimeClock]
hwnd=1195326
hwnd=3673532

Binary file not shown.

View File

@ -1,3 +1,3 @@
<root>
<list id="LastUpdateTime" Value="2022/3/2 20:28:06" />
<list id="LastUpdateTime" Value="2022/3/2 20:51:09" />
</root>

View File

@ -0,0 +1,14 @@
错误描述:无法将类型为“System.String”的对象强制转换为类型“SoundInfo”。
异常堆栈: 在 TimeClock.DbOp.FrmTimeAdd.BtnOK_Click(Object sender, EventArgs e) 位置 E:\我的代码\毕方项目\C#\睿元定时提醒专家\Source\MyTimeClock\TimeClock\DbOp\FrmTimeAdd.cs:行号 606
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 ryControls.ButtonEx.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
异常方法Void BtnOK_Click(System.Object, System.EventArgs)

View File

@ -1,5 +1,10 @@
### 2022-03-02更新
------
#### TimeClock V1.0.2203.0202
- *.[新增]新增自动加载用户音频文件的功能。
### 2022-03-02更新
------
#### TimeClock V1.0.2203.0201
- *.[改进]修复启动出错时无法保存log的bug。

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.2203.0201")]
[assembly: AssemblyFileVersion("2.0.2203.0201")]
[assembly: AssemblyVersion("2.0.2203.0202")]
[assembly: AssemblyFileVersion("2.0.2203.0202")]

View File

@ -283,14 +283,15 @@ namespace TimeClock.DbOp
tStor.SelectNodeBySet();
ChkSound.Checked=tStor.GetAttrValue("sound_on", true);
string sound = tStor.GetAttrValue("sound", @"tip.wav");
if (CbbSound.Items.Contains(sound))
for (int i = 0; i < CbbSound.Items.Count; i++)
{
CbbSound.Text = sound;
var item = (SoundInfo)CbbSound.Items[i];
if(item.Path== sound) { CbbSound.SelectedItem = item; break; }
}
else
if (CbbSound.SelectedIndex==-1)
{
CbbSound.Items.Add(sound);
CbbSound.Text = sound;
CbbSound.Items.Add(new SoundInfo() {Name= sound,Path= sound });
CbbSound.SelectedIndex = CbbSound.Items.Count - 1 ;
}
ChkShowPic.Checked = tStor.GetAttrValue("showpic_on", false);
ImgPath= tStor.GetAttrValue("showpic", "");
@ -603,14 +604,17 @@ namespace TimeClock.DbOp
tStor.SetAttrValue("Pram", CbbPram.Text);
tStor.SetAttrValue("week", week);
tStor.SetAttrValue("sound_on", ChkSound.Checked);
var sound_item = (SoundInfo)CbbSound.SelectedItem;
if (sound_item == null)
{
tStor.SetAttrValue("sound", CbbSound.Text);
}
else
switch(CbbSound.SelectedItem)
{
case SoundInfo sound_item:
tStor.SetAttrValue("sound", sound_item.Path);
break;
case string sound_item:
tStor.SetAttrValue("sound", sound_item);
break;
default:
tStor.SetAttrValue("sound", "");
break;
}
tStor.SetAttrValue("showpic_on", ChkShowPic.Checked);
tStor.SetAttrValue("showpic", pic_path);

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2203.0201")]
[assembly: AssemblyFileVersion("1.0.2203.0201")]
[assembly: AssemblyVersion("1.0.2203.0202")]
[assembly: AssemblyFileVersion("1.0.2203.0202")]