void OnFileSelectionOk(object o, EventArgs args) { string filename = window.Filename; FileSelectionEventArgs fa = new FileSelectionEventArgs (filename); if (fh != null) { fh (this, fa); } window.OkButton.Clicked -= new EventHandler (OnFileSelectionOk); window.CancelButton.Clicked -= new EventHandler (OnFileSelectionCancel); fa = null; fh = null; o = null; window.Destroy (); window = null; }
void OnFileSelectionOk(object o, EventArgs args) { string filename = window.Filename; FileSelectionEventArgs fa = new FileSelectionEventArgs(filename); if (fh != null) { fh(this, fa); } window.OkButton.Clicked -= new EventHandler(OnFileSelectionOk); window.CancelButton.Clicked -= new EventHandler(OnFileSelectionCancel); fa = null; fh = null; o = null; window.Destroy(); window = null; }
void OnSaveAsFile (object o, FileSelectionEventArgs args) { int page = sourceFileNotebook.CurrentPage; EditorTab etab = FindEditorTab(page); SaveFile(args.Filename); string basefile = Path.GetFileName (args.Filename); etab.label.Text = basefile; etab.basefilename = basefile; etab.filename = args.Filename; UpdateTitleBar(etab); }
void OnSaveExeOutFile (object o, FileSelectionEventArgs args) { ExecuteSQL (outType, args.Filename, BatchExecuteMode.Command); }
void OnOpenFile (object o, FileSelectionEventArgs args) { EditorTab etab = NewEditorTab(); try { etab.editor.LoadFromFile (args.Filename); } catch(Exception openFileException) { Error("Error: Could not open file: \n" + args.Filename + "\n\nReason: " + openFileException.Message); return; } TextBuffer buf = etab.editor.Buffer; buf.Modified = false; string basefile = Path.GetFileName (args.Filename); etab.label.Text = basefile; etab.basefilename = basefile; etab.filename = args.Filename; sourceFileNotebook.CurrentPage = -1; UpdateTitleBar(etab); o = null; args = null; }