Exemple #1
0
        private void Btn_FormatsAddFormat_Click(object sender, RoutedEventArgs e)
        {
            AddFormatDlg addFormat = new AddFormatDlg();

            addFormat.Closed += new EventHandler(FormatAddFormat_Close);
            addFormat.Show();
        }
Exemple #2
0
        private void InitFormatSelection()
        {
            List <string> formats = ((App)Application.Current).Model.FormatTable.ListBoxSelectionList();

            LB_FormatSelector.DataContext = formats;
            if (formats.Count < 1)
            {
                string           mbMsg            = "There are no formats, would you like to add one?";
                MessageBoxResult messageBoxResult = MessageBox.Show(mbMsg, "Add Format Confirmation", MessageBoxButton.YesNo);
                if (messageBoxResult == MessageBoxResult.Yes)
                {
                    AddFormatDlg AddformatControl = new AddFormatDlg();
                    AddformatControl.Show();
                    return;
                }
            }
            LB_FormatSelector.Items.Clear();
            foreach (string format in formats)
            {
                LB_FormatSelector.Items.Add(format);
            }
        }