Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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();
                    }
                }
            }
        }
Ejemplo n.º 3
0
    public void ShowDialog()
    {
        if (dialog != null)
        {
            return;
        }

        dialog           = new LogViewerDialog(buffer);
        dialog.Response += delegate(object o, ResponseArgs args) {
            dialog.Destroy();
            dialog = null;
        };

        dialog.Show();
    }
Ejemplo n.º 4
0
        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;
                }
            }
        }
Ejemplo n.º 5
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;
            }
        }
Ejemplo n.º 6
0
        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;
                }
            }
        }
        private void wcHistoryBtn_Click(object sender, EventArgs e)
        {
            using (LogViewerDialog dialog = new LogViewerDialog(new SvnOrigin(MergeTarget)))
            {
                dialog.LogControl.StrictNodeHistory = true;

                dialog.ShowDialog(Context);
            }
        }
        /// <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();
                }
            }
        }
Ejemplo n.º 9
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;
            }
        }