Esempio n. 1
0
        public bool StartAddFilesDialog()
        {
            if (!InvokeEvent(PreAddFiles))
            {
                return(false);
            }

            var form = new FormAddFiles();

            form.ShowDialog();

            InvokeEvent(PostAddFiles);

            return(false);
        }
Esempio n. 2
0
        public bool StartAddFilesDialog(IWin32Window owner)
        {
            if (!RequiresValidWorkingDir(owner))
            {
                return(false);
            }

            if (!InvokeEvent(owner, PreAddFiles))
            {
                return(false);
            }

            using (var form = new FormAddFiles())
                form.ShowDialog(owner);

            InvokeEvent(owner, PostAddFiles);

            return(false);
        }
        public bool StartAddFilesDialog()
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(PreAddFiles))
            {
                return(false);
            }

            var form = new FormAddFiles();

            form.ShowDialog();

            InvokeEvent(PostAddFiles);

            return(false);
        }
        public bool StartAddFilesDialog(IWin32Window owner, string addFiles)
        {
            return DoAction(owner, true, PreAddFiles, PostAddFiles, () =>
            {
                using (var form = new FormAddFiles(this, addFiles))
                    form.ShowDialog(owner);

                return true;
            }
            );
        }
Esempio n. 5
0
 private void AddFiles_Click(object sender, EventArgs e)
 {
     FormAddFiles form = new FormAddFiles();
     form.ShowDialog();
 }
Esempio n. 6
0
        public bool StartAddFilesDialog(IWin32Window owner)
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(owner, PreAddFiles))
                return false;

            var form = new FormAddFiles();
            form.ShowDialog(owner);

            InvokeEvent(owner, PostAddFiles);

            return false;
        }
Esempio n. 7
0
        public bool StartAddFilesDialog()
        {
            if (!InvokeEvent(PreAddFiles))
                return false;

            FormAddFiles form = new FormAddFiles();
            form.ShowDialog();

            InvokeEvent(PostAddFiles);

            return false;
        }
Esempio n. 8
0
        /// <summary>Implements the Exec method of the IDTCommandTarget interface. This is called when the command is invoked.</summary>
        /// <param term='commandName'>The name of the command to execute.</param>
        /// <param term='executeOption'>Describes how the command should be run.</param>
        /// <param term='varIn'>Parameters passed from the caller to the command handler.</param>
        /// <param term='varOut'>Parameters passed from the command handler to the caller.</param>
        /// <param term='handled'>Informs the caller if the command was handled or not.</param>
        /// <seealso class='Exec' />
        public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)
        {
            try
            {
                //Settings.WorkingDir =

                handled = false;
                string fileName = _applicationObject.Solution.FileName;
                Settings.WorkingDir = @"f:\Dev";//fileName.Substring(0, fileName.LastIndexOf('\\'));

                if (executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
                {

                    if (commandName == "GitPlugin.Connect.AddFiles")
                    {
                        FormAddFiles form = new FormAddFiles();
                        form.ShowDialog();
                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Branch")
                    {
                        FormBranch form = new FormBranch();
                        form.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Browse")
                    {
                        FormBrowse form = new FormBrowse();
                        form.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Checkout")
                    {
                        FormCheckout form = new FormCheckout();
                        form.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Clone")
                    {
                        FormClone form = new FormClone();
                        form.ShowDialog(); ;

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Commit")
                    {
                        FormCommit formCommit = new FormCommit();
                        formCommit.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Diff")
                    {
                        FormDiff formDiff = new FormDiff();
                        formDiff.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Init")
                    {
                        InitDto dto = new InitDto();
                        Init init = new Init(dto);
                        init.Execute();

                        MessageBox.Show(dto.Result);

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Patch")
                    {
                        MergePatch form = new MergePatch();
                        form.ShowDialog();
                        handled = true;
                        return;
                    } if (commandName == "GitPlugin.Connect.Pull")
                    {
                        FormPull form = new FormPull();
                        form.ShowDialog();

                        handled = true;
                        return;
                    }
                    if (commandName == "GitPlugin.Connect.Push")
                    {
                        FormPull form = new FormPull();
                        form.ShowDialog();
                        handled = true;
                        return;
                    }

                }
            }
            catch
            {
                MessageBox.Show("ERROR!");
            }
        }
Esempio n. 9
0
 private void addFilesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FormAddFiles addFiles = new FormAddFiles();
     addFiles.ShowDialog();
 }