Exemple #1
0
 public void OnExposeEvent(object sender, ExposeEventArgs a)
 {
     try { if (MainNotebook.CurrentPage == (int)TabLocation.Graph)
           {
               MainUI.MainGraph.RefreshGraph();
           }
     }
     catch (Exception ex) { Error.Report("OnExposeEvent", ex); }
 }
Exemple #2
0
 public void OnAboutActionActivated(object sender, EventArgs e)
 {
     try
     {
         MyAboutDialog dlg = new MyAboutDialog();
         dlg.Run();
         dlg.Destroy();
     }
     catch (Exception ex) { Error.Report("OnAboutActionActivated", ex); }
 }
Exemple #3
0
 public void OnPreferencesActionActivated(object sender, EventArgs e)
 {
     try
     {
         MySettingsDialog dlg = new MySettingsDialog();
         dlg.Run();
         dlg.Destroy();
         MainUI.SettingsChanged();
     }
     catch (Exception ex) { Error.Report("OnPreferencesActionActivated", ex); }
 }
Exemple #4
0
 public void OnYmovScaleValueChanged(object sender, EventArgs e)
 {
     try
     {
         /*if (fixThumb.Pixbuf != null && alignThumb.Pixbuf != null)
          * {
          *      YmovLabel.Text = Message.GetString("Y Movement:") + " " + ((int)YmovScale.Value).ToString() + "%";
          *      ProjectManager.SetYMovement((int)YmovScale.Value);
          *      int movementAbs = (int)(fixThumb.Pixbuf.Height * YmovScale.Value / 100);
          *      MoveAlignment.TopPadding = (uint)((fixThumb.Pixbuf.Height * 75 / 100) + movementAbs);
          * }*/
     }
     catch (Exception ex) { Error.Report("OnYmovScaleValueChanged", ex); }
 }
Exemple #5
0
 public void FileTree_CursorChanged(object sender, EventArgs e)
 {
     try
     {
         if (FileTree.Selection.GetSelectedRows().Length > 0)
         {
             UpdateRow(FileTree.Selection.GetSelectedRows()[0]);
         }
         if (MainNotebook.CurrentPage == (int)TabLocation.Filelist)
         {
             ThumbViewList.Pixbuf = GtkHelper.ConvertToPixbuf(ProjectManager.CurrentProject.GetThumb(SelectedRow).ScaleW(160));
         }
     }
     catch (Exception ex) { Error.Report("FileTree CursorChanged", ex); }
 }
Exemple #6
0
 public void OnCalcTypeCoBoxChanged(object sender, EventArgs e)
 {
     try
     {
         /*switch (CalcTypeCoBox.Active)
          * {
          *      case 0:
          *              LSSettings.BrCalcType = BrightnessCalcType.Advanced;
          *              break;
          *      case 1:
          *              LSSettings.BrCalcType = BrightnessCalcType.Simple;
          *              break;
          *      case 2:
          *              LSSettings.BrCalcType = BrightnessCalcType.Exif;
          *              break;
          * }*/
     }
     catch (Exception ex) { Error.Report("OnCalcTypeCoBoxChanged", ex); }
 }
Exemple #7
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); }
        }
Exemple #8
0
 private void HandleUnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     Error.Report("Unhandled Exception", (Exception)e.ExceptionObject);
 }
Exemple #9
0
 public void OnOpenActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_OpenProject(); }
     catch (Exception ex) { Error.Report("OnOpenActionActivated", ex); }
 }
Exemple #10
0
 public void OnQuitActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("OnQuitActionActivated", ex); }
 }
Exemple #11
0
 public void OnDeleteEvent(object sender, DeleteEventArgs a)
 {
     try { a.RetVal = MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("OnDeleteEvent", ex); }
 }
Exemple #12
0
 private void KeyframeCell_Toggled(object o, ToggledArgs args)
 {
     try { MainUI.Click_KeyframeToggle(GetIndex(new TreePath(args.Path)), GetToggleState(new TreePath(args.Path), TableLocation.Keyframe)); }
     catch (Exception ex) { Error.Report("Keyframecell toggled", ex); }
 }
Exemple #13
0
 private void CellEdited(object o, EditedArgs args)
 {
     try { MainUI.UpdateBrightness(GetIndex(new TreePath(args.Path)), args.NewText); }
     catch (Exception ex) { Error.Report("Cell edited", ex); }
 }
Exemple #14
0
 public void OnProcessActionActivatedted(object sender, EventArgs e)
 {
     try { MainUI.Click_SaveProject(false); }
     catch (Exception ex) { Error.Report("OnSaveActionActivated", ex); }
 }
Exemple #15
0
 public void OnBrightnessScaleValueChanged(object sender, EventArgs e)
 {
     try { MainUI.Click_BrightnessSlider(BrightnessScale.Value); }
     catch (Exception ex) { Error.Report("OnBrightnessScaleValueChanged", ex); }
 }
Exemple #16
0
 public void OnThumbEditButtonClicked(object sender, EventArgs e)
 {
     try { MainUI.Click_ThumbEdit(); }
     catch (Exception ex) { Error.Report("OnThumbEditButtonClicked", ex); }
 }
Exemple #17
0
 public void OnFrameSelectScaleValueChanged(object sender, EventArgs e)
 {
     try { RefreshImages(); }
     catch (Exception ex) { Error.Report("OnFrameSelectScaleValueChanged", ex); }
 }
Exemple #18
0
 public void OnCancelActionActivated(object sender, EventArgs e)
 {
     try { ProjectManager.Cancel(); }
     catch (Exception ex) { Error.Report("OnCancelActionActivated", ex); }
 }
Exemple #19
0
 public void OnReloadActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_RefreshMetadata(); }
     catch (Exception ex) { Error.Report("OnReloadActionActivated", ex); }
 }
Exemple #20
0
 public void OnResetGraphButtonClicked(object sender, EventArgs e)
 {
     try { MainUI.MainGraph.Reset(); }
     catch (Exception ex) { Error.Report("OnResetGraphButtonClicked", ex); }
 }
Exemple #21
0
 public void OnAddActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_AddFrames(); }
     catch (Exception ex) { Error.Report("OnAddActionActivated", ex); }
 }
Exemple #22
0
 public void OnCalculateActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_Calculate(BrightnessCalcType.Advanced); }                //TODO: replace that with actual user selection
     catch (Exception ex) { Error.Report("OnCalculateActionActivated", ex); }
 }