コード例 #1
0
ファイル: ProgramL.cs プロジェクト: kjb7749/testImport
		public static void LoadToolbar(ODToolBar ToolBarMain,ToolBarsAvail toolBarsAvail) {
			List<ToolButItem> toolButItems=ToolButItems.GetForToolBar(toolBarsAvail);
			for(int i=0;i<toolButItems.Count;i++) {
				ToolButItem toolButItemCur=((ToolButItem)toolButItems[i]);
				Program programCur=Programs.GetProgram(toolButItemCur.ProgramNum);
				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);
				}
				if(toolBarsAvail!=ToolBarsAvail.MainToolbar) {
					ToolBarMain.Buttons.Add(new ODToolBarButton(ODToolBarButtonStyle.Separator));
				}
				ToolBarMain.Buttons.Add(new ODToolBarButton(toolButItemCur.ButtonText,-1,"",programCur));
			}
			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);
				}
			}
		}
コード例 #2
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormClaimsSend));
     this.label6            = new System.Windows.Forms.Label();
     this.contextMenuStatus = new System.Windows.Forms.ContextMenu();
     this.imageList1        = new System.Windows.Forms.ImageList(this.components);
     this.calendarTo        = new System.Windows.Forms.MonthCalendar();
     this.calendarFrom      = new System.Windows.Forms.MonthCalendar();
     this.label2            = new System.Windows.Forms.Label();
     this.label1            = new System.Windows.Forms.Label();
     this.panelSplitter     = new System.Windows.Forms.Panel();
     this.panelHistory      = new System.Windows.Forms.Panel();
     this.gridHistory       = new OpenDental.UI.ODGrid();
     this.panel1            = new System.Windows.Forms.Panel();
     this.ToolBarHistory    = new OpenDental.UI.ODToolBar();
     this.butDropTo         = new OpenDental.UI.Button();
     this.butDropFrom       = new OpenDental.UI.Button();
     this.textDateFrom      = new OpenDental.ValidDate();
     this.textDateTo        = new OpenDental.ValidDate();
     this.gridMain          = new OpenDental.UI.ODGrid();
     this.ToolBarMain       = new OpenDental.UI.ODToolBar();
     this.panelHistory.SuspendLayout();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // label6
     //
     this.label6.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label6.Location  = new System.Drawing.Point(107, -44);
     this.label6.Name      = "label6";
     this.label6.Size      = new System.Drawing.Size(112, 44);
     this.label6.TabIndex  = 21;
     this.label6.Text      = "Insurance Claims";
     this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     //
     // imageList1
     //
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList1.Images.SetKeyName(0, "");
     this.imageList1.Images.SetKeyName(1, "");
     this.imageList1.Images.SetKeyName(2, "");
     this.imageList1.Images.SetKeyName(3, "");
     this.imageList1.Images.SetKeyName(4, "");
     this.imageList1.Images.SetKeyName(5, "");
     this.imageList1.Images.SetKeyName(6, "");
     //
     // calendarTo
     //
     this.calendarTo.Location          = new System.Drawing.Point(196, 29);
     this.calendarTo.MaxSelectionCount = 1;
     this.calendarTo.Name          = "calendarTo";
     this.calendarTo.TabIndex      = 42;
     this.calendarTo.Visible       = false;
     this.calendarTo.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.calendarTo_DateSelected);
     //
     // calendarFrom
     //
     this.calendarFrom.Location          = new System.Drawing.Point(6, 29);
     this.calendarFrom.MaxSelectionCount = 1;
     this.calendarFrom.Name          = "calendarFrom";
     this.calendarFrom.TabIndex      = 39;
     this.calendarFrom.Visible       = false;
     this.calendarFrom.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.calendarFrom_DateSelected);
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(196, 5);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(72, 18);
     this.label2.TabIndex  = 36;
     this.label2.Text      = "To";
     this.label2.TextAlign = System.Drawing.ContentAlignment.BottomRight;
     //
     // label1
     //
     this.label1.Location  = new System.Drawing.Point(1, 5);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(75, 18);
     this.label1.TabIndex  = 34;
     this.label1.Text      = "From";
     this.label1.TextAlign = System.Drawing.ContentAlignment.BottomRight;
     //
     // panelSplitter
     //
     this.panelSplitter.Cursor     = System.Windows.Forms.Cursors.SizeNS;
     this.panelSplitter.Location   = new System.Drawing.Point(2, 398);
     this.panelSplitter.Name       = "panelSplitter";
     this.panelSplitter.Size       = new System.Drawing.Size(961, 6);
     this.panelSplitter.TabIndex   = 50;
     this.panelSplitter.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panelSplitter_MouseDown);
     this.panelSplitter.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panelSplitter_MouseMove);
     this.panelSplitter.MouseUp   += new System.Windows.Forms.MouseEventHandler(this.panelSplitter_MouseUp);
     //
     // panelHistory
     //
     this.panelHistory.Controls.Add(this.calendarFrom);
     this.panelHistory.Controls.Add(this.label1);
     this.panelHistory.Controls.Add(this.calendarTo);
     this.panelHistory.Controls.Add(this.gridHistory);
     this.panelHistory.Controls.Add(this.panel1);
     this.panelHistory.Controls.Add(this.butDropTo);
     this.panelHistory.Controls.Add(this.butDropFrom);
     this.panelHistory.Controls.Add(this.textDateFrom);
     this.panelHistory.Controls.Add(this.label2);
     this.panelHistory.Controls.Add(this.textDateTo);
     this.panelHistory.Location = new System.Drawing.Point(0, 403);
     this.panelHistory.Name     = "panelHistory";
     this.panelHistory.Size     = new System.Drawing.Size(972, 286);
     this.panelHistory.TabIndex = 51;
     //
     // gridHistory
     //
     this.gridHistory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)));
     this.gridHistory.HScrollVisible   = false;
     this.gridHistory.Location         = new System.Drawing.Point(4, 31);
     this.gridHistory.Name             = "gridHistory";
     this.gridHistory.ScrollValue      = 0;
     this.gridHistory.SelectionMode    = System.Windows.Forms.SelectionMode.MultiExtended;
     this.gridHistory.Size             = new System.Drawing.Size(959, 252);
     this.gridHistory.TabIndex         = 33;
     this.gridHistory.Title            = "History";
     this.gridHistory.TranslationName  = "TableClaimHistory";
     this.gridHistory.CellDoubleClick += new OpenDental.UI.ODGridClickEventHandler(this.gridHistory_CellDoubleClick);
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.SystemColors.ControlDark;
     this.panel1.Controls.Add(this.ToolBarHistory);
     this.panel1.Location = new System.Drawing.Point(387, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(591, 30);
     this.panel1.TabIndex = 44;
     //
     // ToolBarHistory
     //
     this.ToolBarHistory.BackColor    = System.Drawing.SystemColors.Control;
     this.ToolBarHistory.ImageList    = this.imageList1;
     this.ToolBarHistory.Location     = new System.Drawing.Point(1, 1);
     this.ToolBarHistory.Name         = "ToolBarHistory";
     this.ToolBarHistory.Size         = new System.Drawing.Size(584, 29);
     this.ToolBarHistory.TabIndex     = 43;
     this.ToolBarHistory.ButtonClick += new OpenDental.UI.ODToolBarButtonClickEventHandler(this.ToolBarHistory_ButtonClick);
     //
     // butDropTo
     //
     this.butDropTo.AdjustImageLocation = new System.Drawing.Point(0, 0);
     this.butDropTo.Autosize            = true;
     this.butDropTo.BtnShape            = OpenDental.UI.enumType.BtnShape.Rectangle;
     this.butDropTo.BtnStyle            = OpenDental.UI.enumType.XPStyle.Silver;
     this.butDropTo.Location            = new System.Drawing.Point(352, 4);
     this.butDropTo.Name     = "butDropTo";
     this.butDropTo.Size     = new System.Drawing.Size(22, 23);
     this.butDropTo.TabIndex = 41;
     this.butDropTo.Text     = "V";
     this.butDropTo.UseVisualStyleBackColor = true;
     this.butDropTo.Click += new System.EventHandler(this.butDropTo_Click);
     //
     // butDropFrom
     //
     this.butDropFrom.AdjustImageLocation = new System.Drawing.Point(0, 0);
     this.butDropFrom.Autosize            = true;
     this.butDropFrom.BtnShape            = OpenDental.UI.enumType.BtnShape.Rectangle;
     this.butDropFrom.BtnStyle            = OpenDental.UI.enumType.XPStyle.Silver;
     this.butDropFrom.Location            = new System.Drawing.Point(162, 4);
     this.butDropFrom.Name     = "butDropFrom";
     this.butDropFrom.Size     = new System.Drawing.Size(22, 23);
     this.butDropFrom.TabIndex = 40;
     this.butDropFrom.Text     = "V";
     this.butDropFrom.UseVisualStyleBackColor = true;
     this.butDropFrom.Click += new System.EventHandler(this.butDropFrom_Click);
     //
     // textDateFrom
     //
     this.textDateFrom.Location = new System.Drawing.Point(79, 6);
     this.textDateFrom.Name     = "textDateFrom";
     this.textDateFrom.Size     = new System.Drawing.Size(81, 20);
     this.textDateFrom.TabIndex = 35;
     //
     // textDateTo
     //
     this.textDateTo.Location = new System.Drawing.Point(269, 6);
     this.textDateTo.Name     = "textDateTo";
     this.textDateTo.Size     = new System.Drawing.Size(81, 20);
     this.textDateTo.TabIndex = 37;
     //
     // gridMain
     //
     this.gridMain.HScrollVisible   = false;
     this.gridMain.Location         = new System.Drawing.Point(4, 31);
     this.gridMain.Name             = "gridMain";
     this.gridMain.ScrollValue      = 0;
     this.gridMain.SelectionMode    = System.Windows.Forms.SelectionMode.MultiExtended;
     this.gridMain.Size             = new System.Drawing.Size(959, 368);
     this.gridMain.TabIndex         = 32;
     this.gridMain.Title            = "Claims Waiting to Send";
     this.gridMain.TranslationName  = "TableQueue";
     this.gridMain.CellDoubleClick += new OpenDental.UI.ODGridClickEventHandler(this.gridMain_CellDoubleClick);
     //
     // ToolBarMain
     //
     this.ToolBarMain.Dock         = System.Windows.Forms.DockStyle.Top;
     this.ToolBarMain.ImageList    = this.imageList1;
     this.ToolBarMain.Location     = new System.Drawing.Point(0, 0);
     this.ToolBarMain.Name         = "ToolBarMain";
     this.ToolBarMain.Size         = new System.Drawing.Size(971, 29);
     this.ToolBarMain.TabIndex     = 31;
     this.ToolBarMain.ButtonClick += new OpenDental.UI.ODToolBarButtonClickEventHandler(this.ToolBarMain_ButtonClick);
     //
     // FormClaimsSend
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(971, 691);
     this.Controls.Add(this.gridMain);
     this.Controls.Add(this.panelHistory);
     this.Controls.Add(this.panelSplitter);
     this.Controls.Add(this.ToolBarMain);
     this.Controls.Add(this.label6);
     this.MaximizeBox   = false;
     this.MinimizeBox   = false;
     this.Name          = "FormClaimsSend";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "Send Claims";
     this.Load         += new System.EventHandler(this.FormPendingClaims_Load);
     this.panelHistory.ResumeLayout(false);
     this.panelHistory.PerformLayout();
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
コード例 #3
0
ファイル: ProgramL.cs プロジェクト: ChemBrain/OpenDental
        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);
                }
            }
        }