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 FormBranchSmall(GitUICommands aCommands, string startPoint = null)
     : base(aCommands)
 {
     _startPoint = startPoint;
     InitializeComponent();
     Translate();
 }
Пример #5
0
 public FormSvnClone(GitUICommands aCommands, GitModuleChangedEventHandler GitModuleChanged)
     : base(aCommands)
 {
     this.GitModuleChanged = GitModuleChanged;
     InitializeComponent();
     this.Translate();
 }
Пример #6
0
        public ViewPatch(GitUICommands aCommands)
            : base(aCommands)
        {
            InitializeComponent(); Translate();

            PatchManager = new PatchManager();
        }
Пример #7
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);
        }
Пример #8
0
 public FormApplyPatch(GitUICommands aCommands)
     : base(true, aCommands)
 {
     InitializeComponent(); Translate();
     if (aCommands != null)
         EnableButtons();
 }
Пример #9
0
 public FormAddFiles(GitUICommands aCommands, string addFile)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     Filter.Text = addFile ?? ".";
 }
Пример #10
0
 public FormSubmodules(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     gitSubmoduleBindingSource.DataSource = modules;
 }
Пример #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 FormDeleteBranch(GitUICommands aCommands, string defaultBranch)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     _defaultBranch = defaultBranch;
 }
Пример #13
0
 public FormGoToCommit(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     tagsLoader = new AsyncLoader();
 }
        public FormRevertCommitSmall(GitUICommands aCommands, GitRevision Revision)
            : base(aCommands)
        {
            this.Revision = Revision;

            InitializeComponent(); Translate();
        }
Пример #15
0
 public FormRevert(GitUICommands aCommands, string fileName)
     : base(aCommands)
 {
     this.fileName = fileName;
     InitializeComponent();
     Translate();
 }
Пример #16
0
        public FormCherryPick(GitUICommands aCommands, GitRevision revision)
            : base(aCommands)
        {
            Revision = revision;
            InitializeComponent();

            Translate();
        }
 public FormAddToGitIgnore(GitUICommands aCommands, params string[] filePatterns)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     if (filePatterns != null)
         FilePattern.Text = string.Join(Environment.NewLine, filePatterns);
 }
Пример #18
0
 public FormRenameBranch(GitUICommands aCommands, string defaultBranch)
     : base(aCommands)
 {
     InitializeComponent();
     Translate();
     Branches.Text = defaultBranch;
     oldName = defaultBranch;
 }
Пример #19
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);
 }
Пример #20
0
        public FormDiff(GitUICommands aCommands)
            : base(true, aCommands)
        {
            InitializeComponent();
            Translate();

            diffViewer.ExtraDiffArgumentsChanged += DiffViewerExtraDiffArgumentsChanged;
        }
Пример #21
0
 public FormStash(GitUICommands aCommands)
     : base(aCommands)
 {
     InitializeComponent();
     Loading.Image = global::GitUI.Properties.Resources.loadingpanel;
     Translate();
     View.ExtraDiffArgumentsChanged += ViewExtraDiffArgumentsChanged;
 }
Пример #22
0
        public void LoadModule(GitModule module)
        {
            if (UICommands != null && UICommands.Module == module)
            {
                return;
            }

            UICommands = new GitUICommands(module);
        }
Пример #23
0
 public FormClone(GitUICommands aCommands, string url, bool openedFromProtocolHandler, GitModuleChangedEventHandler GitModuleChanged)
     : base(aCommands)
 {
     this.GitModuleChanged = GitModuleChanged;
     InitializeComponent();
     Translate();
     this.openedFromProtocolHandler = openedFromProtocolHandler;
     this.url = url;
 }
Пример #24
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;
        }
 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;
 }
Пример #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 FormMergeBranch(GitUICommands aCommands, string defaultBranch)
            : base(aCommands)
        {
            InitializeComponent();
            Translate();
            _defaultBranch = defaultBranch;

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

            advanced_CheckedChanged(null, null);
        }
Пример #29
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));
                }
            }
        }
Пример #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);
        }