LoadProject() public static method

public static LoadProject ( string file ) : void
file string
return void
Beispiel #1
0
        void OpenFile(object obj, EventArgs e)
        {
            FileChooserDialog dialog =
                new FileChooserDialog(Catalog.GetString(Catalog.GetString("Open Stetic File")), null, FileChooserAction.Open,
                                      Gtk.Stock.Cancel, Gtk.ResponseType.Cancel,
                                      Gtk.Stock.Open, Gtk.ResponseType.Ok);
            int response = dialog.Run();

            if (response == (int)Gtk.ResponseType.Ok)
            {
                SteticMain.LoadProject(dialog.Filename);
                AddRecentFile(dialog.Filename);
            }
            dialog.Hide();
        }
Beispiel #2
0
        void BuildRecentMenu()
        {
            foreach (Gtk.Widget w in recentFilesMenu)
            {
                recentFilesMenu.Remove(w);
            }

            int n = 0;

            foreach (string f in recentFiles.Files)
            {
                MenuItem m     = new MenuItem("_" + n + " " + Path.GetFileName(f));
                string   fname = f;
                m.Activated += delegate {
                    SteticMain.LoadProject(fname);
                    AddRecentFile(fname);
                };
                recentFilesMenu.Append(m);
                n++;
            }
            recentFilesMenu.ShowAll();
        }