Exemplo n.º 1
0
 public MainForm()
 {
     InitializeComponent();
     protocolElements = new ObservableCollection <ProtocolElementModel>();
     protocolElements.CollectionChanged += ElemenetsCollectionChanged;
     this.Text = "Creator - " + fileName;
     saveToFileButton.ToolTipText = "Нельзя сохранять пустой файл.";
     TemplateProtocol             = CreateTemplate();
     settings = SettingsLogic.GetConfig(Environment.CurrentDirectory + "\\AppSettings.json");
 }
Exemplo n.º 2
0
        private void DefaultFolderBtn_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog folder = new FolderBrowserDialog();

            if (DialogResult.OK == folder.ShowDialog())
            {
                settings.DefaultProtocolPath = folder.SelectedPath;
                SettingsLogic.SetConfig(settings, Environment.CurrentDirectory + "\\AppSettings.json");
            }
            else
            {
                return;
            }
        }