public void attach() { if (!CloudUSB.MainWindow.IsWindowOpened) { CloudUSB.MainWindow.IsWindowOpened = true; main = new MainWindow(); main.Show(); } }
private void TrayIcon_Click(object sender, EventArgs e) { MouseEventArgs me = (MouseEventArgs)e; if (me.Button == MouseButtons.Left) { //if (MainWindow.IsWindowOpend) if (!CloudUSB.MainWindow.IsWindowOpened) { main = new MainWindow(); CloudUSB.MainWindow.IsWindowOpened = true; main.Show(); } else { //System.Windows.MessageBox.Show("already opened"); } } else { } }