Exemplo n.º 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); }
 }
Exemplo n.º 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); }
 }
Exemplo n.º 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); }
 }
Exemplo n.º 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); }
 }
Exemplo n.º 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); }
 }
Exemplo n.º 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); }
 }
Exemplo n.º 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); }
        }
Exemplo n.º 8
0
 public void OnProcessActionActivatedted(object sender, EventArgs e)
 {
     try { MainUI.Click_SaveProject(false); }
     catch (Exception ex) { Error.Report("OnSaveActionActivated", ex); }
 }
Exemplo n.º 9
0
 public void OnDeleteEvent(object sender, DeleteEventArgs a)
 {
     try { a.RetVal = MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("OnDeleteEvent", ex); }
 }
Exemplo n.º 10
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); }
 }
Exemplo n.º 11
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); }
 }
Exemplo n.º 12
0
 public void OnBrightnessScaleValueChanged(object sender, EventArgs e)
 {
     try { MainUI.Click_BrightnessSlider(BrightnessScale.Value); }
     catch (Exception ex) { Error.Report("OnBrightnessScaleValueChanged", ex); }
 }
Exemplo n.º 13
0
 public void OnReloadActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_RefreshMetadata(); }
     catch (Exception ex) { Error.Report("OnReloadActionActivated", ex); }
 }
Exemplo n.º 14
0
 public void OnFrameSelectScaleValueChanged(object sender, EventArgs e)
 {
     try { RefreshImages(); }
     catch (Exception ex) { Error.Report("OnFrameSelectScaleValueChanged", ex); }
 }
Exemplo n.º 15
0
 public void OnQuitActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Quit(ClosingReason.User); }
     catch (Exception ex) { Error.Report("OnQuitActionActivated", ex); }
 }
Exemplo n.º 16
0
 public void OnResetGraphButtonClicked(object sender, EventArgs e)
 {
     try { MainUI.MainGraph.Reset(); }
     catch (Exception ex) { Error.Report("OnResetGraphButtonClicked", ex); }
 }
Exemplo n.º 17
0
 public void OnAddActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_AddFrames(); }
     catch (Exception ex) { Error.Report("OnAddActionActivated", ex); }
 }
Exemplo n.º 18
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); }
 }
Exemplo n.º 19
0
 public void OnOpenActionActivated(object sender, EventArgs e)
 {
     try { MainUI.Click_OpenProject(); }
     catch (Exception ex) { Error.Report("OnOpenActionActivated", ex); }
 }
Exemplo n.º 20
0
 public void OnThumbEditButtonClicked(object sender, EventArgs e)
 {
     try { MainUI.Click_ThumbEdit(); }
     catch (Exception ex) { Error.Report("OnThumbEditButtonClicked", ex); }
 }
Exemplo n.º 21
0
 public void OnCancelActionActivated(object sender, EventArgs e)
 {
     try { ProjectManager.Cancel(); }
     catch (Exception ex) { Error.Report("OnCancelActionActivated", ex); }
 }