示例#1
0
        public void Run()
        {
            Gtk.FileChooserDialog fcd = new Gtk.FileChooserDialog("Open File", null, Gtk.FileChooserAction.Open);
            fcd.AddButton(Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
            fcd.AddButton(Gtk.Stock.Open, Gtk.ResponseType.Ok);
            fcd.DefaultResponse = Gtk.ResponseType.Ok;
            fcd.SelectMultiple  = false;

            Gtk.ResponseType response = (Gtk.ResponseType)fcd.Run();
            if (response == Gtk.ResponseType.Ok)
            {
                TextEditorApp.OpenFile(fcd.Filename);
            }
            fcd.Destroy();
        }
示例#2
0
 public void Run()
 {
     TextEditorApp.NewFile("");
 }
 public void Run()
 {
     TextEditorApp.SaveFile();
 }