public override void AwakeFromNib()
        {
            try
            {
                base.AwakeFromNib();

                MainUI           = new LapseStudioUI(Platform.MacOSX, this, new CocoaMessageBox(), new CocoaFileDialog());
                MainUI.MainGraph = new BrightnessGraph((int)MainGraph.FittingSize.Width, (int)MainGraph.FittingSize.Height);
                ((Graph)MainGraph).Init(MainUI.MainGraph);
                MainUI.InitBaseUI();
                Window.Delegate    = new WindowDelegate();
                MainTable.Delegate = new TableDelegate();
                ((TableDelegate)MainTable.Delegate).TableSelectionChanged += HandleTableSelectionChanged;
            }
            catch (Exception ex) { Error.Report("Init", ex); }
        }
Beispiel #2
0
        public MainForm()
        {
            try
            {
                InitializeComponent();
                MsgBox  = new WinFormMessageBox();
                FDialog = new WinFormFileDialog();
                MainUI  = new LapseStudioUI(Platform.Windows, this, MsgBox, FDialog);

                WinFormFileDialog.InitOpenFolderDialog(this);
                AddFileToolButton.Image   = Timelapse_UI.Properties.Resources.Add32;
                CalculateToolButton.Image = Timelapse_UI.Properties.Resources.Calculate32;
                MetadataToolButton.Image  = Timelapse_UI.Properties.Resources.Reload32;
                ProcessToolButton.Image   = Timelapse_UI.Properties.Resources.Save32;
                CancelToolButton.Image    = Timelapse_UI.Properties.Resources.Cancel32;

                MainUI.MainGraph = new BrightnessGraph(MainGraph.Width, MainGraph.Height);
                MainGraph.Init(MainUI.MainGraph);
                MainUI.InitBaseUI();
            }
            catch (Exception ex) { Error.Report("Init", ex); }
        }
Beispiel #3
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); }
        }