123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734 |
- using lyfzAttendance.Controller;
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace lyfzAttendance
- {
- public partial class frmMain : LYFZ.ComponentLibrary.BaseContentsFormMain
- {
- private int nTimes = 0;
- private object objlock = new object();
- private string AdminPassword { get; set; } = "";
- List<Model.UserInfo> listUser = new List<Model.UserInfo>();
- System.Windows.Forms.Timer timerAutoUpload = new System.Windows.Forms.Timer();
- static LogHelper log = new LogHelper(typeof(frmMain));
- public frmMain()
- {
- InitializeComponent();
- // 托盘必须禁用关闭窗口;
- this.IsCloseForm = false;
- this.btnAppFormExit.Click += BtnAppFormExit_Click1;
- // 按钮事件;
- this.btnAppFormMenu.Click += BtnAppFormMenu_Click;
- this.btnAppFormExit.Click += BtnAppFormExit_Click;
- this.btn_Connect.Click += Btn_Connect_Click;
- this.btn_DisConnect.Click += Btn_DisConnect_Click;
- this.btn_clear_all_log.Click += Btn_clear_all_log_Click;
- this.btn_upload_log.Click += Btn_upload_log_Click;
- this.btn_get_all_log.Click += Btn_get_all_log_Click;
- this.btn_InitMachine.Click += Btn_InitMachine_Click;
- this.btn_Import.Click += Btn_Import_Click;
- this.btn_Export.Click += Btn_Export_Click;
- this.btn_BenumbAllManager.Click += Btn_BenumbAllManager_Click;
- this.cb_autoupload.CheckedChanged += Cb_autoupload_CheckedChanged;
- // 定时器;
- timerAutoUpload.Interval = 15000;
- timerAutoUpload.Enabled = false;
- timerAutoUpload.Tick += TimerAutoUpload_Tick;
- // 设置按钮tooltip提示;
- SetButtonToolTip();
- if (IsAutoRun())
- this.toolStripMenuItemAuto.Checked = true;
- }
- /// <summary>
- /// 是否开机启动;
- /// </summary>
- /// <returns></returns>
- public bool IsAutoRun()
- {
- try
- {
- bool run = false;
- string path = Application.ExecutablePath;
- Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;
- Microsoft.Win32.RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
- string[] ValueNames = rk2.GetValueNames();
- foreach (string valueName in ValueNames)
- {
- if (valueName == "lyfzAttendanceEx")
- {
- run = true;
- break;
- }
- }
- return run;
- }
- catch { }
- return false;
- }
- /// <summary>
- /// 设置开机启动;
- /// </summary>
- /// <param name="run"></param>
- public void SetAutoRun(bool run = true)
- {
- try
- {
- if (run) //设置开机自启动
- {
- string path = Application.ExecutablePath;
- Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;
- Microsoft.Win32.RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
- rk2.SetValue("lyfzAttendanceEx", path);
- rk2.Close();
- rk.Close();
- }
- else //取消开机自启动
- {
- string path = Application.ExecutablePath;
- Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine;
- Microsoft.Win32.RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
- rk2.DeleteValue("lyfzAttendanceEx", false);
- rk2.Close();
- rk.Close();
- }
- }
- catch { }
- }
- private void SetButtonToolTip()
- {
- #region btn_Connect按钮;
- ToolTip tip_Connect = new ToolTip();
- tip_Connect.AutoPopDelay = 5000;
- tip_Connect.InitialDelay = 100;
- tip_Connect.ShowAlways = true;
- tip_Connect.ReshowDelay = 100;
- tip_Connect.SetToolTip(this.btn_Connect, "连接指纹机设备.");
- #endregion
- #region btn_DisConnect 按钮;
- ToolTip tip_DisConnect = new ToolTip();
- tip_DisConnect.AutoPopDelay = 5000;
- tip_DisConnect.InitialDelay = 100;
- tip_DisConnect.ShowAlways = true;
- tip_DisConnect.ReshowDelay = 100;
- tip_DisConnect.SetToolTip(this.btn_DisConnect, "断开指纹机设备连接.");
- #endregion
- #region btn_clear_all_log 按钮;
- ToolTip tip_ClearAll = new ToolTip();
- tip_ClearAll.AutoPopDelay = 5000;
- tip_ClearAll.InitialDelay = 100;
- tip_ClearAll.ShowAlways = true;
- tip_ClearAll.ReshowDelay = 100;
- tip_ClearAll.SetToolTip(this.btn_clear_all_log, "清空指纹机所有的进出记录.");
- #endregion
- #region btn_InitMachine 按钮;
- ToolTip tip_InitMachine = new ToolTip();
- tip_InitMachine.AutoPopDelay = 5000;
- tip_InitMachine.InitialDelay = 100;
- tip_InitMachine.ShowAlways = true;
- tip_InitMachine.ReshowDelay = 100;
- tip_InitMachine.SetToolTip(this.btn_InitMachine, "指纹机初始化,恢复出厂设置.");
- #endregion
- #region btn_Import 按钮;
- ToolTip tip_Import = new ToolTip();
- tip_Import.AutoPopDelay = 5000;
- tip_Import.InitialDelay = 100;
- tip_Import.ShowAlways = true;
- tip_Import.ReshowDelay = 100;
- tip_Import.SetToolTip(this.btn_Import, "导入备份好的指纹机进出记录Json文件到列表中.");
- #endregion
- #region btn_Export 按钮;
- ToolTip tip_Export = new ToolTip();
- tip_Export.AutoPopDelay = 5000;
- tip_Export.InitialDelay = 100;
- tip_Export.ShowAlways = true;
- tip_Export.ReshowDelay = 100;
- tip_Export.SetToolTip(this.btn_Export, "将列表中的指纹机记录备份到Json文件中.");
- #endregion
- #region btn_BenumbAllManager 按钮;
- ToolTip tip_BenumbAllManager = new ToolTip();
- tip_BenumbAllManager.AutoPopDelay = 5000;
- tip_BenumbAllManager.InitialDelay = 100;
- tip_BenumbAllManager.ShowAlways = true;
- tip_BenumbAllManager.ReshowDelay = 100;
- tip_BenumbAllManager.SetToolTip(this.btn_BenumbAllManager, "清除指纹机所有管理员权限.");
- #endregion
- }
- /// <summary>
- /// 去除指纹机所有管理员权限;
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Btn_BenumbAllManager_Click(object sender, EventArgs e)
- {
- frmAuthority dlg = new frmAuthority(AdminPassword);
- if (dlg.ShowDialog() != DialogResult.OK)
- return;
- if (ClientProcess.Attendance.IsConnected)
- {
- if (ClientProcess.Attendance.BenumbAllManager())
- {
- MessageBox.Show("去除指纹机管理员权限成功……");
- }
- else
- {
- MessageBox.Show("去除指纹机管理员权限失败……");
- }
- }
- }
- private void BtnAppFormExit_Click1(object sender, EventArgs e)
- {
- this.btnAppFormMinimize_Click(sender, e);
- }
- private void Btn_Export_Click(object sender, EventArgs e)
- {
- List<lyfzAttendanceLib.GeneralLogData> list = new List<lyfzAttendanceLib.GeneralLogData>();
- foreach (DataGridViewRow dgr in this.dataGridView1.Rows)
- {
- list.Add((lyfzAttendanceLib.GeneralLogData)dgr.Tag);
- }
- string savePath = LYFZ.WinAPI.CustomPublicMethod.GetFullDirectoryPath(System.Windows.Forms.Application.StartupPath) + "指纹记录备份";
- if (!Directory.Exists(savePath))
- {
- Directory.CreateDirectory(savePath);
- }
- try
- {
- string strJson = JsonConvert.SerializeObject(list);
- File.WriteAllText(string.Format("{0}\\{1}.json", savePath, DateTime.Now.ToString("yyyyMMddHHmmss")), strJson);
- MessageBox.Show("保存成功");
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private void Btn_Import_Click(object sender, EventArgs e)
- {
- OpenFileDialog dialog = new OpenFileDialog();
- dialog.Multiselect = true;//该值确定是否可以选择多个文件
- dialog.Title = "请选择文件夹";
- dialog.Filter = "指纹机记录(*.json)|*.json";
- if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- string file = dialog.FileName;
- try
- {
- string strJson = File.ReadAllText(file);
- List<lyfzAttendanceLib.GeneralLogData> list = JsonConvert.DeserializeObject<List<lyfzAttendanceLib.GeneralLogData>>(strJson);
- AppendDataToList(list, true);
- }
- catch (Exception ex)
- {
- }
- }
- }
- private void TimerAutoUpload_Tick(object sender, EventArgs e)
- {
- lock (objlock)
- {
- log.LogDebug("定时任务");
- if (ClientProcess.Attendance.IsConnected)
- {
- List<lyfzAttendanceLib.GeneralLogData> list = ClientProcess.Attendance.GetEnrollLogData(lyfzAttendanceLib.ReadMark.ReadNew);
- if (list != null)
- {
- #region 插入到列表中,同时上传
- Model.UserInfo user = null;
- foreach (lyfzAttendanceLib.GeneralLogData glog in list)
- {
- bool bStatus = false;
- #region 上传到服务器
- if (GetUserInfo(glog.EnrollNumber.ToString()) != null)
- {
- AttendanceController controller = new AttendanceController();
- controller.CurrentModel.no = glog.EnrollNumber.ToString();
- controller.CurrentModel.datetime = glog.EnrollDateTime;
- bStatus = controller.Add("");
- }
- #endregion
- DataGridViewRow dgr = new DataGridViewRow();
- dgr.Tag = glog;
- dgr.CreateCells(this.dataGridView1);
- user = GetUserInfo(glog.EnrollNumber.ToString());
- if (user != null)
- {
- dgr.Cells[0].Value = user.User_EmployeeID;
- dgr.Cells[1].Value = user.User_Name;
- dgr.Cells[2].Value = user.User_Sex;
- log.LogInfo("实时提交:" + user.User_Name + "," + glog.EnrollNumber.ToString() + "," + glog.EnrollDateTime);
- }
- else
- {
- dgr.Cells[0].Value = "查无此人";
- dgr.Cells[1].Value = "查无此人";
- dgr.Cells[2].Value = "查无此人";
- log.LogInfo("实时提交:查无此人" + "," + glog.EnrollNumber.ToString() + "," + glog.EnrollDateTime);
- }
- dgr.Cells[3].Value = glog.EnrollNumber.ToString();
- dgr.Cells[4].Value = glog.EnrollDateTime;
- dgr.Cells[5].Value = bStatus ? "成功" : "失败";
- this.dataGridView1.Rows.Add(dgr);
- }
- this.lab_count.Text = string.Format("记录数:{0} 条", this.dataGridView1.Rows.Count);
- #endregion
- }
- }
- else
- {
- if (nTimes > 10)
- {
- nTimes = 0;
- ClientProcess.Attendance.Connect();
- }
- else
- nTimes++;
- }
- }
- }
- private void Cb_autoupload_CheckedChanged(object sender, EventArgs e)
- {
- this.dataGridView1.Rows.Clear();
- if (this.cb_autoupload.Checked == true)
- {
- timerAutoUpload.Enabled = true;
- this.btn_upload_log.Enabled = false;
- }
- else
- {
- timerAutoUpload.Enabled = false;
- this.btn_upload_log.Enabled = true;
- }
- }
- private void Btn_InitMachine_Click(object sender, EventArgs e)
- {
- frmAuthority dlg = new frmAuthority(AdminPassword);
- if (dlg.ShowDialog() != DialogResult.OK)
- return;
- if (ClientProcess.Attendance.IsConnected)
- {
- if (ClientProcess.Attendance.ClearKeeperData())
- {
- MessageBox.Show("初始化指纹机成功……");
- log.LogInfo("初始化指纹机成功");
- }
- else
- {
- MessageBox.Show("初始化指纹机失败……");
- log.LogInfo("初始化指纹机成功失败");
- }
- }
- }
- private void Btn_get_all_log_Click(object sender, EventArgs e)
- {
- if (this.cb_autoupload.Checked == true)
- {
- timerAutoUpload.Enabled = false;
- this.cb_autoupload.Checked = false;
- this.btn_upload_log.Enabled = true;
- }
- #region 获取员工信息
- listUser.Clear();
- UserInfoController controller = new UserInfoController();
- DataSet ds = controller.GetAllList();
- if (ds != null)
- {
- Model.UserInfo user = new Model.UserInfo();
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- user = controller.DataRowToModel(dr);
- listUser.Add(user);
- }
- }
- #endregion
- GetEnrollLogData(lyfzAttendanceLib.ReadMark.ReadAll);
- }
- private void Btn_upload_log_Click(object sender, EventArgs e)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate (object obj, BackgroundWorker backgroundWorker)
- {
- backgroundWorker.ReportProgress(0, "正在上传指纹数据,请稍等...");
- foreach (DataGridViewRow dgr in this.dataGridView1.Rows)
- {
- bool bStatus = false;
- lyfzAttendanceLib.GeneralLogData glog = (lyfzAttendanceLib.GeneralLogData)dgr.Tag;
- if (GetUserInfo(glog.EnrollNumber.ToString()) != null)
- {
- AttendanceController controller = new AttendanceController();
- controller.CurrentModel.no = glog.EnrollNumber.ToString();
- controller.CurrentModel.datetime = glog.EnrollDateTime;
- bStatus = controller.Add("");
- }
- dgr.Cells[5].Value = bStatus ? "成功" : "失败";
- }
- });
- MessageBox.Show("上传完成");
- }
- private void Btn_clear_all_log_Click(object sender, EventArgs e)
- {
- frmAuthority dlg = new frmAuthority(AdminPassword);
- if (dlg.ShowDialog() != DialogResult.OK)
- return;
- if (ClientProcess.Attendance.IsConnected)
- {
- if (ClientProcess.Attendance.EmptyGeneralLogData())
- {
- MessageBox.Show("清空指纹机进出记录成功……");
- }
- else
- {
- MessageBox.Show("清空指纹机进出记录失败……");
- }
- }
- }
- private void Btn_DisConnect_Click(object sender, EventArgs e)
- {
- if (ClientProcess.Attendance.IsConnected)
- {
- ClientProcess.Attendance.DisConnect();
- this.btn_Connect.Enabled = true;
- this.btn_DisConnect.Enabled = false;
- log.LogInfo("断开设备连接");
- }
- }
- private void Btn_Connect_Click(object sender, EventArgs e)
- {
- try
- {
- if (ClientProcess.DeviceConfig.MachineType == (int)lyfzAttendanceLib.DeviceType.Old)
- {
- ClientProcess.Attendance = new lyfzAttendanceLib.Machine710C(ClientProcess.DeviceConfig);
- }
- else
- {
- ClientProcess.Attendance = new lyfzAttendanceLib.MachineAoXin(ClientProcess.DeviceConfig);
- }
- if (!ClientProcess.Attendance.IsConnected)
- {
- if (ClientProcess.Attendance.Connect())
- {
- this.btn_Connect.Enabled = false;
- this.btn_DisConnect.Enabled = true;
- MessageBox.Show("连接设备成功");
- }
- else
- {
- this.btn_Connect.Enabled = true;
- this.btn_DisConnect.Enabled = false;
- MessageBox.Show("连接设备失败");
- }
- }
- }
- catch (Exception ex)
- {
- if (ClientProcess.DeviceConfig.MachineType == lyfzAttendanceLib.DeviceType.New)
- {
- if (lyfzAttendanceLib.MachineAoXin.DllRegisterServer() >= 0)
- {
- }
- else
- {
- MessageBox.Show("注册ocx失败,请手动注册FP_CLOCK.ocx控件");
- }
- }
- }
- }
- private void BtnAppFormMenu_Click(object sender, EventArgs e)
- {
- frmMachineConfig dlg = new frmMachineConfig();
- dlg.ShowDialog();
- }
- private void BtnAppFormExit_Click(object sender, EventArgs e)
- {
- ClientProcess.DisConnect();
- }
- private Model.UserInfo GetUserInfo(string enrollNumber)
- {
- if (this.listUser != null)
- {
- foreach (Model.UserInfo user in this.listUser)
- {
- if (user.User_FirstFingerprintID == enrollNumber || user.User_SecondaryFingerprintID == enrollNumber)
- {
- return user;
- }
- }
- }
- return null;
- }
- private void GetEnrollLogData(lyfzAttendanceLib.ReadMark readMark)
- {
- if (ClientProcess.Attendance.IsConnected)
- {
- List<lyfzAttendanceLib.GeneralLogData> list = ClientProcess.Attendance.GetEnrollLogData(readMark);
- AppendDataToList(list, true);
- }
- else
- {
- MessageBox.Show("指纹机未连接,请连接设备");
- }
- }
- private void AppendDataToList(List<lyfzAttendanceLib.GeneralLogData> list, bool isClearDataGridView)
- {
- if (list != null)
- {
- if (isClearDataGridView)
- this.dataGridView1.Rows.Clear();
- Model.UserInfo user = null;
- foreach (lyfzAttendanceLib.GeneralLogData glog in list)
- {
- DataGridViewRow dgr = new DataGridViewRow();
- dgr.Tag = glog;
- dgr.CreateCells(this.dataGridView1);
- user = GetUserInfo(glog.EnrollNumber.ToString());
- if (user != null)
- {
- dgr.Cells[0].Value = user.User_EmployeeID;
- dgr.Cells[1].Value = user.User_Name;
- dgr.Cells[2].Value = user.User_Sex;
- }
- else
- {
- dgr.Cells[0].Value = "查无此人";
- dgr.Cells[1].Value = "查无此人";
- dgr.Cells[2].Value = "查无此人";
- }
- dgr.Cells[3].Value = glog.EnrollNumber.ToString();
- dgr.Cells[4].Value = glog.EnrollDateTime;
- this.dataGridView1.Rows.Add(dgr);
- }
- this.lab_count.Text = string.Format("记录数:{0} 条", this.dataGridView1.Rows.Count);
- }
- }
- private void frmMain_Load(object sender, EventArgs e)
- {
- #region 连接服务器
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate (object obj, BackgroundWorker backgroundWorker)
- {
- int i = 10;
- bool ret = false;
- string result = "";
- backgroundWorker.ReportProgress(0, "正在连接服务器...");
- do
- {
- ret = ClientProcess.Connect(out result);
- if (!ret)
- System.Threading.Thread.Sleep(15000);
- if (i-- < 0 )
- break;
- }while (!ret);
- if ( !ret )
- LYFZ.MessageBoxCustom.Show(result);
- });
- if (ClientProcess.ConnectStatus == false)
- {
- this.Close();
- return;
- }
- #endregion
- #region 获取员工信息
- UserInfoController controller = new UserInfoController();
- DataSet ds = controller.GetAllList();
- if (ds != null)
- {
- Model.UserInfo user = new Model.UserInfo();
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- user = controller.DataRowToModel(dr);
- if (user.User_Account == "admin")
- AdminPassword = user.User_Password;
- listUser.Add(user);
- }
- }
- #endregion
- try
- {
- #region 尝试连接设备
- ClientProcess.LoadMachineConfig();
- if (ClientProcess.DeviceConfig.MachineType == (int)lyfzAttendanceLib.DeviceType.Old)
- {
- ClientProcess.Attendance = new lyfzAttendanceLib.Machine710C(ClientProcess.DeviceConfig);
- }
- else
- {
- ClientProcess.Attendance = new lyfzAttendanceLib.MachineAoXin(ClientProcess.DeviceConfig);
- }
- #if DEBUG
- int i = 1;
- #else
- int i = 5;
- #endif
- bool ret = false;
- do
- {
- ret = ClientProcess.Attendance.Connect();
- if (!ret) System.Threading.Thread.Sleep(5000);
- if (i-- < 0)
- break;
- } while (!ret);
- if ( ret )
- {
- this.btn_Connect.Enabled = false;
- log.LogInfo("连接设备成功");
- }
- else
- {
- this.btn_DisConnect.Enabled = false;
- log.LogInfo("连接设备失败");
- }
- #endregion
- }
- catch (Exception ex)
- {
- if (ClientProcess.DeviceConfig.MachineType == lyfzAttendanceLib.DeviceType.New)
- {
- if (lyfzAttendanceLib.MachineAoXin.DllRegisterServer() >= 0)
- {
- }
- else
- {
- MessageBox.Show("注册ocx失败,请手动注册FP_CLOCK.ocx控件");
- }
- }
- }
- this.cb_autoupload.Checked = true;
- timerAutoUpload.Enabled = true;
- this.btn_upload_log.Enabled = false;
- }
- #region 托盘效果
- private void mainNotifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- if (this.Visible)
- {
- this.WindowState = FormWindowState.Minimized;
- this.mainNotifyIcon.Visible = true;
- this.Hide();
- }
- else
- {
- this.Visible = true;
- this.WindowState = FormWindowState.Normal;
- this.Activate();
- }
- }
- private void toolStripMenuItemNormal_Click(object sender, EventArgs e)
- {
- this.Visible = true;
- this.WindowState = FormWindowState.Normal;
- this.Activate();
- }
- private void toolStripMenuItemQuit_Click(object sender, EventArgs e)
- {
- if (MessageBox.Show("你确定要退出?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
- {
- this.mainNotifyIcon.Visible = false;
- this.Close();
- this.Dispose();
- System.Environment.Exit(System.Environment.ExitCode);
- }
- }
- private void frmMain_SizeChanged(object sender, EventArgs e)
- {
- if (this.WindowState == FormWindowState.Minimized)
- {
- this.Hide();
- this.mainNotifyIcon.Visible = true;
- this.ShowInTaskbar = false;//取消窗体在任务栏的显示
- }
- }
- private void toolStripMenuItemAuto_Click(object sender, EventArgs e)
- {
- if (toolStripMenuItemAuto.Checked)
- SetAutoRun();
- else
- SetAutoRun(false);
- }
- #endregion
- }
- }
|