Exemple #1
0
 private void FillForm()
 {
     ProgramProperties.RefreshCache();
     PropertyList         = ProgramProperties.GetListForProgram(ProgramCur.ProgramNum);
     textProgName.Text    = ProgramCur.ProgName;
     textProgDesc.Text    = ProgramCur.ProgDesc;
     checkEnabled.Checked = ProgramCur.Enabled;
     if (GetProp("IsStandalone") == "1")
     {
         radioModeStandalone.Checked = true;
     }
     else
     {
         radioModeTight.Checked = true;
     }
     SetModeVisibilities();
     textHL7FolderIn.Text  = PrefC.GetString(PrefName.HL7FolderIn);
     textHL7FolderOut.Text = PrefC.GetString(PrefName.HL7FolderOut);
     comboDefaultUserGroup.Items.Clear();
     for (int i = 0; i < UserGroups.List.Length; i++)
     {
         comboDefaultUserGroup.Items.Add(UserGroups.List[i].Description);
         if (GetProp("DefaultUserGroup") == UserGroups.List[i].UserGroupNum.ToString())
         {
             comboDefaultUserGroup.SelectedIndex = i;
         }
     }
     checkShowImages.Checked = GetProp("ShowImagesModule") == "1";
     checkShowImages.Checked = GetProp("FeeSchedulesSetManually") == "1";
 }
Exemple #2
0
        private void FillForm()
        {
            //this is not refined enough to be called more than once on the form because it will not
            //remember the toolbars that were selected.
            ToolButItems.RefreshCache();
            ProgramProperties.RefreshCache();
            textProgName.Text      = ProgramCur.ProgName;
            textProgDesc.Text      = ProgramCur.ProgDesc;
            checkEnabled.Checked   = ProgramCur.Enabled;
            textPath.Text          = ProgramCur.Path;
            textCommandLine.Text   = ProgramCur.CommandLine;
            textPluginDllName.Text = ProgramCur.PluginDllName;
            textNote.Text          = ProgramCur.Note;
            List <ToolButItem> itemsForProgram = ToolButItems.GetForProgram(ProgramCur.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 < itemsForProgram.Count; i++)
            {
                listToolBars.SetSelected((int)itemsForProgram[i].ToolBar, true);
            }
            if (itemsForProgram.Count > 0)          //the text on all buttons will be the same for now
            {
                textButtonText.Text = itemsForProgram[0].ButtonText;
            }
            FillGrid();
        }
Exemple #3
0
 ///<summary>Opens the appropriate form to edit the program property.</summary>
 private void PropertyTypeDirector(ProgramProperty prop)
 {
     if (ProgramCur.ProgName == ProgramName.XVWeb.ToString() && prop.PropertyDesc == XVWeb.ProgramProps.ImageCategory)         //imageCategory
     {
         List <Def> listDefs = Defs.GetDefsForCategory(DefCat.ImageCats, true);
         int        idxDef   = listDefs.FindIndex(x => x.DefNum == PIn.Long(prop.PropertyValue));
         InputBox   inputBox = new InputBox("Choose an Image Category", listDefs.Select(x => x.ItemName).ToList(), idxDef);
         inputBox.ShowDialog();
         if (inputBox.DialogResult != DialogResult.OK || inputBox.SelectedIndex == -1)
         {
             return;
         }
         prop.PropertyValue = POut.Long(listDefs[inputBox.SelectedIndex].DefNum);
         ProgramProperties.Update(prop);
     }
     else
     {
         bool propIsPassword        = ProgramCur.ProgName == ProgramName.XVWeb.ToString() && prop.PropertyDesc == XVWeb.ProgramProps.Password;
         FormProgramProperty FormPP = new FormProgramProperty(propIsPassword);
         FormPP.ProgramPropertyCur = prop;
         FormPP.ShowDialog();
         if (FormPP.DialogResult != DialogResult.OK)
         {
             return;
         }
     }
     ProgramProperties.RefreshCache();
     FillGrid();
 }
Exemple #4
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (checkEnabled.Checked && textPluginDllName.Text != "")
            {
                string dllPath = ODFileUtils.CombinePaths(Application.StartupPath, textPluginDllName.Text);
                if (dllPath.Contains("[VersionMajMin]"))
                {
                    Version vers = new Version(Application.ProductVersion);
                    dllPath = dllPath.Replace("[VersionMajMin]", "");                   //now stripped clean
                }
                if (!File.Exists(dllPath))
                {
                    MessageBox.Show(Lan.g(this, "Dll file not found:") + " " + dllPath);
                    return;
                }
            }
            if (textPluginDllName.Text != "" && textPath.Text != "")
            {
                if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "If both a path and a plug-in are specified, the path will be ignored.  Continue anyway?"))
                {
                    return;
                }
            }
            ProgramCur.ProgName = textProgName.Text;
            ProgramCur.ProgDesc = textProgDesc.Text;
            ProgramCur.Enabled  = checkEnabled.Checked;
            ProgramCur.Path     = textPath.Text;
            if (pathOverrideOld != textOverride.Text)
            {
                ProgramProperties.InsertOrUpdateLocalOverridePath(ProgramCur.ProgramNum, textOverride.Text);
                ProgramProperties.RefreshCache();
            }
            ProgramCur.CommandLine   = textCommandLine.Text;
            ProgramCur.PluginDllName = textPluginDllName.Text;
            ProgramCur.Note          = textNote.Text;
            ProgramCur.ButtonImage   = POut.Bitmap((Bitmap)pictureBox.Image, System.Drawing.Imaging.ImageFormat.Png);
            if (IsNew)
            {
                Programs.Insert(ProgramCur);
            }
            else
            {
                Programs.Update(ProgramCur);
            }
            ToolButItems.DeleteAllForProgram(ProgramCur.ProgramNum);
            //then add one toolButItem for each highlighted row in listbox
            ToolButItem ToolButItemCur;

            for (int i = 0; i < listToolBars.SelectedIndices.Count; i++)
            {
                ToolButItemCur            = new ToolButItem();
                ToolButItemCur.ProgramNum = ProgramCur.ProgramNum;
                ToolButItemCur.ButtonText = textButtonText.Text;
                ToolButItemCur.ToolBar    = (ToolBarsAvail)listToolBars.SelectedIndices[i];
                ToolButItems.Insert(ToolButItemCur);
            }
            DialogResult = DialogResult.OK;
        }
 private void FillForm()
 {
     ProgramProperties.RefreshCache();
     PropertyList          = ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
     textProgName.Text     = ProgramCur.ProgName;
     textProgDesc.Text     = ProgramCur.ProgDesc;
     checkEnabled.Checked  = ProgramCur.Enabled;
     textHL7FolderOut.Text = PrefC.GetString(PrefName.HL7FolderOut);
 }
		private void FillForm(){
			ProgramProperties.RefreshCache();
			PropertyList=ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
			textProgName.Text=ProgramCur.ProgName;
			textProgDesc.Text=ProgramCur.ProgDesc;
			checkEnabled.Checked=ProgramCur.Enabled;
			if(GetProp("HideChartRxButtons")=="1") {
				checkHideButChartRx.Checked=true;
			}
			else {
				checkHideButChartRx.Checked=false;
			}
			if(GetProp("ProcRequireSignature")=="1") {
				checkProcRequireSignature.Checked=true;
			}
			else {
				checkProcRequireSignature.Checked=false;
			}
			if(GetProp("ProcNotesNoIncomplete")=="1") {
				checkProcNotesNoIncomplete.Checked=true;
			}
			else {
				checkProcNotesNoIncomplete.Checked=false;
			}
			SetModeRadioButtons(GetProp("eClinicalWorksMode"));
			SetModeVisibilities();
			textECWServer.Text=GetProp("eCWServer");//this property will not exist if using Oracle, eCW will never use Oracle
			if(HL7Defs.IsExistingHL7Enabled()) {
				HL7Def def=HL7Defs.GetOneDeepEnabled();
				textHL7Server.Text=def.HL7Server;
				textHL7ServiceName.Text=def.HL7ServiceName;
				textHL7FolderIn.Text=def.OutgoingFolder;//because these are the opposite of the way they are in the HL7Def
				textHL7FolderOut.Text=def.IncomingFolder;
				checkQuadAsToothNum.Checked=def.IsQuadAsToothNum;
			}
			else {
				textHL7Server.Text=GetProp("HL7Server");//this property will not exist if using Oracle, eCW will never use Oracle
				textHL7ServiceName.Text=GetProp("HL7ServiceName");//this property will not exist if using Oracle, eCW will never use Oracle
				textHL7FolderIn.Text=PrefC.GetString(PrefName.HL7FolderIn);
				textHL7FolderOut.Text=PrefC.GetString(PrefName.HL7FolderOut);
				//if a def is enabled, the value associated with the def will override this setting
				checkQuadAsToothNum.Checked=GetProp("IsQuadAsToothNum")=="1";//this property will not exist if using Oracle, eCW will never use Oracle
			}
			textODServer.Text=MiscData.GetODServer();
			comboDefaultUserGroup.Items.Clear();
			_listUserGroups=UserGroups.GetList();
			for(int i=0;i<_listUserGroups.Count;i++) {
				comboDefaultUserGroup.Items.Add(_listUserGroups[i].Description);
				if(GetProp("DefaultUserGroup")==_listUserGroups[i].UserGroupNum.ToString()) {
					comboDefaultUserGroup.SelectedIndex=i;
				}
			}
			checkShowImages.Checked=GetProp("ShowImagesModule")=="1";
			checkFeeSchedules.Checked=GetProp("FeeSchedulesSetManually")=="1";
			textMedPanelURL.Text=GetProp("MedicalPanelUrl");//this property will not exist if using Oracle, eCW will never use Oracle
			checkLBSessionId.Checked=GetProp("IsLBSessionIdExcluded")=="1";
		}
        ///<summary>Opens a form where the user can type in their selection for a program poperty.</summary>
        private void ShowFormProgramProperty(ProgramProperty programProperty)
        {
            bool propIsPassword = ProgramCur.ProgName == ProgramName.XVWeb.ToString() && programProperty.PropertyDesc == XVWeb.ProgramProps.Password;
            FormProgramProperty formProgramProperty = new FormProgramProperty(propIsPassword);

            formProgramProperty.ProgramPropertyCur = programProperty;
            formProgramProperty.ShowDialog();
            if (formProgramProperty.DialogResult != DialogResult.OK)
            {
                return;
            }
            ProgramProperties.RefreshCache();
            FillGrid();
        }
Exemple #8
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormProgramProperty FormPP = new FormProgramProperty();

            FormPP.ProgramPropertyCur = (ProgramProperty)ProgramPropertiesForProgram[e.Row];
            FormPP.ShowDialog();
            if (FormPP.DialogResult != DialogResult.OK)
            {
                return;
            }
            ProgramProperties.RefreshCache();
            ProgramPropertiesForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
            FillGrid();
        }
        ///<summary>Opens a form where the user can select an option from a combo box for a program poperty.</summary>
        ///<param name="listValuesForDb">The value that should be stored in the db for the corresponding display item that is selected. This list should
        ///have the same number of items as listForDisplay.</param>
        ///<param name="listForDisplay">The value that will be displayed to the user in the combo box. This list should have the same number of items
        ///as listValuesForDb.</param>
        private void ShowComboBoxForProgramProperty(ProgramProperty programProperty, List <string> listValuesForDb, List <string> listForDisplay
                                                    , string prompt)
        {
            ProgramProperty programPropertyOld = programProperty.Copy();
            InputBox        inputBox           = new InputBox(prompt, listForDisplay, listValuesForDb.FindIndex(x => x == programProperty.PropertyValue));

            inputBox.ShowDialog();
            if (inputBox.DialogResult != DialogResult.OK || inputBox.SelectedIndex == -1 ||
                listValuesForDb[inputBox.SelectedIndex] == programPropertyOld.PropertyValue)
            {
                return;
            }
            programProperty.PropertyValue = listValuesForDb[inputBox.SelectedIndex];
            ProgramProperties.Update(programProperty, programPropertyOld);
            ProgramProperties.RefreshCache();
            FillGrid();
        }
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (prog == null)
            {
                MsgBox.Show(this, "X-Charge entry is missing from the database.");               //should never happen
                return;
            }
            if (textOverride.Text != "")
            {
                if (!File.Exists(textOverride.Text))
                {
                    MsgBox.Show(this, "Local override path is not valid.");
                    return;
                }
            }
            else if (!File.Exists(textPath.Text))
            {
                MsgBox.Show(this, "Path is not valid.");
                return;
            }
            if (comboPaymentType.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a payment type first.");
                return;
            }
            prog.Enabled = checkEnabled.Checked;
            prog.Path    = textPath.Text;
            if (pathOverrideOld != textOverride.Text)
            {
                ProgramProperties.InsertOrUpdateLocalOverridePath(prog.ProgramNum, textOverride.Text);
                ProgramProperties.RefreshCache();
            }
            Programs.Update(prog);
            string paymentType = DefC.Short[(int)DefCat.PaymentTypes][comboPaymentType.SelectedIndex].DefNum.ToString();

            ProgramProperties.SetProperty(prog.ProgramNum, "PaymentType", paymentType);
            ProgramProperties.SetProperty(prog.ProgramNum, "Username", textUser.Text);
            ProgramProperties.SetProperty(prog.ProgramNum, "Password", textPassword.Text);
            DataValid.SetInvalid(InvalidType.Programs);
            DialogResult = DialogResult.OK;
        }
Exemple #11
0
 private void FillForm()
 {
     ProgramProperties.RefreshCache();
     PropertyList         = ProgramProperties.GetListForProgram(ProgramCur.ProgramNum);
     textProgName.Text    = ProgramCur.ProgName;
     textProgDesc.Text    = ProgramCur.ProgDesc;
     checkEnabled.Checked = ProgramCur.Enabled;
     SetModeRadioButtons(GetProp("eClinicalWorksMode"));
     SetModeVisibilities();
     textECWServer.Text = GetProp("eCWServer");
     if (HL7Defs.IsExistingHL7Enabled())
     {
         HL7Def def = HL7Defs.GetOneDeepEnabled();
         textHL7Server.Text      = def.HL7Server;
         textHL7ServiceName.Text = def.HL7ServiceName;
         textHL7FolderIn.Text    = def.OutgoingFolder;           //because these are the opposite of the way they are in the HL7Def
         textHL7FolderOut.Text   = def.IncomingFolder;
     }
     else
     {
         textHL7Server.Text      = GetProp("HL7Server");
         textHL7ServiceName.Text = GetProp("HL7ServiceName");
         textHL7FolderIn.Text    = PrefC.GetString(PrefName.HL7FolderIn);
         textHL7FolderOut.Text   = PrefC.GetString(PrefName.HL7FolderOut);
     }
     textODServer.Text = MiscData.GetODServer();
     comboDefaultUserGroup.Items.Clear();
     for (int i = 0; i < UserGroups.List.Length; i++)
     {
         comboDefaultUserGroup.Items.Add(UserGroups.List[i].Description);
         if (GetProp("DefaultUserGroup") == UserGroups.List[i].UserGroupNum.ToString())
         {
             comboDefaultUserGroup.SelectedIndex = i;
         }
     }
     checkShowImages.Checked   = GetProp("ShowImagesModule") == "1";
     checkFeeSchedules.Checked = GetProp("FeeSchedulesSetManually") == "1";
     textMedPanelURL.Text      = GetProp("MedicalPanelUrl");
 }
        private void FillForm()
        {
            //this is not refined enough to be called more than once on the form because it will not
            //remember the toolbars that were selected.
            ToolButItems.RefreshCache();
            ProgramProperties.RefreshCache();
            textProgName.Text      = ProgramCur.ProgName;
            textProgDesc.Text      = ProgramCur.ProgDesc;
            checkEnabled.Checked   = ProgramCur.Enabled;
            textPath.Text          = ProgramCur.Path;
            textCommandLine.Text   = ProgramCur.CommandLine;
            textPluginDllName.Text = ProgramCur.PluginDllName;
            textNote.Text          = ProgramCur.Note;
            pictureBox.Image       = PIn.Bitmap(ProgramCur.ButtonImage);
            List <ToolButItem> itemsForProgram = ToolButItems.GetForProgram(ProgramCur.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 < itemsForProgram.Count; i++)
            {
                listToolBars.SetSelected((int)itemsForProgram[i].ToolBar, true);
            }
            if (!AllowToolbarChanges)             //As we add more static bridges, we will need to enhance this to show/hide controls as needed.
            {
                listToolBars.ClearSelected();
                listToolBars.Enabled = false;
            }
            if (itemsForProgram.Count > 0)          //the text on all buttons will be the same for now
            {
                textButtonText.Text = itemsForProgram[0].ButtonText;
            }
            FillGrid();
        }