private void button4_Click(object sender, EventArgs e) { RecPathList recPathList = new RecPathList(); string disk = ""; foreach (int i in checkedListBox2.CheckedIndices) { disk += checkedListBox2.Items[i].ToString().Split(new char[] { ':' })[0] + ","; } recPathList.Disk = disk.Substring(0, disk.Length - 1); recPathList.CapacityClear = comboBox1.Text; recPathList.Userfor = "截图"; if (RecPathClass.Update(recPathList)) { MessageBox.Show("保存成功!"); } else { MessageBox.Show("保存成功!"); } }
/// <summary> /// 录像路径存储 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void videoPathSave_Click(object sender, EventArgs e) { RecPathList recPathList = new RecPathList(); string disk = ""; foreach (int i in checkedListBox1.CheckedIndices) { disk += checkedListBox1.Items[i].ToString().Split(new char[] { ':' })[0] + ","; } recPathList.Disk = disk.Substring(0, disk.Length - 1); recPathList.CapacityClear = videoAutoClear.Text; recPathList.Userfor = "录像"; string errorInfo = ""; if (RecPathClass.Update(recPathList, ref errorInfo)) { MessageBox.Show("保存成功!"); } else { MessageBox.Show(errorInfo); } }