Beispiel #1
0
        private void submitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            submitToolStripMenuItem.Enabled = false;             //protect from double click
            ShowProgressBar();
            TicketAttributes attributes = new TicketAttributes();

            attributes.cc        = "";
            attributes.comment   = "";
            attributes.keywords  = "";
            attributes.component = GetSelected(componentToolStripMenuItem);
            attributes.milestone = GetSelected(milestonesToolStripMenuItem);
            attributes.severity  = GetSelected(severityToolStripMenuItem);
            attributes.version   = GetSelected(versionToolStripMenuItem);
            attributes.priority  = GetSelected(priorityToolStripMenuItem);
            ITracXmlRpc trac        = BuildTracService();
            string      description =
                string.Format(@"
== Expected: ==

{0}

== Actual: ==

{1}

== Steps to repreduce: ==

{2}
",
                              expected.Text,
                              actual.Text,
                              repreduce.Text);
            int id = trac.TicketCreate(summary.Text, description, attributes);

            SendSnapShot(trac, id);
            HideProgressBar();
            using (CreatedTicket ct = new CreatedTicket(id, summary.Text))
                ct.ShowDialog(this);
            summary.Text   = "";
            expected.Text  = "";
            actual.Text    = "";
            repreduce.Text = "";
            clearImg_Click(sender, e);
        }
Beispiel #2
0
        private void submitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            submitToolStripMenuItem.Enabled = false; //protect from double click
            ShowProgressBar();
            TicketAttributes attributes = new TicketAttributes();
            attributes.cc = "";
            attributes.comment = "";
            attributes.keywords = "";
            attributes.component = GetSelected(componentToolStripMenuItem);
            attributes.milestone = GetSelected(milestonesToolStripMenuItem);
            attributes.severity = GetSelected(severityToolStripMenuItem);
            attributes.version = GetSelected(versionToolStripMenuItem);
            attributes.priority = GetSelected(priorityToolStripMenuItem);
            ITracXmlRpc trac = BuildTracService();
            string description =
                string.Format(@"
            == Expected: ==

            {0}

            == Actual: ==

            {1}

            == Steps to repreduce: ==

            {2}
            ",
                              expected.Text,
                              actual.Text,
                              repreduce.Text);
            int id = trac.TicketCreate(summary.Text, description, attributes);
            SendSnapShot(trac, id);
            HideProgressBar();
            using (CreatedTicket ct = new CreatedTicket(id, summary.Text))
                ct.ShowDialog(this);
            summary.Text = "";
            expected.Text = "";
            actual.Text = "";
            repreduce.Text = "";
            clearImg_Click(sender, e);
        }