コード例 #1
0
        private void wcHistoryBtn_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog dialog = new LogViewerDialog(new SvnOrigin(MergeTarget)))
            {
                dialog.LogControl.StopOnCopy = true;

                dialog.ShowDialog(Context);
            }
        }
コード例 #2
0
        /// <summary>
        /// Displays the Subversion Log Viewer dialog.
        /// </summary>
        private void DisplayLogViewerAndRetrieveRevisions(object sender)
        {
            string target;

            if (sender == fromRevisionSelectButton || (sender == toRevisionSelectButton && useFromURLCheckBox.Checked))
            {
                target = fromURLTextBox.Text;
            }
            else if (sender == toRevisionSelectButton)
            {
                target = toURLTextBox.Text;
            }
            else
            {
                return;
            }

            using (LogViewerDialog dialog = new LogViewerDialog(new SvnOrigin(Context, new Uri(target), null)))
            {
                dialog.LogControl.StopOnCopy = true;

                if (dialog.ShowDialog(Context) == DialogResult.OK)
                {
                    IEnumerable <ISvnLogItem> selected = dialog.SelectedItems;
                    long low  = -1;
                    long high = -1;

                    foreach (ISvnLogItem item in selected)
                    {
                        // Should happen on first iteration
                        if (low == -1 && high == -1)
                        {
                            low  = item.Revision;
                            high = item.Revision;

                            continue;
                        }

                        if (item.Revision < low)
                        {
                            low = item.Revision;
                        }
                        else if (item.Revision > high)
                        {
                            high = item.Revision;
                        }
                    }

                    fromRevisionTextBox.Text = low.ToString();

                    if (useFromURLCheckBox.Checked && high != -1 && high != low)
                    {
                        toRevisionTextBox.Text = high.ToString();
                    }
                }
            }
        }
コード例 #3
0
ファイル: CreateBranchDialog.cs プロジェクト: windygu/AnkhSVN
        private void versionBrowse_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog lvd = new LogViewerDialog(new SvnOrigin(Context, SrcUri, null)))
            {
                if (lvd.ShowDialog(Context) != DialogResult.OK)
                {
                    return;
                }

                ISvnLogItem li = EnumTools.GetSingle(lvd.SelectedItems);

                if (li != null)
                {
                    Revision = li.Revision;
                    specificVersionRadio.Checked = true;
                }
            }
        }
コード例 #4
0
        private void browseButton_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog lvd = new LogViewerDialog(SvnOrigin))
            {
                if (DialogResult.OK != lvd.ShowDialog(Context))
                {
                    return;
                }

                ISvnLogItem li = EnumTools.GetSingle(lvd.SelectedItems);

                if (li == null)
                {
                    return;
                }

                Revision = li.Revision;
            }
        }
コード例 #5
0
ファイル: CreateBranchDialog.cs プロジェクト: necora/ank_git
        private void versionBrowse_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog lvd = new LogViewerDialog(new SvnOrigin(Context, SrcUri, null)))
            {
                if (lvd.ShowDialog(Context) != DialogResult.OK)
                    return;

                ISvnLogItem li = EnumTools.GetSingle(lvd.SelectedItems);

                if (li != null)
                {
                    Revision = li.Revision;
                    specificVersionRadio.Checked = true;
                }
            }
        }
コード例 #6
0
        private void wcHistoryBtn_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog dialog = new LogViewerDialog(new SvnOrigin(MergeTarget)))
            {
                dialog.LogControl.StrictNodeHistory = true;

                dialog.ShowDialog(Context);
            }
        }
コード例 #7
0
        /// <summary>
        /// Displays the Subversion Log Viewer dialog.
        /// </summary>
        private void DisplayLogViewerAndRetrieveRevisions(object sender)
        {
            string target;
            if (sender == fromRevisionSelectButton || (sender == toRevisionSelectButton && useFromURLCheckBox.Checked))
            {
                target = fromURLTextBox.Text;
            }
            else if (sender == toRevisionSelectButton)
            {
                target = toURLTextBox.Text;
            }
            else
            {
                return;
            }

            using (LogViewerDialog dialog = new LogViewerDialog(new SvnOrigin(Context, new Uri(target), null)))
            {
                dialog.LogControl.StrictNodeHistory = true;

                if (dialog.ShowDialog(Context) == DialogResult.OK)
                {
                    IEnumerable<ISvnLogItem> selected = dialog.SelectedItems;
                    long low = -1;
                    long high = -1;

                    foreach (ISvnLogItem item in selected)
                    {
                        // Should happen on first iteration
                        if (low == -1 && high == -1)
                        {
                            low = item.Revision;
                            high = item.Revision;

                            continue;
                        }

                        if (item.Revision < low)
                            low = item.Revision;
                        else if (item.Revision > high)
                            high = item.Revision;
                    }

                    fromRevisionTextBox.Text = low.ToString();

                    if (useFromURLCheckBox.Checked && high != -1 && high != low)
                        toRevisionTextBox.Text = high.ToString();
                }
            }
        }
コード例 #8
0
ファイル: RevisionSelector.cs プロジェクト: necora/ank_git
        private void browseButton_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog lvd = new LogViewerDialog(SvnOrigin))
            {
                if (DialogResult.OK != lvd.ShowDialog(Context))
                    return;

                ISvnLogItem li = EnumTools.GetSingle(lvd.SelectedItems);

                if (li == null)
                    return;

                Revision = li.Revision;
            }
        }