Наследование: System.Windows.Forms.ToolStripMenuItem
Пример #1
0
        public FormBrowse(string filter)
        {
            syncContext = SynchronizationContext.Current;

            InitializeComponent();
            Translate();

            if (Settings.ShowGitStatusInBrowseToolbar)
            {
                var status = new ToolStripGitStatus
                                 {
                                     ImageTransparentColor = System.Drawing.Color.Magenta
                                 };
                status.Click += StatusClick;
                ToolStrip.Items.Insert(1, status);
            }

            RevisionGrid.SelectionChanged += RevisionGridSelectionChanged;
            DiffText.ExtraDiffArgumentsChanged += DiffTextExtraDiffArgumentsChanged;
            SetFilter(filter);

            GitTree.ImageList = new ImageList();
            GitTree.ImageList.Images.Add(Properties.Resources._21); //File
            GitTree.ImageList.Images.Add(Properties.Resources._40); //Folder
            GitTree.ImageList.Images.Add(Properties.Resources._39); //Submodule
        }
Пример #2
0
        public FormBrowse(string filter)
        {
            syncContext = SynchronizationContext.Current;

            InitializeComponent();
            Translate();

            if (Settings.ShowGitStatusInBrowseToolbar)
            {
                var status = new ToolStripGitStatus
                                 {
                                     ImageTransparentColor = System.Drawing.Color.Magenta
                                 };
                status.Click += StatusClick;
                ToolStrip.Items.Insert(1, status);
            }

            RevisionGrid.SelectionChanged += RevisionGridSelectionChanged;
            DiffText.ExtraDiffArgumentsChanged += DiffTextExtraDiffArgumentsChanged;
            SetFilter(filter);
            DiffText.SetFileLoader(getNextPatchFile);

            GitTree.ImageList = new ImageList();
            GitTree.ImageList.Images.Add(Properties.Resources._21); //File
            GitTree.ImageList.Images.Add(Properties.Resources._40); //Folder
            GitTree.ImageList.Images.Add(Properties.Resources._39); //Submodule

            GitTree.MouseDown += new MouseEventHandler(GitTree_MouseDown);
            GitTree.MouseMove += new MouseEventHandler(GitTree_MouseMove);

            this.HotkeysEnabled = true;
            this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            this.toolPanel.SplitterDistance = this.ToolStrip.Height;
            this._dontUpdateOnIndexChange = false;
        }
Пример #3
0
        public FormBrowse(string filter)
        {
            syncContext = SynchronizationContext.Current;

            InitializeComponent();
            filterRevisionsHelper = new FilterRevisionsHelper(toolStripTextBoxFilter, toolStripDropDownButton1, RevisionGrid, toolStripLabel2, this);
            _FilterBranchHelper = new FilterBranchHelper(toolStripBranches, toolStripDropDownButton2, RevisionGrid);
            Translate();
            _NoDiffFilesChangesText = DiffFiles.GetNoFilesText();

            #if !__MonoCS__
            if (Settings.RunningOnWindows() && TaskbarManager.IsPlatformSupported)
            {
                TaskbarManager.Instance.ApplicationId = "HenkWesthuis.GitExtensions";
            }
            #endif
            if (Settings.ShowGitStatusInBrowseToolbar)
            {
                _toolStripGitStatus = new ToolStripGitStatus
                                 {
                                     ImageTransparentColor = System.Drawing.Color.Magenta
                                 };
                _toolStripGitStatus.Click += StatusClick;
                ToolStrip.Items.Insert(ToolStrip.Items.IndexOf(toolStripButton1), _toolStripGitStatus);
                ToolStrip.Items.Remove(toolStripButton1);
                _toolStripGitStatus.CommitTranslatedString = toolStripButton1.Text;
            }
            RevisionGrid.SelectionChanged += RevisionGridSelectionChanged;
            DiffText.ExtraDiffArgumentsChanged += DiffTextExtraDiffArgumentsChanged;
            filterRevisionsHelper.SetFilter(filter);
            DiffText.SetFileLoader(getNextPatchFile);

            GitTree.ImageList = new ImageList();
            GitTree.ImageList.Images.Add(Properties.Resources.New); //File
            GitTree.ImageList.Images.Add(Properties.Resources.Folder); //Folder
            GitTree.ImageList.Images.Add(Properties.Resources.Submodule); //Submodule

            GitTree.MouseDown += GitTree_MouseDown;
            GitTree.MouseMove += GitTree_MouseMove;

            this.HotkeysEnabled = true;
            this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            this.toolPanel.SplitterDistance = this.ToolStrip.Height;
            this._dontUpdateOnIndexChange = false;
            Settings.WorkingDirChanged += (a, b, c) => RefreshPullIcon();
            RefreshPullIcon();
            dontSetAsDefaultToolStripMenuItem.Checked = Settings.DonSetAsLastPullAction;
        }
Пример #4
0
        public FormBrowse(GitUICommands aCommands, string filter)
            : base(true, aCommands)
        {
            syncContext = SynchronizationContext.Current;

            InitializeComponent();

            // set tab page images
            {
                var imageList = new ImageList();
                CommitInfoTabControl.ImageList = imageList;
                imageList.ColorDepth = ColorDepth.Depth8Bit;
                imageList.Images.Add(global::GitUI.Properties.Resources.IconCommit);
                imageList.Images.Add(global::GitUI.Properties.Resources.IconFileTree);
                imageList.Images.Add(global::GitUI.Properties.Resources.IconDiff);
                CommitInfoTabControl.TabPages[0].ImageIndex = 0;
                CommitInfoTabControl.TabPages[1].ImageIndex = 1;
                CommitInfoTabControl.TabPages[2].ImageIndex = 2;
            }

            RevisionGrid.UICommandsSource = this;
            AsyncLoader.DoAsync(() => PluginLoader.Load(), () => RegisterPlugins());
            RevisionGrid.GitModuleChanged += DashboardGitModuleChanged;
            filterRevisionsHelper = new FilterRevisionsHelper(toolStripTextBoxFilter, toolStripDropDownButton1, RevisionGrid, toolStripLabel2, this);
            _FilterBranchHelper = new FilterBranchHelper(toolStripBranches, toolStripDropDownButton2, RevisionGrid);
            Translate();

            if (Settings.ShowGitStatusInBrowseToolbar)
            {
                _toolStripGitStatus = new ToolStripGitStatus
                                 {
                                     ImageTransparentColor = System.Drawing.Color.Magenta
                                 };
                if (aCommands != null)
                    _toolStripGitStatus.UICommandsSource = this;
                _toolStripGitStatus.Click += StatusClick;
                ToolStrip.Items.Insert(ToolStrip.Items.IndexOf(toolStripButton1), _toolStripGitStatus);
                ToolStrip.Items.Remove(toolStripButton1);
                _toolStripGitStatus.CommitTranslatedString = toolStripButton1.Text;
            }
            RevisionGrid.SelectionChanged += RevisionGridSelectionChanged;
            DiffText.ExtraDiffArgumentsChanged += DiffTextExtraDiffArgumentsChanged;
            filterRevisionsHelper.SetFilter(filter);
            DiffText.SetFileLoader(getNextPatchFile);

            GitTree.ImageList = new ImageList();
            GitTree.ImageList.Images.Add(Properties.Resources.New); //File
            GitTree.ImageList.Images.Add(Properties.Resources.Folder); //Folder
            GitTree.ImageList.Images.Add(Properties.Resources.IconFolderSubmodule); //Submodule

            GitTree.MouseDown += GitTree_MouseDown;
            GitTree.MouseMove += GitTree_MouseMove;

            this.HotkeysEnabled = true;
            this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            this.toolPanel.SplitterDistance = this.ToolStrip.Height;
            this._dontUpdateOnIndexChange = false;
            GitUICommandsChanged += (a, oldcommands) =>
            {
                RefreshPullIcon();
                oldcommands.BrowseInitialize -= UICommands_BrowseInitialize;
                UICommands.BrowseInitialize += UICommands_BrowseInitialize;
            };
            if (aCommands != null)
            {
                RefreshPullIcon();
                UICommands.BrowseInitialize += UICommands_BrowseInitialize;
            }
            dontSetAsDefaultToolStripMenuItem.Checked = Settings.DonSetAsLastPullAction;
        }
Пример #5
0
        public FormBrowse(string filter)
        {
            syncContext = SynchronizationContext.Current;

            InitializeComponent();
            Translate();

            #if !__MonoCS__
            if (Settings.RunningOnWindows && TaskbarManager.IsPlatformSupported)
            {
                TaskbarManager.Instance.ApplicationId = "HenkWesthuis.GitExtensions";
            }
            #endif

            if (Settings.ShowGitStatusInBrowseToolbar)
            {
                _toolStripGitStatus = new ToolStripGitStatus
                                 {
                                     ImageTransparentColor = Color.Magenta
                                 };
                _toolStripGitStatus.Click += StatusClick;
                ToolStrip.Items.Insert(1, _toolStripGitStatus);
            }

            RevisionGrid.SelectionChanged += RevisionGridSelectionChanged;
            DiffText.ExtraDiffArgumentsChanged += DiffTextExtraDiffArgumentsChanged;
            SetFilter(filter);
            DiffText.SetFileLoader(getNextPatchFile);

            GitTree.ImageList = new ImageList();
            GitTree.ImageList.Images.Add(Properties.Resources._21); //File
            GitTree.ImageList.Images.Add(Properties.Resources._40); //Folder
            GitTree.ImageList.Images.Add(Properties.Resources._39); //Submodule

            GitTree.MouseDown += new MouseEventHandler(GitTree_MouseDown);
            GitTree.MouseMove += new MouseEventHandler(GitTree_MouseMove);

            this.HotkeysEnabled = true;
            this.Hotkeys = HotkeySettingsManager.LoadHotkeys(HotkeySettingsName);
            this.toolPanel.SplitterDistance = this.ToolStrip.Height;
            this._dontUpdateOnIndexChange = false;
        }