Beispiel #1
0
        public MainWindow()
            : base(Gtk.WindowType.Toplevel)
        {
            try
            {
                this.Build();
                MainUI = new LapseStudioUI(Platform.Unix, this, MsgBox, new GtkFileDialog());

                FileTree.CursorChanged += FileTree_CursorChanged;
                List <Pixbuf> iconlist = new List <Pixbuf>();
                if (File.Exists("Icons/Icon16.png"))
                {
                    iconlist.Add(new Pixbuf("Icons/Icon16.png"));
                }
                if (File.Exists("Icons/Icon32.png"))
                {
                    iconlist.Add(new Pixbuf("Icons/Icon32.png"));
                }
                if (File.Exists("Icons/Icon64.png"))
                {
                    iconlist.Add(new Pixbuf("Icons/Icon64.png"));
                }
                if (File.Exists("Icons/Icon128.png"))
                {
                    iconlist.Add(new Pixbuf("Icons/Icon128.png"));
                }
                if (File.Exists("Icons/Icon256.png"))
                {
                    iconlist.Add(new Pixbuf("Icons/Icon256.png"));
                }
                this.IconList = iconlist.ToArray();

                MainUI.MainGraph = new BrightnessGraph(MainGraph.Allocation.Width, MainGraph.Allocation.Height);
                MainGraph.Init(MainUI.MainGraph);
                MainUI.InitBaseUI();
            }
            catch (Exception ex) { Error.Report("Init", ex); MainUI.Quit(ClosingReason.Error); }
        }
Beispiel #2
0
 public void OnDeleteEvent(object sender, DeleteEventArgs a)
 {
     try { a.RetVal = MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("OnDeleteEvent", ex); }
 }
Beispiel #3
0
 internal void quitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try { MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("quitToolStripMenuItem_Click", ex); }
 }