Exemplo n.º 1
0
		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;
		}
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
		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);
		}
Exemplo n.º 4
0
		void OnSaveExeOutFile (object o, FileSelectionEventArgs args) 
		{
			ExecuteSQL (outType, args.Filename, BatchExecuteMode.Command);
		}
Exemplo n.º 5
0
		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;
		}