コード例 #1
0
ファイル: MainForm.cs プロジェクト: tyzctyzc2/hhips
        private void button_update_Click(object sender, EventArgs e)
        {
            grabData();

            mySubmitter.idproblem = this.textBox_idproblem.Text;

            string ip = this.textBoxIP.Text;

            System.Diagnostics.Debug.WriteLine(ip);

            if (mySubmitter.Update(ip) == true)
            {
                var item = new NotifyIcon(this.components);
                item.Visible = true;
                item.Icon    = System.Drawing.SystemIcons.Information;
                item.ShowBalloonTip(3000, "Problem updated!", "Problem updated!", ToolTipIcon.Info);

                //reset all for next submit
                mySubmitter = new ProblemSubmitter();
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: tyzctyzc2/hhips
        private void button_submit_Click(object sender, EventArgs e)
        {
            grabData();

            if (mySubmitter.problemanswerdetail == null)
            {
                MessageBox.Show("No problem answer image!");
                return;
            }

            if (mySubmitter.problemdetail == null)
            {
                MessageBox.Show("No problem image!");
                return;
            }

            string ip = this.textBoxIP.Text;

            System.Diagnostics.Debug.WriteLine(ip);

            if (mySubmitter.Submit(ip) == true)
            {
                var item = new NotifyIcon(this.components);
                item.Visible = true;
                item.Icon    = System.Drawing.SystemIcons.Information;
                item.ShowBalloonTip(3000, "Problem created!", "Problem created!", ToolTipIcon.Info);

                try
                {
                    comboBox_index.SelectedIndex = comboBox_index.SelectedIndex + 1;
                }
                catch (Exception)
                {
                }

                //reset all for next submit
                mySubmitter = new ProblemSubmitter();
            }
        }