Example #1
0
        private void problemsListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Problem p = (Problem)problemsListBox.SelectedItem;

            curProblem = p;
            descriptionTextBox.Text = p.Description;
            if (p.Solved)
            {
                alreadySolvedLabel.Text = "(already solved)";
            }
            else
            {
                alreadySolvedLabel.Text = "";
            }

            introRadioButton.Checked = true;
            radioButton_CheckedChanged(this, EventArgs.Empty);

            showConstraints(p);
            strutNumberTextBox.Text     = p.SupportNumber.ToString();
            heatLeakTextBox.Text        = p.HeatLeak.ToString();
            supportModeTextBox.Text     = p.SupportMode.ToString();
            monetaryIncentiveLabel.Text = p.MonetaryIncentive.ToString("C");

            strutPickerCollection = curProblem.ImageCollection.PickerImageCollection;
            string label = string.Format("Picker Image[{0},{1}]", strutPickerCollection.Width, strutPickerCollection.Length);

            pickerImageRadioButton.Text = label;
            widthUpDown.Value           = 0;
            lengthUpDown.Value          = 0;
            widthUpDown.Maximum         = strutPickerCollection.Width - 1;
            lengthUpDown.Maximum        = strutPickerCollection.Length - 1;
        }
Example #2
0
        private PickerImageCollection convertPickerImageCollection(DesktopClient.CoolIt_Service.PickerImageCollection rawCollection)
        {
            PickerImageCollection answer = new PickerImageCollection();

            answer.BaseName = rawCollection.BaseName;
            answer.Length   = rawCollection.Length;
            answer.Width    = rawCollection.Width;
            return(answer);
        }