Esempio n. 1
0
        private void IDReplace(object sender, RoutedEventArgs e)
        {
            if (viewModel.npck == null)
            {
                MessageBox.Show("NPCK not loaded.");
                return;
            }
            InputDialog input = new InputDialog();

            input.LabelA.Content = "Input Wem IDs separated by a comma (,).";
            if (input.ShowDialog() == true)
            {
                input.Close();
                string   IDs = input.Input.Text;
                string[] id2 = IDs.Split(',');
                viewModel.IDReplace(id2);
            }
        }
Esempio n. 2
0
 private void SaveLabels(object sender, CancelEventArgs e)
 {
     if (LabelsChanged)
     {
         //prompt user
         MessageBoxResult saveLabels = MessageBox.Show("Save changed labels?", "", MessageBoxButton.YesNo);
         if (saveLabels == MessageBoxResult.Yes)
         {
             if (currentFileName == null)
             {
                 InputDialog input = new InputDialog();
                 input.LabelA.Content = "Input a filename for the label file.";
                 if (input.ShowDialog() == true)
                 {
                     input.Close();
                     currentFileName = input.Input.Text;
                 }
             }
             viewModel.ExportLabels(mode, currentFileName, changedIds);
         }
     }
     LabelsChanged = false;
 }