예제 #1
0
파일: MainWindow.cs 프로젝트: mono/emveepee
 public MainWindow()
     : base(Catalog.GetString ("Mono Visual Profiler"))
 {
     history = History.Load ();
     history.LogFiles.Changed += UpdateRecentLogs;
     history.Configs.Changed += UpdateRepeatSessions;
     DefaultSize = new Gdk.Size (800, 600);
     Gtk.Box box = new Gtk.VBox (false, 0);
     Gtk.UIManager uim = BuildUIManager ();
      			box.PackStart (uim.GetWidget ("/Menubar"), false, false, 0);
      			box.PackStart (uim.GetWidget ("/Toolbar"), false, false, 0);
     UpdateRecentLogs (null, null);
     UpdateRepeatSessions (null, null);
     content_area = new Gtk.VBox (false, 0);
     content_area.Show ();
     box.PackStart (content_area, true, true, 0);
     StartPage start_page = new StartPage (history);
     start_page.Activated += OnStartPageActivated;
     start_page.Show ();
     View = start_page;
     box.ShowAll ();
     Add (box);
 }
예제 #2
0
파일: StartPage.cs 프로젝트: mono/emveepee
 public StartPage(History history)
 {
     this.history = history;
     history.Changed += delegate { Refresh (); };
     CanFocus = true;
     Events = Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.ExposureMask | Gdk.EventMask.KeyPressMask | Gdk.EventMask.PointerMotionMask;
     layout = CreatePangoLayout (String.Empty);
 }
예제 #3
0
파일: History.cs 프로젝트: mono/emveepee
        public static History Load()
        {
            string path = Filename;
            if (!File.Exists (path))
                return new History ();

            History result;
            try {
                XmlSerializer serializer = new XmlSerializer (typeof (History));
                XmlTextReader rdr = new XmlTextReader (path);
                result = (History) serializer.Deserialize (rdr);
                rdr.Close ();
            } catch (Exception) {
                result = new History ();
            }

            return result;
        }