示例#1
0
		private void FormReportsMore_Load(object sender,EventArgs e) {
			Plugins.HookAddCode(this,"FormReportsMore.FormReportsMore_Load_beginning");
			butPW.Visible=Programs.IsEnabled(ProgramName.PracticeWebReports);
			//hiding feature for 13.3
			//butPatList.Visible=PrefC.GetBool(PrefName.ShowFeatureEhr);
			butPatExport.Visible=PrefC.GetBool(PrefName.ShowFeatureEhr);
			FillLists();
			if(ProgramProperties.IsAdvertisingDisabled(ProgramName.Podium)) {
				groupPatientReviews.Visible=false;
			}
			if(ProgramProperties.IsAdvertisingDisabled(ProgramName.DentalIntel)
				&& ProgramProperties.IsAdvertisingDisabled(ProgramName.PracticeByNumbers)) 
			{
				groupBusiness.Visible=false;
			}
			else if(ProgramProperties.IsAdvertisingDisabled(ProgramName.DentalIntel)
				|| (!Programs.GetCur(ProgramName.DentalIntel).Enabled && Programs.GetCur(ProgramName.PracticeByNumbers).Enabled))
			{
				//Don't show the marketing button if:
				//1.  HQ wants to hide the button
				//2.  The office wants to hide the button
				//3.  The office is using PBN but not DentalIntel
				pictureDentalIntel.Visible=false;
			}
			else if(ProgramProperties.IsAdvertisingDisabled(ProgramName.PracticeByNumbers) 
				|| (!Programs.GetCur(ProgramName.PracticeByNumbers).Enabled && Programs.GetCur(ProgramName.DentalIntel).Enabled))
			{
				//Don't show the marketing button if:
				//1.  HQ wants to hide the button
				//2.  The office wants to hide the button
				//3.  The office is using DentalIntel but not PBN
				picturePracticeByNumbers.Visible=false;
			}
		}
示例#2
0
 private void FormBackup_Load(object sender, System.EventArgs e)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)           //Archive not supported over MT connection. Show warning if Middle Tier is in use.
     {
         butArchive.Enabled   = false;
         labelWarning.Text    = Lan.g(this, "Not available when using a Middle Tier connection. You may only remove old data when directly connected to the server.");
         labelWarning.Visible = true;
     }
     #region Backup Tab
     //usesInternalImages=(PrefC.GetString(PrefName.ImageStore)=="OpenDental.Imaging.SqlStore");
     checkExcludeImages.Checked          = PrefC.GetBool(PrefName.BackupExcludeImageFolder);
     checkArchiveDoBackupFirst.Checked   = PrefC.GetBool(PrefName.ArchiveDoBackupFirst);
     textBackupFromPath.Text             = PrefC.GetString(PrefName.BackupFromPath);
     textBackupToPath.Text               = PrefC.GetString(PrefName.BackupToPath);
     textBackupRestoreFromPath.Text      = PrefC.GetString(PrefName.BackupRestoreFromPath);
     textBackupRestoreToPath.Text        = PrefC.GetString(PrefName.BackupRestoreToPath);
     textBackupRestoreAtoZToPath.Text    = PrefC.GetString(PrefName.BackupRestoreAtoZToPath);
     textBackupRestoreAtoZToPath.Enabled = ShouldUseAtoZFolder();
     butBrowseRestoreAtoZTo.Enabled      = ShouldUseAtoZFolder();
     if (ProgramProperties.IsAdvertisingDisabled(ProgramName.CentralDataStorage))
     {
         groupManagedBackups.Visible = false;
     }
     #endregion
     #region Archive Tab
     string decryptedPass;
     CDT.Class1.Decrypt(PrefC.GetString(PrefName.ArchivePassHash), out decryptedPass);
     textArchivePass.Text         = decryptedPass;
     textArchivePass.PasswordChar = (textArchivePass.Text == "" ? default(char) : '*');
     textArchiveServerName.Text   = PrefC.GetString(PrefName.ArchiveServerName);
     textArchiveUser.Text         = PrefC.GetString(PrefName.ArchiveUserName);
     //If pref is set, use it.  Otherwise, 3 years ago.
     dateTimeArchive.Value = PrefC.GetDate(PrefName.ArchiveDate) == DateTime.MinValue?DateTime.Today.AddYears(-3):PrefC.GetDate(PrefName.ArchiveDate);
     ToggleBackupSettings();
     #endregion
     #region Supplemental Tab
     checkSupplementalBackupEnabled.Checked = PrefC.GetBool(PrefName.SupplementalBackupEnabled);
     if (PrefC.GetDate(PrefName.SupplementalBackupDateLastComplete).Year > 1880)
     {
         textSupplementalBackupDateLastComplete.Text = PrefC.GetDate(PrefName.SupplementalBackupDateLastComplete).ToString();
     }
     textSupplementalBackupCopyNetworkPath.Text = PrefC.GetString(PrefName.SupplementalBackupNetworkPath);
     #endregion Supplemental Tab
     if (ODBuild.IsWeb())
     {
         //OD Cloud users cannot use this tool because they're InnoDb.
         tabControl1.TabPages.Remove(tabPageBackup);
         //We don't want to allow the user to connect to another server.
         checkArchiveDoBackupFirst.Visible = false;
         checkArchiveDoBackupFirst.Checked = false;
         groupBoxBackupConnection.Visible  = false;
         //We don't want the user to be able to tell if a directory exists.
         tabControl1.TabPages.Remove(tabPageSupplementalBackups);
     }
 }
示例#3
0
        public static void LoadToolbar(ODToolBar ToolBarMain, ToolBarsAvail toolBarsAvail)
        {
            List <ToolButItem> toolButItems = ToolButItems.GetForToolBar(toolBarsAvail);

            foreach (ToolButItem toolButItemCur in toolButItems)
            {
                Program programCur = Programs.GetProgram(toolButItemCur.ProgramNum);
                if (PrefC.HasClinicsEnabled)
                {
                    //User should not have PL hidden if Clinics are not Enabled, otherwise this could create a situation where users may turn clinics off but
                    //have hidden the PL button for HQ and then be unable to turn the button back on without re-enabling Clinics.
                    ProgramProperty programProp = ProgramProperties.GetPropForProgByDesc(programCur.ProgramNum
                                                                                         , ProgramProperties.PropertyDescs.ClinicHideButton, Clinics.ClinicNum);
                    if (programProp != null)
                    {
                        continue;                        //If there exists a programProp for a clinic which should have its buttons hidden, carry on and do not display the button.
                    }
                }
                if (ProgramProperties.IsAdvertisingDisabled(programCur))
                {
                    continue;
                }
                string key = programCur.ProgramNum.ToString() + programCur.ProgName.ToString();
                if (ToolBarMain.ImageList.Images.ContainsKey(key))
                {
                    //Dispose the existing image only if it already exists, because the image might have changed.
                    ToolBarMain.ImageList.Images[ToolBarMain.ImageList.Images.IndexOfKey(key)].Dispose();
                    ToolBarMain.ImageList.Images.RemoveByKey(key);
                }
                if (programCur.ButtonImage != "")
                {
                    Image image = PIn.Bitmap(programCur.ButtonImage);
                    ToolBarMain.ImageList.Images.Add(key, image);
                }
                else if (programCur.ProgName == ProgramName.Midway.ToString())
                {
                    Image image = global::OpenDental.Properties.Resources.Midway_Icon_22x22;
                    ToolBarMain.ImageList.Images.Add(key, image);
                }
                if (toolBarsAvail != ToolBarsAvail.MainToolbar)
                {
                    ToolBarMain.Buttons.Add(new ODToolBarButton(ODToolBarButtonStyle.Separator));
                }
                ODToolBarButton button = new ODToolBarButton(toolButItemCur.ButtonText, -1, "", programCur);
                AddDropDown(button, programCur);
                ToolBarMain.Buttons.Add(button);
            }
            for (int i = 0; i < ToolBarMain.Buttons.Count; i++)       //Reset the new index, because it might have changed due to removing/adding to the Images list.
            {
                if (ToolBarMain.Buttons[i].Tag.GetType() != typeof(Program))
                {
                    continue;
                }
                Program programCur = (Program)ToolBarMain.Buttons[i].Tag;
                string  key        = programCur.ProgramNum.ToString() + programCur.ProgName.ToString();
                if (ToolBarMain.ImageList.Images.ContainsKey(key))
                {
                    ToolBarMain.Buttons[i].ImageIndex = ToolBarMain.ImageList.Images.IndexOfKey(key);
                }
            }
        }