private void MainForm_Load(object sender, EventArgs e) { contextMenuStrip1.Hide(); notifyIcon1.ContextMenuStrip = contextMenuStrip1; if (string.Empty != Properties.Settings.Default.MonitorProcessName) { AppManager.SetTargetMonitorProcessInfo("none", Properties.Settings.Default.MonitorProcessName, Properties.Settings.Default.MonitorProcessFullName); AppManager.ExistPrevMonitorProcess = true; AppManager.StartMonitorProcessWorkerThread(); tempText = String.Format("Exist the Previously Monitored Process! [{0}]", AppManager.TargetProcessInfo.Name); PrintAndWriteFileWithTime(tempText); } else { AppManager.ExistPrevMonitorProcess = false; } }
public void SetTargetMonitorProcessInfo(ListViewItem.ListViewSubItemCollection subItem) { string[] names = { subItem[2].Text, subItem[0].Text, subItem[3].Text }; _AppManager.SetTargetMonitorProcessInfo(names[0], names[1], names[2]); }