private void RAL_Tick(object sender, EventArgs e) { RAL.Stop(); foreach (Process Process in Process.GetProcesses().Where(p => !string.IsNullOrEmpty(p.MainWindowTitle) && Text != p.MainWindowTitle).ToList()) { if (LProcs.ContainsKey(Process.ProcessName)) { if (BPProcs.ContainsKey(Process.ProcessName) && !BPProcs[Process.ProcessName] && PProcs.ContainsKey(Process.ProcessName) && PProcs[Process.ProcessName]) { PProcs[Process.ProcessName] = false; MBProcs[Process.ProcessName] = true; AppPassword AP = new AppPassword(Process.ProcessName, Procs[Process.ProcessName], AppPassword.Type.G); AP.Show(); } } else { LProcs[Process.ProcessName] = Process.ProcessName; panel1.Controls.Add(new RunApp(null, Process.ProcessName, Process.MainWindowTitle, Process.StartInfo.WorkingDirectory) { Dock = DockStyle.Top }); } } RAL.Start(); }
private void LOCK_Click(object sender, EventArgs e) { if (!AppLocker.PProcs.ContainsKey(ANAME)) { AppPassword AP = new AppPassword(ANAME, null, AppPassword.Type.S); AP.ShowDialog(); } }