Esempio n. 1
0
		void OnFileSelectionOk(object o, EventArgs args) 
		{
			Gtk.Button fsbutton = (Gtk.Button) o;
			string filename = window.Filename;
			FileSelectionEventArgs fa = new FileSelectionEventArgs (filename);
			if (fh != null) {
				fh (this, fa); 
			}
			window.Destroy ();
		}
Esempio n. 2
0
        void OnFileSelectionOk(object o, EventArgs args)
        {
            Gtk.Button             fsbutton = (Gtk.Button)o;
            string                 filename = window.Filename;
            FileSelectionEventArgs fa       = new FileSelectionEventArgs(filename);

            if (fh != null)
            {
                fh(this, fa);
            }
            window.Destroy();
        }
Esempio n. 3
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);
		}
Esempio n. 4
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);
		}
Esempio n. 5
0
		void OnSaveExeOutFile (object o, FileSelectionEventArgs args) 
		{
			ExecuteSQL (outType, args.Filename);
		}