Beispiel #1
0
        protected override void MovePrevius()
        {
            // Create OpenFileDialog
            OpenFileDialog dlg = new OpenFileDialog();



            // Set filter for file extension and default file extension
            dlg.DefaultExt = ".conf";


            // Display OpenFileDialog by calling ShowDialog method
            bool?result = dlg.ShowDialog();


            // Get the selected file name and display in a TextBox
            if (result == true)
            {
                try
                {
                    builder.LoadSettings(dlg.FileName);
                    _reportItems = new ObservableCollection <ReportItem>(builder.ReportItems);
                }
                catch (Exception e)
                {
                    MessageBoxWrapper.Show(e.Message);
                }
                OnPropertyChanged("ReportItems");
            }
        }