private void MenuItem_Click(object sender, RoutedEventArgs e) { ImageMenu btn = (ImageMenu)e.Source; if (btn.Name == "MenuDir") { Process.Start("explorer.exe", Constants.APP_STARTUP_PATH); } else if (btn.Name == "MenuHosts") { Process.Start("explorer.exe", Constants.HOSTS_DIR); } else { Window showWin = null; if (HasWindowOpened(btn.Name, ref showWin)) { showWin.Activate(); } else { OpenWindow(btn.Name); } } popupMenu.IsOpen = false; e.Handled = true; }
private void MenuItem_Click(object sender, RoutedEventArgs e) { ImageMenu btn = (ImageMenu)e.Source; if (btn.Name == "MenuDir") { Process.Start("explorer.exe", StartupPath); } else { Window showWin = null; if (HasWindowOpened(btn.Name, ref showWin)) { showWin.Activate(); } else { OpenWindow(btn.Name); } } popupMenu.IsOpen = false; e.Handled = true; }