private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { InDesignController.stop(); IllustratorController.stop(); this.notifyIcon1.Visible = false; Application.Exit(); Process[] pary = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName); foreach (Process p in pary) { p.Kill(); } }
private void button2_Click(object sender, EventArgs e) { bool isIndd = checkBox1.Checked; bool isIllustrator = checkBox2.Checked; if (isInddStarted && isIndd) { InDesignController.stop(); isInddStarted = false; this.checkBox1.ForeColor = System.Drawing.Color.OrangeRed; button2.Enabled = false; button1.Enabled = true; } if (isIllustratorStarted && isIllustrator) { IllustratorController.stop(); isIllustratorStarted = false; this.checkBox2.ForeColor = System.Drawing.Color.OrangeRed; button2.Enabled = false; button1.Enabled = true; } }