Example #1
0
        void b_Click(object sender, EventArgs e)
        {
            try
            {
                Button            btn = (Button)sender;
                Score             r   = (Score)btn.Tag;
                DialogRateElement dlg = new DialogRateElement();
                dlg.CurrentScore = r;

                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    if (r.ScaleItemId == int.MinValue ||
                        r.ScaleItemId == int.MaxValue)
                    {
                        btn.Text = "NA";
                    }
                    else
                    {
                        btn.Text = "" + r.ScaleItemId;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error during Scoring Element");
            }
        }
Example #2
0
        private void buttonRating_Click(object sender, EventArgs e)
        {
            try {
                Score             s   = (Score)((Button)sender).Tag;
                DialogRateElement dlg = new DialogRateElement();
                dlg.CurrentScore = s;

                dlg.ShowDialog();
                ((Button)sender).Text = "" + s.ScaleItemId;

                ScaleItem si = this.CurrentInterviewService.CurrentInterview.Scales.Single(x => x.Id == s.ScaleItemId);

                this.toolTip1.SetToolTip((Button)sender, si.Name);
            }
            catch (Exception ex)
            {
                Debug.Print(ex.StackTrace);
                MessageBox.Show(ex.Message);
            }
        }