Contains methods to invoke GitEx forms, dialogs, etc.
Наследование: IGitUICommands
Пример #1
0
 private FormRebase(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     helpImageDisplayUserControl1.Visible = !Settings.DontShowHelpImages;
 }
        public FormResetCurrentBranch(GitUICommands aCommands, GitRevision Revision)
            : base(aCommands)
        {
            this.Revision = Revision;

            InitializeComponent(); Translate();
        }
Пример #3
0
        public static FormBrowse StartBrowseForm(GitUICommands commands, Form form)
        {
            if (instance == null)
                instance = commands.StartBrowseForm(form, "", run: false);

            return instance;
        }
Пример #4
0
        public ViewPatch(GitUICommands aCommands)
            : base(aCommands)
        {
            InitializeComponent(); Translate();

            PatchManager = new PatchManager();
        }
Пример #5
0
 public FormRevert(GitUICommands aCommands, string fileName)
     : base(aCommands)
 {
     this.fileName = fileName;
     InitializeComponent();
     Translate();
 }
Пример #6
0
 public FormSubmodules(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     gitSubmoduleBindingSource.DataSource = modules;
 }
Пример #7
0
 public FormAddFiles(GitUICommands aCommands, string addFile)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     Filter.Text = addFile ?? ".";
 }
Пример #8
0
 public FormBranchSmall(GitUICommands aCommands, string startPoint = null)
     : base(aCommands)
 {
     _startPoint = startPoint;
     InitializeComponent();
     Translate();
 }
        public FormRevertCommitSmall(GitUICommands aCommands, GitRevision Revision)
            : base(aCommands)
        {
            this.Revision = Revision;

            InitializeComponent(); Translate();
        }
Пример #10
0
 public FormSvnClone(GitUICommands aCommands, GitModuleChangedEventHandler GitModuleChanged)
     : base(aCommands)
 {
     this.GitModuleChanged = GitModuleChanged;
     InitializeComponent();
     this.Translate();
 }
Пример #11
0
        public FormSettings(GitUICommands aCommands, SettingsPageReference initalPage = null)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();

            _initalPage = initalPage;

            //if form is created for translation purpose
            if (aCommands == null)
                return;

            // NEW:

            _commonLogic = new CommonLogic(Module);

            _checkSettingsLogic = new CheckSettingsLogic(_commonLogic, Module);
            _checklistSettingsPage = new ChecklistSettingsPage(_commonLogic, _checkSettingsLogic, Module, this);
            _checkSettingsLogic.ChecklistSettingsPage = _checklistSettingsPage; // TODO
            _settingsPageRegistry.RegisterSettingsPage(_checklistSettingsPage);

            _gitSettingsPage = new GitSettingsPage(_checkSettingsLogic, this);
            _settingsPageRegistry.RegisterSettingsPage(_gitSettingsPage);

            _gitExtensionsSettingsPage = new GitExtensionsSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_gitExtensionsSettingsPage);

            _appearanceSettingsPage = new AppearanceSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_appearanceSettingsPage);

            _colorsSettingsPage = new ColorsSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_colorsSettingsPage);

            _startPageSettingsPage = new StartPageSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_startPageSettingsPage);

            _globalSettingsSettingsPage = new GlobalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module);
            _settingsPageRegistry.RegisterSettingsPage(_globalSettingsSettingsPage);

            _localSettingsSettingsPage = new LocalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module);
            _settingsPageRegistry.RegisterSettingsPage(_localSettingsSettingsPage);

            _sshSettingsPage = new SshSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_sshSettingsPage);
            _checklistSettingsPage.SshSettingsPage = _sshSettingsPage;

            _scriptsSettingsPage = new ScriptsSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_scriptsSettingsPage);

            _hotkeysSettingsPage = new HotkeysSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_hotkeysSettingsPage);

            _shellExtensionSettingsPage = new ShellExtensionSettingsPage();
            _settingsPageRegistry.RegisterSettingsPage(_shellExtensionSettingsPage);

            // register all plugin pages
            _settingsPageRegistry.RegisterPluginSettingsPages();

            settingsTreeViewUserControl1.SetSettingsPages(_settingsPageRegistry, _initalPage);
        }
Пример #12
0
        public void FormCommit_Form1()
        {
            app = new ApplicationContext();
            var currentDir = Directory.GetCurrentDirectory();
            string[] args = new string[] { "", "", currentDir };    // GitExtensionsTest\bin\Debug
            if (args[2].EndsWith(@"bin\Debug"))
                args[2] = Path.GetFullPath(currentDir + @"\..\..\..");

            var dir = RevisionGridTest.GetWorkingDir(args);
            Directory.SetCurrentDirectory(dir);

            GitUICommands uCommands = new GitUICommands(dir);

            Form = new FormCommitTest(uCommands);

            Unstaged = Form.ListUnstaged;
            Staged = Form.ListStaged;

            app.MainForm = Form;

            var browseForm = TestStatic.StartBrowseForm(uCommands, Form);

            Form.LoadModule(browseForm.Module);

            this.Unstaged.Subscribe();
            this.Staged.Subscribe();

            Form.Shown += Form_Shown;

            Form.Show();

            Application.Run(app);
        }
Пример #13
0
 public FormGoToCommit(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     tagsLoader = new AsyncLoader();
 }
Пример #14
0
 public FormApplyPatch(GitUICommands aCommands)
     : base(true, aCommands)
 {
     InitializeComponent(); Translate();
     if (aCommands != null)
         EnableButtons();
 }
Пример #15
0
 public FormDeleteBranch(GitUICommands aCommands, string defaultBranch)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     _defaultBranch = defaultBranch;
 }
Пример #16
0
        public FormCherryPick(GitUICommands aCommands, GitRevision revision)
            : base(aCommands)
        {
            Revision = revision;
            InitializeComponent();

            Translate();
        }
Пример #17
0
 internal FormFileHistory(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     syncContext = SynchronizationContext.Current;
     filterBranchHelper = new FilterBranchHelper(toolStripBranches, toolStripDropDownButton2, FileChanges);
     filterRevisionsHelper = new FilterRevisionsHelper(toolStripTextBoxFilter, toolStripDropDownButton1, FileChanges, toolStripLabel2, this);
 }
Пример #18
0
 public FormRenameBranch(GitUICommands aCommands, string defaultBranch)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     Branches.Text = defaultBranch;
     oldName = defaultBranch;
 }
Пример #19
0
 public FormStash(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Loading.Image = global::GitUI.Properties.Resources.loadingpanel;
     Translate();
     View.ExtraDiffArgumentsChanged += ViewExtraDiffArgumentsChanged;
 }
Пример #20
0
        public FormDiff(GitUICommands aCommands)
            : base(true, aCommands)
        {
            InitializeComponent();
            Translate();

            diffViewer.ExtraDiffArgumentsChanged += DiffViewerExtraDiffArgumentsChanged;
        }
 public FormAddToGitIgnore(GitUICommands aCommands, params string[] filePatterns)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     if (filePatterns != null)
         FilePattern.Text = string.Join(Environment.NewLine, filePatterns);
 }
Пример #22
0
 public FormClone(GitUICommands aCommands, string url, bool openedFromProtocolHandler, GitModuleChangedEventHandler GitModuleChanged)
     : base(aCommands)
 {
     this.GitModuleChanged = GitModuleChanged;
     InitializeComponent();
     Translate();
     this.openedFromProtocolHandler = openedFromProtocolHandler;
     this.url = url;
 }
Пример #23
0
        public void LoadModule(GitModule module)
        {
            if (UICommands != null && UICommands.Module == module)
            {
                return;
            }

            UICommands = new GitUICommands(module);
        }
 public static bool HandleMergeConflicts(GitUICommands aCommands, IWin32Window owner, bool offerCommit)
 {
     if (aCommands.Module.InTheMiddleOfConflictedMerge())
     {
         if (MessageBoxes.UnresolvedMergeConflicts(owner))
         {
             SolveMergeConflicts(aCommands, owner, offerCommit);
         }
         return true;
     }
     return false;
 }
Пример #25
0
        public FormEditor(GitUICommands aCommands, string fileName)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();

            // for translation form
            if (fileName != null)
                OpenFile(fileName);
            fileViewer.TextChanged += (s, e) => HasChanges = true;
            fileViewer.TextLoaded += (s, e) => HasChanges = false;
        }
Пример #26
0
        public FormGitReview(IGitUICommands aUICommands)
            : base(true)
        {
            InitializeComponent();
            Translate();

            UICommands = (GitUICommands)aUICommands;
            if (UICommands != null)
            {
                LoadGitReview();
                _NO_TRANSLATE_GitReviewEdit.TextLoaded += GitReviewFileLoaded;
            }
        }
Пример #27
0
        public FormPush(GitUICommands aCommands)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();

            //can't be set in OnLoad, because after PushAndShowDialogWhenFailed()
            //they are reset to false
            PushAllTags.Checked = Settings.PushAllTags;
            AutoPullOnRejected.Checked = Settings.AutoPullOnRejected;
            if (aCommands != null)
                Init();
        }
Пример #28
0
        public FormChooseCommit(GitUICommands aCommands, string preselectCommit)
            : this(aCommands)
        {
            revisionGrid.MultiSelect = false;

            if (!String.IsNullOrEmpty(preselectCommit))
            {
                string guid = Module.RevParse(preselectCommit);
                if (!String.IsNullOrEmpty(guid))
                {
                    revisionGrid.SetInitialRevision(new GitRevision(Module, guid));
                }
            }
        }
Пример #29
0
        public FormMergeBranch(GitUICommands aCommands, string defaultBranch)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();
            _defaultBranch = defaultBranch;

            if (Settings.NoFastForwardMerge)
            {
                noFastForward.Checked = true;
            }

            advanced_CheckedChanged(null, null);
        }
Пример #30
0
        public FormMergeBranch(GitUICommands aCommands, string defaultBranch)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();
            helpImageDisplayUserControl1.Visible = !Settings.DontShowHelpImages;
            _defaultBranch = defaultBranch;

            if (Settings.NoFastForwardMerge)
            {
                noFastForward.Checked = true;
            }

            advanced_CheckedChanged(null, null);
        }
Пример #31
0
 public FormRemotes(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #32
0
 protected GitModuleForm([NotNull] GitUICommands commands)
     : base(enablePositionRestore: true)
 {
     _uiCommands = commands;
 }
Пример #33
0
 public FormFileHistory(GitUICommands aCommands, string fileName)
     : this(aCommands, fileName, null, false)
 {
 }
Пример #34
0
 protected GitModuleForm([NotNull] GitUICommands commands, bool enablePositionRestore)
     : base(enablePositionRestore)
 {
     _uiCommands = commands;
     DiagnosticsClient.TrackPageView(GetType().FullName);
 }
Пример #35
0
 public static bool HandleMergeConflicts(GitUICommands aCommands, IWin32Window owner)
 {
     return(HandleMergeConflicts(aCommands, owner, true));
 }
Пример #36
0
 public GitModuleForm(bool enablePositionRestore, GitUICommands aCommands)
     : base(enablePositionRestore)
 {
     UICommands = aCommands;
 }
Пример #37
0
 protected GitModuleForm(GitUICommands commands)
     : this(true, commands)
 {
 }
Пример #38
0
 /// <summary>Creates a new <see cref="GitExtensionsForm"/> indicating position restore.</summary>
 /// <param name="enablePositionRestore">Indicates whether the <see cref="Form"/>'s position
 /// will be restored upon being re-opened.</param>
 protected GitExtensionsDialog([NotNull] GitUICommands commands, bool enablePositionRestore)
     : base(commands, enablePositionRestore)
 {
     InitializeComponent();
 }
Пример #39
0
        public FormSettings(GitUICommands aCommands, SettingsPageReference initalPage = null)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();

            settingsTreeView.SuspendLayout();

            //if form is created for translation purpose
            if (aCommands == null)
            {
                return;
            }

            // NEW:
            settingsTreeView.AddSettingsPage(new GitExtensionsSettingsGroup(), null);
            SettingsPageReference gitExtPageRef = GitExtensionsSettingsGroup.GetPageReference();

            _commonLogic = new CommonLogic(Module);

            _checkSettingsLogic = new CheckSettingsLogic(_commonLogic, Module);
            var checklistSettingsPage = new ChecklistSettingsPage(_commonLogic, _checkSettingsLogic, Module, this);

            _checkSettingsLogic.ChecklistSettingsPage = checklistSettingsPage; // TODO
            settingsTreeView.AddSettingsPage(checklistSettingsPage, gitExtPageRef);

            settingsTreeView.AddSettingsPage(new GitSettingsPage(_checkSettingsLogic, this), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new GitExtensionsSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new AppearanceSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new ColorsSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new StartPageSettingsPage(), gitExtPageRef);

            var globalSettingsSettingsPage = new GlobalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module);

            settingsTreeView.AddSettingsPage(globalSettingsSettingsPage, gitExtPageRef);

            var localSettingsSettingsPage = new LocalSettingsSettingsPage(_commonLogic, _checkSettingsLogic, Module);

            settingsTreeView.AddSettingsPage(localSettingsSettingsPage, gitExtPageRef);

            var _sshSettingsPage = new SshSettingsPage();

            settingsTreeView.AddSettingsPage(_sshSettingsPage, gitExtPageRef);
            checklistSettingsPage.SshSettingsPage = _sshSettingsPage;

            settingsTreeView.AddSettingsPage(new ScriptsSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new HotkeysSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new ShellExtensionSettingsPage(), gitExtPageRef);

            settingsTreeView.AddSettingsPage(new AdvancedSettingsPage(), gitExtPageRef);
            SettingsPageReference advancedPageRef = AdvancedSettingsPage.GetPageReference();

            settingsTreeView.AddSettingsPage(new ConfirmationsSettingsPage(), advancedPageRef);

            settingsTreeView.AddSettingsPage(new PluginsSettingsGroup(), null);
            SettingsPageReference pluginsPageRef = PluginsSettingsGroup.GetPageReference();

            foreach (var gitPlugin in LoadedPlugins.Plugins)
            {
                var settingsPage = PluginSettingsPage.CreateSettingsPageFromPlugin(gitPlugin);
                settingsTreeView.AddSettingsPage(settingsPage, pluginsPageRef);
            }

            settingsTreeView.GotoPage(initalPage);
            settingsTreeView.ResumeLayout();
        }
 public FormResolveConflicts(GitUICommands aCommands)
     : this(aCommands, true)
 {
 }
Пример #41
0
 public FormRebase(GitUICommands aCommands, string from, string to, string defaultBranch)
     : this(aCommands, defaultBranch)
 {
     txtFrom.Text     = from;
     _defaultToBranch = to;
 }
Пример #42
0
 public FormGoToCommit(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #43
0
 public GitUICommandsChangedEventArgs(GitUICommands oldCommands)
 {
     OldCommands = oldCommands;
 }
Пример #44
0
 protected GitModuleForm(bool enablePositionRestore, GitUICommands commands)
     : base(enablePositionRestore)
 {
     UICommands = commands;
 }
Пример #45
0
 public FormBranchSmall(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #46
0
 public FormCheckout(GitUICommands aCommands)
     : base(true, aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #47
0
 public GitModuleForm(GitUICommands aCommands)
     : this(true, aCommands)
 {
 }
Пример #48
0
 public FormDiff(GitUICommands aCommands, GitRevision revision)
     : this(aCommands)
 {
     RevisionGrid.SetSelectedRevision(revision);
 }
Пример #49
0
 public FormCheckoutBranch(GitUICommands aCommands, string branch, bool remote)
     : this(aCommands, branch, remote, null)
 {
 }
Пример #50
0
 public FormMailMap(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
 public FormCleanupRepository(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent(); Translate();
     PreviewOutput.ReadOnly = true;
 }
Пример #52
0
 void UICommandsSource_GitUICommandsChanged(IGitUICommandsSource sender, GitUICommands oldCommands)
 {
     Clear();
 }
 public GitUICommandsChangedEventArgs([CanBeNull] GitUICommands oldCommands)
 {
     OldCommands = oldCommands;
 }
Пример #54
0
 public FormArchive(GitUICommands aCommands)
     : base(true, aCommands)
 {
     InitializeComponent();
     Translate();
 }
 protected GitModuleForm([NotNull] GitUICommands commands)
     : this(commands, enablePositionRestore : true)
 {
 }
Пример #56
0
 public FormFormatPatch(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #57
0
 private FormRebase(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }
Пример #58
0
 public FormRebase(GitUICommands aCommands, string defaultBranch)
     : this(aCommands)
 {
     _defaultBranch = defaultBranch;
 }
Пример #59
0
 public bool TryGetUICommands(out GitUICommands commands)
 {
     commands = _uiCommandsSource?.UICommands;
     return(commands != null);
 }
Пример #60
0
 public FormAddSubmodule(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
 }