private void MenuItem_BoBox_Open(object sender, RoutedEventArgs e) { OpenFileDialog browser = new OpenFileDialog(); browser.ValidateNames = true; browser.Filter = "BoBolang source | *.bobolang;*.txt"; //browser.FilterIndex = 1; bool? result = browser.ShowDialog(); if (result.HasValue && result.Value) { var editor = new Editor.BoBolangEditor(browser.FileName); editor.AtacheToPane(MainDocumentsPane); model.o.Add(editor); } }
private void MenuItem_BoBox_New(object sender, RoutedEventArgs e) { SaveFileDialog browser = new SaveFileDialog(); browser.Filter = "BoBolang source | *.bobolang"; browser.AddExtension = true; browser.OverwritePrompt = true; browser.ValidateNames = true; bool? result = browser.ShowDialog(); if (result.HasValue && result.Value) { var editor = new Editor.BoBolangEditor(browser.FileName); editor.AtacheToPane(MainDocumentsPane); } }