Esempio n. 1
0
        private static String format(UCostDistribution ctrl, String number)
        {
            if (ctrl.Enabled)
            {
                return(number);
            }

            return(CUtil.FormatNumber(number));
        }
Esempio n. 2
0
 private static void disableTextBoxes(UCostDistribution ctrl)
 {
     ctrl.txtJan.IsEnabled = ctrl.Enabled;
     ctrl.txtFeb.IsEnabled = ctrl.Enabled;
     ctrl.txtMar.IsEnabled = ctrl.Enabled;
     ctrl.txtApr.IsEnabled = ctrl.Enabled;
     ctrl.txtMay.IsEnabled = ctrl.Enabled;
     ctrl.txtJun.IsEnabled = ctrl.Enabled;
     ctrl.txtJul.IsEnabled = ctrl.Enabled;
     ctrl.txtAug.IsEnabled = ctrl.Enabled;
     ctrl.txtSep.IsEnabled = ctrl.Enabled;
     ctrl.txtOct.IsEnabled = ctrl.Enabled;
     ctrl.txtNov.IsEnabled = ctrl.Enabled;
     ctrl.txtDec.IsEnabled = ctrl.Enabled;
 }
Esempio n. 3
0
 private static void updateGui(UCostDistribution ctrl)
 {
     ctrl.txtJan.Text = format(ctrl, ctrl.ItemObj.JanAmount);
     ctrl.txtFeb.Text = format(ctrl, ctrl.ItemObj.FebAmount);
     ctrl.txtMar.Text = format(ctrl, ctrl.ItemObj.MarAmount);
     ctrl.txtApr.Text = format(ctrl, ctrl.ItemObj.AprAmount);
     ctrl.txtMay.Text = format(ctrl, ctrl.ItemObj.MayAmount);
     ctrl.txtJun.Text = format(ctrl, ctrl.ItemObj.JunAmount);
     ctrl.txtJul.Text = format(ctrl, ctrl.ItemObj.JulAmount);
     ctrl.txtAug.Text = format(ctrl, ctrl.ItemObj.AugAmount);
     ctrl.txtSep.Text = format(ctrl, ctrl.ItemObj.SepAmount);
     ctrl.txtOct.Text = format(ctrl, ctrl.ItemObj.OctAmount);
     ctrl.txtNov.Text = format(ctrl, ctrl.ItemObj.NovAmount);
     ctrl.txtDec.Text = format(ctrl, ctrl.ItemObj.DecAmount);
     ctrl.txtTot.Text = format(ctrl, ctrl.ItemObj.TotAmount);
 }
Esempio n. 4
0
        private static void updateMothLabel(UCostDistribution ctrl)
        {
            ctrl.txtJan.Text = "มกราคม";
            ctrl.txtJan.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtFeb.Text = "กุมภาพันธ์";
            ctrl.txtFeb.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtMar.Text = "มีนาคม";
            ctrl.txtMar.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtApr.Text = "เมษายน";
            ctrl.txtApr.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtMay.Text = "พฤษภาคม";
            ctrl.txtMay.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtJun.Text = "มิถุนายน";
            ctrl.txtJun.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtJul.Text = "กรกฎาคม";
            ctrl.txtJul.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtAug.Text = "สิงหาคม";
            ctrl.txtAug.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtSep.Text = "กันยายน";
            ctrl.txtSep.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtOct.Text = "ตุลาคม";
            ctrl.txtOct.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtNov.Text = "พฤศจิกายน";
            ctrl.txtNov.HorizontalContentAlignment = HorizontalAlignment.Center;

            ctrl.txtDec.Text = "ธันวาคม";
            ctrl.txtDec.HorizontalContentAlignment = HorizontalAlignment.Center;
        }
Esempio n. 5
0
        private static void OnSelectedItemObjEvtChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            UCostDistribution ctrl = obj as UCostDistribution;

            updateGui(ctrl);
        }
Esempio n. 6
0
        private static void OnSelectedCaptionEvtChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            UCostDistribution ctrl = obj as UCostDistribution;

            ctrl.txtCaption.Text = ctrl.Caption;
        }
Esempio n. 7
0
        private static void OnSelectedEnabledEvtChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            UCostDistribution ctrl = obj as UCostDistribution;

            disableTextBoxes(ctrl);
        }
Esempio n. 8
0
        private static void OnSelectedIsForLabelEvtChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            UCostDistribution ctrl = obj as UCostDistribution;

            updateMothLabel(ctrl);
        }