private void btnRemove_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show(Translate.fmt("msg_remove_progs"), App.mName, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) { return; } IDEntry[] Temp = new IDEntry[progGrid.SelectedItems.Count]; progGrid.SelectedItems.CopyTo(Temp, 0); foreach (IDEntry item in Temp) { App.itf.RemoveProgram(Program.guid, item.mID); } }
private void btnSplit_Click(object sender, RoutedEventArgs e) { if (progGrid.SelectedItems.Count == progGrid.Items.Count) { MessageBox.Show(Translate.fmt("msg_no_split_all"), App.mName, MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } IDEntry[] Temp = new IDEntry[progGrid.SelectedItems.Count]; progGrid.SelectedItems.CopyTo(Temp, 0); foreach (IDEntry item in Temp) { App.itf.SplitPrograms(Program.guid, item.mID); } }
private void progGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { IDEntry entry = (progGrid.SelectedItem as IDEntry); if (entry == null) { return; } ProgramWnd progWnd = new ProgramWnd(entry.mID); if (progWnd.ShowDialog() != true) { return; } // no editing }