예제 #1
0
        /// <summary>
        /// Updates the textbox with the appropriate value
        /// </summary>
        private void UpdateTextBox()
        {
            var Plans   = CostCtrl.GetPlans();
            var percent = Percent.Checked;
            var maxPay  = MaxPay.Checked;

            bool percentValid = false;

            if (PlanList.SelectedItem != null)
            {
                var plan = CostCtrl.GetPlan(PlanList.SelectedItem.ToString());


                if (PlanQueries.SelectedItem != null)
                {
                    percentValid = (CostCtrl.GetNum(PlanQueries.SelectedItem.ToString(), plan.Type, percent, maxPay) <= 1);
                }
                if (percent && percentValid)
                {
                    Cost.Text = (100 * CostCtrl.GetNum(PlanQueries.SelectedItem.ToString(), plan.Type, percent, maxPay)).ToString();
                    DollarLabel.Hide();
                    PercentLabel.Show();
                }
                else
                {
                    if (PlanQueries.SelectedItem != null)
                    {
                        Cost.Text = CostCtrl.GetNum(PlanQueries.SelectedItem.ToString(), plan.Type, percent, maxPay).ToString();
                    }
                    DollarLabel.Show();
                    PercentLabel.Hide();
                }
            }
        }
예제 #2
0
 public Test_passing()
 {
     InitializeComponent();
     Progress.Hide();
     PercentLabel.Hide();
     hiding += BackButton.Hide;
     hiding += NextButton.Hide;
     hiding += AnswersSingle.Hide;
     hiding += AnswersMultiple.Hide;
 }
예제 #3
0
        public ChangeCosts(CougarCostsController CoCtrl)
        {
            this.CostCtrl = CoCtrl;
            InitializeComponent();
            PercentLabel.Hide();
            Error.Hide();
            Copay.Checked = true;

            var Plans = CostCtrl.GetPlans();

            foreach (var plan in Plans)
            {
                PlanList.Items.Add(plan.Type.ToString());
            }
        }