示例#1
0
 private void FormProgramLinkEdit_Load(object sender, System.EventArgs e)
 {
     if (ProgramCur.ProgName != "")
     {
         //user not allowed to delete program links that we include, only their own.
         butDelete.Enabled = false;
     }
     pathOverrideOld   = ProgramProperties.GetLocalPathOverrideForProgram(ProgramCur.ProgramNum);
     textOverride.Text = pathOverrideOld;
     FillForm();
 }
示例#2
0
        private void FillForm()
        {
            //ComboClinic is filled in the load method
            if (PIn.Int(_patNumOrChartNum.PropertyValue) == 1)
            {
                radioChart.Checked = true;
            }
            else
            {
                radioPatient.Checked = true;
            }
            List <ToolButItem> listToolButItems = ToolButItems.GetForProgram(_progCur.ProgramNum);

            listToolBars.Items.Clear();
            for (int i = 0; i < Enum.GetNames(typeof(ToolBarsAvail)).Length; i++)
            {
                listToolBars.Items.Add(Enum.GetNames(typeof(ToolBarsAvail))[i]);
            }
            for (int i = 0; i < listToolButItems.Count; i++)
            {
                listToolBars.SetSelected((int)listToolButItems[i].ToolBar, true);
            }
            checkEnabled.Checked = _progCur.Enabled;
            textPath.Text        = _progCur.Path;
            textButtonText.Text  = listToolButItems[0].ButtonText;
            pictureBox.Image     = PIn.Bitmap(_progCur.ButtonImage);
            try {
                textInfoFile.Text = _infoFilePath.PropertyValue;
                _pathOverrideOld  = ProgramProperties.GetLocalPathOverrideForProgram(_progCur.ProgramNum);
                textOverride.Text = _pathOverrideOld;
                if (_dictLocationIDs.ContainsKey(_clinicNumCur))
                {
                    textLocationID.Text = _dictLocationIDs[_clinicNumCur].PropertyValue;
                }
            }
            catch (Exception) {
                MsgBox.Show(this, "You are missing a program property from the database.  Please call support to resolve this issue.");
                DialogResult = DialogResult.Cancel;
                return;
            }
        }
 private void FormProgramLinkEdit_Load(object sender, System.EventArgs e)
 {
     _isLoading = true;
     if (ProgramCur.ProgName != "")
     {
         //user not allowed to delete program links that we include, only their own.
         butDelete.Enabled = false;
     }
     pathOverrideOld   = ProgramProperties.GetLocalPathOverrideForProgram(ProgramCur.ProgramNum);
     textOverride.Text = pathOverrideOld;
     FillForm();
     DisableUIElementsBasedOnClinicRestriction(); //Disable the UI Elements if needed.
     HideClinicControls(PrefC.HasClinicsEnabled); //Hide the "Hide Button for Clinics" button based upon the user's clinics being on or off.
     ShowPLButHiddenLabel();                      //Display warning label for "Hide Button for Clinics" if needed.
     SetAdvertising();
     if (!CanEnableProgram())
     {
         labelCloudMessage.Visible = true;
     }
     _isLoading = false;
 }
示例#4
0
        private void FormXchargeSetup_Load(object sender, EventArgs e)
        {
            prog = Programs.GetCur(ProgramName.Xcharge);
            if (prog == null)
            {
                return;
            }
            checkEnabled.Checked = prog.Enabled;
            textPath.Text        = prog.Path;
            pathOverrideOld      = ProgramProperties.GetLocalPathOverrideForProgram(prog.ProgramNum);
            textOverride.Text    = pathOverrideOld;
            textUser.Text        = ProgramProperties.GetPropVal(prog.ProgramNum, "Username");
            textPassword.Text    = ProgramProperties.GetPropVal(prog.ProgramNum, "Password");
            string paymentType = ProgramProperties.GetPropVal(prog.ProgramNum, "PaymentType");

            for (int i = 0; i < DefC.Short[(int)DefCat.PaymentTypes].Length; i++)
            {
                comboPaymentType.Items.Add(DefC.Short[(int)DefCat.PaymentTypes][i].ItemName);
                if (DefC.Short[(int)DefCat.PaymentTypes][i].DefNum.ToString() == paymentType)
                {
                    comboPaymentType.SelectedIndex = i;
                }
            }
        }