Exemplo n.º 1
0
        public CommitInfo()
        {
            InitializeComponent();
            InitializeComplete();

            UICommandsSourceSet += delegate { this.InvokeAsync(() => ReloadCommitInfo()).FileAndForget(); };

            _commitDataManager = new CommitDataManager(() => Module);

            _commitDataBodyRenderer           = new CommitDataBodyRenderer(() => Module, _linkFactory);
            _externalLinksStorage             = new ExternalLinksStorage();
            _effectiveLinkDefinitionsProvider = new ConfiguredLinkDefinitionsProvider(_externalLinksStorage);
            _gitRemoteManager               = new GitRemoteManager(() => Module);
            _externalLinkRevisionParser     = new ExternalLinkRevisionParser(_gitRemoteManager);
            _gitRevisionExternalLinksParser = new GitRevisionExternalLinksParser(_effectiveLinkDefinitionsProvider, _externalLinkRevisionParser);
            _gitDescribeProvider            = new GitDescribeProvider(() => Module);

            RevisionInfo.Font = AppSettings.Font;
            var color = SystemColors.Window.MakeColorDarker(0.04);

            pnlCommitMessage.BackColor  = color;
            rtbxCommitMessage.BackColor = color;

            Hotkeys = HotkeySettingsManager.LoadHotkeys(FormBrowse.HotkeySettingsName);
            addNoteToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeys((int)FormBrowse.Command.AddNotes).ToShortcutKeyDisplayString();
        }
Exemplo n.º 2
0
        public void DidDefaultSettingsChangeTest1()
        {
            // arrange
            HotkeySettings hotkeySettings1 = new HotkeySettings("settings1", new HotkeyCommand(1, "C1"), new HotkeyCommand(2, "C2"));
            HotkeySettings hotkeySettings2 = new HotkeySettings("settings2", new HotkeyCommand(3, "C3"), new HotkeyCommand(4, "C4"));

            var defaultHotkeySettingsArray = new HotkeySettings[2] {
                hotkeySettings1, hotkeySettings2
            };
            var loadedHotkeySettingsArray = new HotkeySettings[2] {
                hotkeySettings1, hotkeySettings2
            };

            // act, assert
            HotkeySettingsManager.DidDefaultSettingsChange(defaultHotkeySettingsArray, loadedHotkeySettingsArray).Should().BeFalse();

            // arrange: add one more settings items
            defaultHotkeySettingsArray = new HotkeySettings[3] {
                hotkeySettings1, hotkeySettings2, hotkeySettings2
            };

            // act, assert
            HotkeySettingsManager.DidDefaultSettingsChange(defaultHotkeySettingsArray, loadedHotkeySettingsArray).Should().BeTrue();

            // act (null handling), assert
            HotkeySettingsManager.DidDefaultSettingsChange(null, defaultHotkeySettingsArray).Should().BeTrue();

            // act (null handling), assert
            HotkeySettingsManager.DidDefaultSettingsChange(defaultHotkeySettingsArray, null).Should().BeTrue();

            // act (null handling), assert
            HotkeySettingsManager.DidDefaultSettingsChange(null, null).Should().BeTrue();
        }
Exemplo n.º 3
0
        private void UpdateText()
        {
            this.Text = keyData.ToText();
            bool unique = HotkeySettingsManager.IsUnique(category, new HotkeyCommand(command.CommandCode, command.Name, keyData));

            this.ForeColor = unique ? Color.Black : Color.DarkRed;
        }
Exemplo n.º 4
0
        public CommitInfo()
        {
            InitializeComponent();
            Translate();
            GitUICommandsSourceSet += (a, uiCommandsSource) =>
            {
                _sortedRefs = null;
            };

            _commitDataManager = new CommitDataManager(() => Module);

            var labelFormatter = new TabbedHeaderLabelFormatter();
            var headerRenderer = new TabbedHeaderRenderStyleProvider();

            _commitDataHeaderRenderer         = new CommitDataHeaderRenderer(labelFormatter, _dateFormatter, headerRenderer, _linkFactory);
            _commitDataBodyRenderer           = new CommitDataBodyRenderer(() => Module, _linkFactory);
            _externalLinksLoader              = new ExternalLinksLoader();
            _effectiveLinkDefinitionsProvider = new ConfiguredLinkDefinitionsProvider(_externalLinksLoader);
            _gitRemoteManager               = new GitRemoteManager(() => Module);
            _externalLinkRevisionParser     = new ExternalLinkRevisionParser(_gitRemoteManager);
            _gitRevisionExternalLinksParser = new GitRevisionExternalLinksParser(_effectiveLinkDefinitionsProvider, _externalLinkRevisionParser);
            _gitDescribeProvider            = new GitDescribeProvider(() => Module);

            RevisionInfo.Font = AppSettings.Font;
            using (Graphics g = CreateGraphics())
            {
                _RevisionHeader.Font = _commitDataHeaderRenderer.GetFont(g);
            }

            _RevisionHeader.SelectionTabs = _commitDataHeaderRenderer.GetTabStops().ToArray();

            Hotkeys = HotkeySettingsManager.LoadHotkeys(FormBrowse.HotkeySettingsName);
            addNoteToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeys((int)FormBrowse.Commands.AddNotes).ToShortcutKeyDisplayString();
        }
Exemplo n.º 5
0
        public CaptureScreenView(CaptureScreen presenter)
        {
            InitializeComponent();
            lblCameraTitle.Text = "";
            lblCameraInfo.Text  = "";
            this.presenter      = presenter;
            ToggleCapturedVideosPanel();
            sldrDelay.ValueChanged       += SldrDelay_ValueChanged;
            sldrRefreshRate.ValueChanged += SldrRefreshRate_ValueChanged;

            lblRefreshRate.Location     = lblDelay.Location;
            sldrRefreshRate.Top         = sldrDelay.Top + 3;
            sldrRefreshRate.Left        = sldrDelay.Left - 15;
            sldrRefreshRate.Width       = sldrDelay.Width / 2;
            sldrRefreshRate.Minimum     = 0;
            sldrRefreshRate.Maximum     = 100;
            sldrRefreshRate.Value       = 100;
            sldrRefreshRate.Sticky      = true;
            sldrRefreshRate.StickyValue = 50;
            btnSlomoSync.Top            = sldrRefreshRate.Top - 5;
            btnSlomoSync.Left           = sldrRefreshRate.Right + 15;
            lblSlomoSync.Top            = lblRefreshRate.Top;
            lblSlomoSync.Left           = btnSlomoSync.Right - 2;

            this.Hotkeys = HotkeySettingsManager.LoadHotkeys("CaptureScreen");
        }
Exemplo n.º 6
0
 public void ReloadHotkeys()
 {
     Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
     fileHistoryToolStripMenuItem.ShortcutKeyDisplayString      = GetShortcutKeyDisplayString(Command.ShowHistory);
     blameToolStripMenuItem1.ShortcutKeyDisplayString           = GetShortcutKeyDisplayString(Command.Blame);
     openWithDifftoolToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.OpenWithDifftool);
     FileText.ReloadHotkeys();
 }
Exemplo n.º 7
0
 public ThumbnailViewerCameras()
 {
     InitializeComponent();
     //RefreshUICulture();
     this.Dock     = DockStyle.Fill;
     refreshImages = true;
     this.Hotkeys  = HotkeySettingsManager.LoadHotkeys("ThumbnailViewerCamera");
 }
Exemplo n.º 8
0
 protected override void OnLoad(EventArgs e)
 {
     if (!DesignMode)
     {
         this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
     }
     Font = Settings.DiffFont;
 }
Exemplo n.º 9
0
 public void ReloadHotkeys()
 {
     Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
     diffDeleteFileToolStripMenuItem.ShortcutKeyDisplayString  = GetShortcutKeyDisplayString(Command.DeleteSelectedFiles);
     fileHistoryDiffToolstripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.ShowHistory);
     blameToolStripMenuItem.ShortcutKeyDisplayString           = GetShortcutKeyDisplayString(Command.Blame);
     firstToSelectedToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.OpenWithDifftool);
     DiffText.ReloadHotkeys();
 }
Exemplo n.º 10
0
        protected override void OnRuntimeLoad(EventArgs e)
        {
            base.OnRuntimeLoad(e);
            _thereWhereMergeConflicts = Module.InTheMiddleOfConflictedMerge();
            merge.Focus();
            merge.Select();

            this.HotkeysEnabled = true;
            this.Hotkeys        = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
        }
Exemplo n.º 11
0
        public FormResolveConflicts()
        {
            InitializeComponent(); Translate();
            ThereWhereMergeConflicts = Settings.Module.InTheMiddleOfConflictedMerge();
            merge.Focus();
            merge.Select();

            this.HotkeysEnabled = true;
            this.Hotkeys        = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
        }
Exemplo n.º 12
0
 public CaptureScreenView(CaptureScreen presenter)
 {
     InitializeComponent();
     lblCameraTitle.Text = "";
     lblCameraInfo.Text  = "";
     this.presenter      = presenter;
     ToggleCapturedVideosPanel();
     sldrDelay.ValueChanged += SldrDelay_ValueChanged;
     this.Hotkeys            = HotkeySettingsManager.LoadHotkeys("CaptureScreen");
 }
Exemplo n.º 13
0
        protected override void OnLoad(EventArgs e)
        {
            if (!DesignMode)
            {
                this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            }
            Font = Settings.DiffFont;

            Settings.WorkingDirChanged += WorkingDirChanged;
            this.Encoding = Settings.FilesEncoding;
        }
Exemplo n.º 14
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(selectedCategory) || selectedCommand == null || selectedCommand.KeyData == tbHotkey.KeyData)
            {
                return;
            }

            selectedCommand.KeyData = tbHotkey.KeyData;
            HotkeySettingsManager.Update(selectedCategory, selectedCommand);
            UpdateCommandView(selectedCategory);
        }
        public void MergeEqualSettings()
        {
            // arrange

            var defaultHotkeySettingsArray = CreateHotkeySettings(2);
            var loadedHotkeySettingsArray  = CreateHotkeySettings(2);

            HotkeySettingsManager.MergeIntoDefaultSettings(defaultHotkeySettingsArray, loadedHotkeySettingsArray);
            var expected = CreateHotkeySettings(2);

            defaultHotkeySettingsArray.SequenceEqual(expected).Should().BeTrue();
        }
Exemplo n.º 16
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(selectedCategory) || selectedCommand == null || selectedCommand.KeyData == Keys.None)
            {
                return;
            }

            selectedCommand.KeyData = Keys.None;
            HotkeySettingsManager.Update(selectedCategory, selectedCommand);
            tbHotkey.SetKeydata(selectedCategory, selectedCommand);
            UpdateCommandView(selectedCategory);
        }
Exemplo n.º 17
0
        public CommitInfo()
        {
            InitializeComponent();
            InitializeComplete();

            UICommandsSourceSet += delegate
            {
                this.InvokeAsync(() =>
                {
                    UICommandsSource.UICommandsChanged += delegate { RefreshSortedTags(); };

                    // call this event handler also now (necessary for "Contained in branches/tags")
                    RefreshSortedTags();
                }).FileAndForget();
            };

            _commitDataManager = new CommitDataManager(() => Module);

            _commitDataBodyRenderer           = new CommitDataBodyRenderer(() => Module, _linkFactory);
            _externalLinksStorage             = new ExternalLinksStorage();
            _effectiveLinkDefinitionsProvider = new ConfiguredLinkDefinitionsProvider(_externalLinksStorage);
            _remotesManager                 = new ConfigFileRemoteSettingsManager(() => Module);
            _externalLinkRevisionParser     = new ExternalLinkRevisionParser(_remotesManager);
            _gitRevisionExternalLinksParser = new GitRevisionExternalLinksParser(_effectiveLinkDefinitionsProvider, _externalLinkRevisionParser);
            _gitDescribeProvider            = new GitDescribeProvider(() => Module);
            _refsFormatter = new RefsFormatter(_linkFactory);

            var messageBackground = KnownColor.Window.MakeBackgroundDarkerBy(0.04);

            pnlCommitMessage.BackColor  = messageBackground;
            rtbxCommitMessage.BackColor = messageBackground;

            rtbxCommitMessage.Font = AppSettings.CommitFont;
            RevisionInfo.Font      = AppSettings.Font;

            Hotkeys = HotkeySettingsManager.LoadHotkeys(FormBrowse.HotkeySettingsName);
            addNoteToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeys((int)FormBrowse.Command.AddNotes).ToShortcutKeyDisplayString();

            _commitMessageResizedSubscription = subscribeToContentsResized(rtbxCommitMessage, CommitMessage_ContentsResized);
            _revisionInfoResizedSubscription  = subscribeToContentsResized(RevisionInfo, RevisionInfo_ContentsResized);

            IDisposable subscribeToContentsResized(RichTextBox richTextBox, Action <ContentsResizedEventArgs> handler) =>
            Observable
            .FromEventPattern <ContentsResizedEventHandler, ContentsResizedEventArgs>(
                h => richTextBox.ContentsResized += h,
                h => richTextBox.ContentsResized -= h)
            .Throttle(TimeSpan.FromMilliseconds(100))
            .ObserveOn(MainThreadScheduler.Instance)
            .Subscribe(_ => handler(_.EventArgs));

            commitInfoHeader.SetContextMenuStrip(commitInfoContextMenuStrip);
        }
Exemplo n.º 18
0
        public FormResolveConflicts(bool offerCommit)
            : base(true)
        {
            InitializeComponent();
            Translate();
            _thereWhereMergeConflicts = GitModule.Current.InTheMiddleOfConflictedMerge();
            _offerCommit = offerCommit;
            merge.Focus();
            merge.Select();

            this.HotkeysEnabled = true;
            this.Hotkeys        = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
        }
        public void MergeLoadedSettings()
        {
            // arrange

            var defaultHotkeySettingsArray = CreateHotkeySettings(2);
            var loadedHotkeySettingsArray  = CreateHotkeySettings(2);

            loadedHotkeySettingsArray[0].Commands[0].KeyData = Keys.C;

            HotkeySettingsManager.MergeIntoDefaultSettings(defaultHotkeySettingsArray, loadedHotkeySettingsArray);

            defaultHotkeySettingsArray.SequenceEqual(loadedHotkeySettingsArray).Should().BeTrue();
        }
Exemplo n.º 20
0
        public CaptureScreenView(CaptureScreen presenter)
        {
            InitializeComponent();
            lblCameraTitle.Text = "";
            this.presenter      = presenter;
            ToggleCapturedVideosPanel();
            sldrDelay.ValueChanged += SldrDelay_ValueChanged;

            nudDelay.Minimum = 0;
            nudDelay.Maximum = 100;

            ConfigureDisplayControl(delayCompositeType);

            this.Hotkeys = HotkeySettingsManager.LoadHotkeys("CaptureScreen");
        }
Exemplo n.º 21
0
        public void ReloadHotkeys()
        {
            Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            diffDeleteFileToolStripMenuItem.ShortcutKeyDisplayString  = GetShortcutKeyDisplayString(Command.DeleteSelectedFiles);
            fileHistoryDiffToolstripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.ShowHistory);
            blameToolStripMenuItem.ShortcutKeyDisplayString           = GetShortcutKeyDisplayString(Command.Blame);
            firstToSelectedToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.OpenWithDifftool);
            firstToLocalToolStripMenuItem.ShortcutKeyDisplayString    = GetShortcutKeyDisplayString(Command.OpenWithDifftoolFirstToLocal);
            selectedToLocalToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.OpenWithDifftoolSelectedToLocal);
            diffEditWorkingDirectoryFileToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeyDisplayString(Command.EditFile);
            diffOpenRevisionFileToolStripMenuItem.ShortcutKeyDisplayString         = GetShortcutKeyDisplayString(Command.OpenAsTempFile);
            diffOpenRevisionFileWithToolStripMenuItem.ShortcutKeyDisplayString     = GetShortcutKeyDisplayString(Command.OpenAsTempFileWith);

            DiffText.ReloadHotkeys();
        }
Exemplo n.º 22
0
        public ThumbnailViewerFiles()
        {
            log.Debug("Constructing ThumbnailViewerFiles");

            InitializeComponent();
            RefreshUICulture();
            this.Dock = DockStyle.Fill;

            NotificationCenter.FileSelected += NotificationCenter_FileSelected;

            this.Hotkeys = HotkeySettingsManager.LoadHotkeys("ThumbnailViewerFiles");

            this.ContextMenuStrip = popMenu;
            BuildContextMenus();
        }
        public void MergeLoadedDiffSizeSettings()
        {
            // arrange

            var defaultHotkeySettingsArray = CreateHotkeySettings(3);
            var loadedHotkeySettingsArray  = CreateHotkeySettings(2);

            loadedHotkeySettingsArray[1].Commands[1].KeyData = Keys.C;

            HotkeySettingsManager.MergeIntoDefaultSettings(defaultHotkeySettingsArray, loadedHotkeySettingsArray);
            var expected = CreateHotkeySettings(3);

            expected[1].Commands[1].KeyData = loadedHotkeySettingsArray[1].Commands[1].KeyData;

            defaultHotkeySettingsArray.SequenceEqual(expected).Should().BeTrue();
        }
Exemplo n.º 24
0
        public void DidDefaultSettingsChangeTest2()
        {
            // arrange
            var defaultHotkeySettingsArray = new HotkeySettings[2] {
                new HotkeySettings("settings1", new HotkeyCommand(1, "C1")),
                new HotkeySettings("settings2", new HotkeyCommand(3, "C3"), new HotkeyCommand(2, "C2"), new HotkeyCommand(4, "C4"))
            };

            var loadedHotkeySettingsArray = new HotkeySettings[2] {
                new HotkeySettings("settings1", new HotkeyCommand(1, "C1"), new HotkeyCommand(4, "C4")),
                new HotkeySettings("settings2", new HotkeyCommand(3, "C3"), new HotkeyCommand(2, "C2"))
            };

            // act, assert
            HotkeySettingsManager.DidDefaultSettingsChange(defaultHotkeySettingsArray, loadedHotkeySettingsArray).Should().BeTrue();
        }
Exemplo n.º 25
0
        public FileViewer()
        {
            TreatAllFilesAsText  = false;
            ShowEntireFile       = false;
            NumberOfVisibleLines = 3;
            InitializeComponent();
            Translate();

            if (GitCommands.Settings.RunningOnWindows())
            {
                _internalFileViewer = new FileViewerWindows();
            }
            else
            {
                _internalFileViewer = new FileViewerMono();
            }

            _internalFileViewer.MouseMove += new MouseEventHandler(_internalFileViewer_MouseMove);

            Control internalFileViewerControl = (Control)_internalFileViewer;

            internalFileViewerControl.Dock = DockStyle.Fill;
            Controls.Add(internalFileViewerControl);

            _async = new AsyncLoader();
            _async.LoadingError +=
                (sender, args) =>
            {
                ResetForText(null);
                _internalFileViewer.SetText("Unsupported file");
            };

            IgnoreWhitespaceChanges = false;

            IsReadOnly = true;

            _internalFileViewer.MouseMove           += TextAreaMouseMove;
            _internalFileViewer.MouseLeave          += TextAreaMouseLeave;
            _internalFileViewer.TextChanged         += TextEditor_TextChanged;
            _internalFileViewer.ScrollPosChanged    += new EventHandler(_internalFileViewer_ScrollPosChanged);
            _internalFileViewer.SelectedLineChanged += new SelectedLineChangedEventHandler(_internalFileViewer_SelectedLineChanged);
            _internalFileViewer.DoubleClick         += (sender, args) => OnRequestDiffView(EventArgs.Empty);

            this.HotkeysEnabled = true;
            this.Hotkeys        = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
        }
        public ThumbnailViewerContainer()
        {
            InitializeComponent();
            InitializeSizeSelector();
            InitializeViewers();
            progressBar.Left    = sizeSelector.Right + 10;
            progressBar.Visible = false;

            NotificationCenter.CurrentDirectoryChanged += NotificationCenter_CurrentDirectoryChanged;
            NotificationCenter.ExplorerTabChanged      += (s, e) => SwitchContent(Convert(e.Tab));

            CameraTypeManager.CamerasDiscovered       += CameraTypeManager_CamerasDiscovered;
            CameraTypeManager.CameraSummaryUpdated    += CameraTypeManager_CameraSummaryUpdated;
            CameraTypeManager.CameraForgotten         += CameraTypeManager_CameraForgotten;
            CameraTypeManager.CameraThumbnailProduced += CameraTypeManager_CameraThumbnailProduced;

            this.Hotkeys = HotkeySettingsManager.LoadHotkeys("ThumbnailViewerContainer");
        }
Exemplo n.º 27
0
        private void btnDefault_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(selectedCategory) || selectedCommand == null)
            {
                return;
            }

            Keys old = selectedCommand.KeyData;

            HotkeySettingsManager.ResetToDefault(selectedCategory, selectedCommand);

            if (old == selectedCommand.KeyData)
            {
                return;
            }

            tbHotkey.SetKeydata(selectedCategory, selectedCommand);
            UpdateCommandView(selectedCategory);
        }
        public FileBrowserUserInterface()
        {
            InitializeComponent();

            lvCameras.SmallImageList   = cameraIcons;
            tvCaptureHistory.ImageList = cameraIcons;
            cameraIcons.Images.Add("historyEntryDay", Properties.Resources.calendar_view_day);
            cameraIcons.Images.Add("historyEntryMonth", Properties.Resources.calendar_view_month);
            cameraIcons.Images.Add("unknownCamera", Properties.Resources.bulletfile);

            btnAddShortcut.Parent    = lblFavFolders;
            btnDeleteShortcut.Parent = lblFavFolders;

            // Drag Drop handling.
            lvExplorer.ItemDrag  += lv_ItemDrag;
            lvShortcuts.ItemDrag += lv_ItemDrag;
            etExplorer.AllowDrop  = false;
            etShortcuts.AllowDrop = false;

            lvCameras.ItemDrag += lvCameras_ItemDrag;

            BuildContextMenu();

            NotificationCenter.ExplorerTabChanged  += NotificationCenter_ExplorerTabChangeAsked;
            NotificationCenter.RefreshFileExplorer += NotificationCenter_RefreshFileExplorer;
            NotificationCenter.FileSelected        += NotificationCenter_FileSelected;
            NotificationCenter.FileOpened          += NotificationCenter_FileOpened;

            // Reload stored persistent information.
            ReloadShortcuts();
            ReloadCaptureHistory(true);

            InitializeFileWatcher();

            // Reload last tab from prefs.
            // We don't reload the splitters here, because we are not at full size yet and they are anchored.
            tabControl.SelectedIndex = (int)PreferencesManager.FileExplorerPreferences.ActiveTab;
            activeTab = PreferencesManager.FileExplorerPreferences.ActiveTab;

            Application.Idle += new EventHandler(this.IdleDetector);
            this.Hotkeys      = HotkeySettingsManager.LoadHotkeys("FileExplorer");
        }
Exemplo n.º 29
0
        public FormCommit()
        {
            _syncContext = SynchronizationContext.Current;

            InitializeComponent();
            splitRight.Panel2MinSize = 130;
            Translate();

            SolveMergeconflicts.Font = new Font(SystemFonts.MessageBoxFont, FontStyle.Bold);

            SelectedDiff.ExtraDiffArgumentsChanged += SelectedDiffExtraDiffArgumentsChanged;

            closeDialogAfterEachCommitToolStripMenuItem.Checked        = Settings.CloseCommitDialogAfterCommit;
            closeDialogAfterAllFilesCommittedToolStripMenuItem.Checked = Settings.CloseCommitDialogAfterLastCommit;

            Unstaged.SetNoFilesText(_noUnstagedChanges.Text);
            Staged.SetNoFilesText(_noStagedChanges.Text);
            Message.SetEmptyMessage(_enterCommitMessageHint.Text);

            Unstaged.SelectedIndexChanged += UntrackedSelectionChanged;
            Staged.SelectedIndexChanged   += TrackedSelectionChanged;

            Unstaged.DoubleClick += Unstaged_DoubleClick;
            Staged.DoubleClick   += Staged_DoubleClick;

            _gitGetUnstagedCommand         = new GitCommandsInstance();
            _gitGetUnstagedCommand.Exited += GitCommandsExited;

            Unstaged.Focus();

            SelectedDiff.AddContextMenuEntry(null, null);
            _StageSelectedLinesToolStripMenuItem = SelectedDiff.AddContextMenuEntry(_stageSelectedLines.Text, StageSelectedLinesToolStripMenuItemClick);
            SelectedDiff.AddContextMenuEntry(_resetSelectedLines.Text, ResetSelectedLinesToolStripMenuItemClick);

            splitMain.SplitterDistance = Settings.CommitDialogSplitter;

            this.HotkeysEnabled = true;
            this.Hotkeys        = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);

            Commit.Focus();
        }
        public DualPlayerController()
        {
            view.Dock = DockStyle.Fill;

            view.PlayToggled       += CCtrl_PlayToggled;
            view.GotoFirst         += CCtrl_GotoFirst;
            view.GotoPrev          += CCtrl_GotoPrev;
            view.GotoPrevKeyframe  += CCtrl_GotoPrevKeyframe;
            view.GotoNext          += CCtrl_GotoNext;
            view.GotoLast          += CCtrl_GotoLast;
            view.GotoNextKeyframe  += CCtrl_GotoNextKeyframe;
            view.GotoSync          += CCtrl_GotoSync;
            view.AddKeyframe       += CCtrl_AddKeyframe;
            view.SyncAsked         += CCtrl_SyncAsked;
            view.MergeAsked        += CCtrl_MergeAsked;
            view.PositionChanged   += CCtrl_PositionChanged;
            view.DualSaveAsked     += CCtrl_DualSaveAsked;
            view.DualSnapshotAsked += CCtrl_DualSnapshotAsked;

            hotkeys = HotkeySettingsManager.LoadHotkeys("DualPlayer");
        }