Exemple #1
0
        private void path1BrowseBtn_Click(object sender, EventArgs e)
        {
            if (specifier1stCB.SelectedIndex == 1)             // changelist
            {
                string path = path1TB.Text;
                SubmittedChangelistsBrowserDlg dlg = new SubmittedChangelistsBrowserDlg(_scm, "diff_" + path);

                if (DialogResult.Cancel != dlg.ShowDialog())
                {
                    _changelistToAdd = dlg.SelectedChangelist;
                    if (_changelistToAdd != null)
                    {
                        Text = _changelistToAdd.Id.ToString();
                    }
                }
            }

            if (specifier1stCB.SelectedIndex == 3)             // label
            {
                LabelsBrowserDlg dlg = new LabelsBrowserDlg();
                if (DialogResult.OK == dlg.ShowDialog(this))
                {
                    P4.Label label = dlg.Label;
                    if (label != null)
                    {
                        path1ValueTB.Text = label.Id;
                    }
                }
            }

            if (specifier1stCB.SelectedIndex == 4)             // workspace
            {
                WorkspacesBrowserDlg dlg = new WorkspacesBrowserDlg(_scm, "diff_against", null, null);

                if (DialogResult.Cancel != dlg.ShowDialog())
                {
                    _workspaceToAdd = dlg.SelectedWorkspace;

                    if (_workspaceToAdd != null)
                    {
                        path1ValueTB.Text = _workspaceToAdd.Name.ToString();
                    }
                }
            }
        }
Exemple #2
0
        private void browseBtn_Click(object sender, EventArgs e)
        {
            if (specifierCB.SelectedIndex == 1)             // changelist
            {
                SubmittedChangelistsBrowserDlg dlg = new SubmittedChangelistsBrowserDlg(_scm, "get_revision");

                if (DialogResult.Cancel != dlg.ShowDialog())
                {
                    if (dlg.SelectedChangelist != null)
                    {
                        _changelistToAdd = dlg.SelectedChangelist;
                        ValueTB.Text     = _changelistToAdd.Id.ToString();
                    }
                }
            }

            if (specifierCB.SelectedIndex == 3)             // label
            {
                LabelsBrowserDlg dlg = new LabelsBrowserDlg();
                if (DialogResult.OK == dlg.ShowDialog(this))
                {
                    P4.Label label = dlg.Label;
                    if (label != null)
                    {
                        ValueTB.Text = label.Id;
                    }
                }
            }

            if (specifierCB.SelectedIndex == 4)             // workspace
            {
                WorkspacesBrowserDlg dlg = new WorkspacesBrowserDlg(_scm, "get_revision", null, null);

                if (DialogResult.Cancel != dlg.ShowDialog())
                {
                    if (dlg.SelectedWorkspace != null)
                    {
                        ValueTB.Text = dlg.SelectedWorkspace.Name.ToString();
                    }
                }
            }
        }