示例#1
0
        public EmsFeesControl()
        {
            this.Dock = DockStyle.None;
            init();

            SkinFactory.Instance().SkinChanged += new SkinFactory.SkinChangedEventHandler(OrdListView_SkinChanged);
        }
示例#2
0
 void AlphabetRender_SkinChanged()
 {
     this.moveBackBrush   = SkinFactory.Instance().CurrentSkin.ToolButton_Back_Brush;
     this.selectBackBrush = SkinFactory.Instance().CurrentSkin.TabControl_Back_Brush;
     this.foreNormalBrush = SkinFactory.Instance().CurrentSkin.TabControl_Back_Brush;
     this.Invalidate();
 }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="g"></param>
        public void DoRenderingWidhSelected(System.Drawing.Graphics g)
        {
            if (this.MenuLevel != 1)
            {
                if (menuLevel == 0)
                {
                    //g.FillRectangle(PaintToolBox.selectedBrush, this.mouseBound);
                    g.FillRectangle(new SolidBrush(Color.FromArgb(255, 255, 255)), this.mouseBound);

                    SizeF  textSize = g.MeasureString(this.Text, this.Font);
                    string imgSrc   = "iih.ci.ord.Resources.蓝-02.png";
                    Image  img      = Bitmap.FromStream(Assembly.GetCallingAssembly().GetManifestResourceStream(imgSrc));
                    float  startX   = this.mouseBound.X + 10;
                    float  startY   = (float)this.mouseBound.Y + (this.mouseBound.Height - img.Height) / 2;

                    g.DrawImage(img, new PointF(startX, startY));
                }
                else if (menuLevel == 2)
                {
                    //g.FillRectangle(PaintToolBox.itemSelectedBrush, this.mouseBound);
                    g.FillRectangle(SkinFactory.Instance().CurrentSkin.MenuViewChild_Select_Back_Brush, this.mouseBound);
                    DoRenderingWidhFloatMark(g);
                }
            }
        }
示例#4
0
        public void fillFees()
        {
            if (_dataSource != null)
            {
                moneyLabelMap.Clear();
                this.RemoveRenderAll();
                XapBaseControl allControl = getFeeLabelControl("AllFees", "金额合计:", _dataSource["AllFees"].ToString(), "元", new Point(nOffsetX, 0));
                XapBaseControl payControl = getFeeLabelControl("HasPay", "已缴费:", _dataSource["HasPay"].ToString(), "元", new Point(allControl.Bounds.Right + nOffsetX, 0));
                XapBaseControl noControl  = getFeeLabelControl("NoPay", "未缴费:", _dataSource["NoPay"].ToString(), "元", new Point(payControl.Bounds.Right + nOffsetX, 0));
                this.AddRender(allControl);
                this.AddRender(payControl);
                this.AddRender(noControl);
                ///if (null == infoButton)
                {
                    infoButton = new CiIconToolButton {
                        Visible = this.patDo != null, Tag = 1000, Location = new Point(noControl.Bounds.Right + 2, 0), Size = new Size(24, 24), TipText = "查看缴费", LargeImageMode = true, ImageName = "缴费查询"
                    };                                                                                                                                                                                                                        //

                    SkinFactory.Instance().SkinChanged += infoButton.OnSystemSkinChanged;
                    infoButton.MouseClick += InfoButton_MouseClick;
                }

                this.AddRender(infoButton);
                OrdListView_SkinChanged();
                if (RelativeUIParam.ScreenSize == ScreenSize.Large)
                {
                    this.Size = new Size(allControl.Bounds.Width + payControl.Bounds.Width + noControl.Bounds.Width + infoButton.Size.Width + 80, nTitleHeight);
                    this.Invalidate();
                }
            }
        }
示例#5
0
 /// <summary>
 /// 按钮样式切换事件
 /// </summary>
 private void AssistantBtnBaseView_SkinChanged()
 {
     imgBasePath = SkinFactory.Instance().CurrentSkin.SkinPath;
     foreach (XIconToolButton xIconToolButton in xIconToolButtonsList)
     {
         SetToolbarButtonImage(xIconToolButton, xIconToolButton.Text);
     }
 }
示例#6
0
        private void OnSkinChanged()
        {
            string imagePath = SkinFactory.Instance().CurrentSkin.SkinPath + "\\";

            foreach (XIconToolButton xIconToolButton in _xIconToolButtonsList)
            {
                setToolbarButtonImage(imagePath, xIconToolButton, xIconToolButton.Text, null);
            }
        }
示例#7
0
        /// <summary>
        /// 描绘分割线
        /// </summary>
        /// <param name = "g"></param>
        public void DoRenderingWithSplitLine(System.Drawing.Graphics g)
        {
            //Pen pen = new Pen(PaintToolBox.SolidBrush7, 2);
            Pen   pen    = SkinFactory.Instance().CurrentSkin.MenuViewChild_SplitLine_Pen;// new Pen(SkinFactory.Instance().CurrentSkin.MenuViewChild_SplitLine_Brush, 2);
            Point startP = new Point((this.mouseBound.Right + Convert.ToInt32(this.Left)), Convert.ToInt32(this.Top));
            Point endP   = new Point((this.mouseBound.Right + Convert.ToInt32(this.Left)), this.mouseBound.Bottom);

            g.DrawLine(pen, startP, endP);
        }
示例#8
0
 public DiBannerView()
 {
     this.Size = new System.Drawing.Size(247, 72);
     this.Name = "cidiView";
     constructViewControls();
     this.Enabled   = false;
     this.BackColor = SkinFactory.Instance().CurrentSkin.BannerBackColor;
     SkinFactory.Instance().SkinChanged += new SkinFactory.SkinChangedEventHandler(cidiView_SkinChanged);
     this.SizeChanged += new EventHandler(DiBannerView_SizeChanged);
 }
示例#9
0
        private void GetSkin(SkinFactory skinFactory)
        {
            IButton    button    = skinFactory.CreateButton(button1);
            IComboBox  comboBox  = skinFactory.CreateComboBox(comboBox1);
            ITextField textField = skinFactory.CreateTextField(textBox1);

            button.Display();
            comboBox.Display();
            textField.Display();
        }
示例#10
0
        private void SetIconToolButton(XIconToolButton button, String iconName)
        {
            String SkinPath = LargeImageMode? SkinFactory.Instance().CurrentSkin.SkinPath:SkinFactory.Instance().CurrentSkin.SmalSkinPath;

            button.NormalImage  = Image.FromFile(SkinPath + string.Format("\\{0}-1.png", iconName));
            button.HoverImage   = Image.FromFile(SkinPath + string.Format("\\{0}-2.png", iconName));
            button.DownImage    = Image.FromFile(SkinPath + string.Format("\\{0}-3.png", iconName));
            button.DisableImage = Image.FromFile(SkinPath + string.Format("\\{0}-4.png", iconName));

            button.Invalidate();
        }
示例#11
0
 void Start()
 {
     if (INSTANCE != null && INSTANCE != this)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         INSTANCE = this;
         DontDestroyOnLoad(this);
     }
 }
示例#12
0
 void OrdListView_SkinChanged()
 {
     //this.BackColor = SkinFactory.Instance().CurrentSkin.MenuViewMain_Back_Color;
     this.BackColor = ((SolidBrush)SkinFactory.Instance().CurrentSkin.TabPage_Back_Brush).Color;
     if (moneyLabelMap != null)
     {
         (moneyLabelMap["AllFees"] as XLabel).ForeColor = SkinFactory.Instance().CurrentSkin.MenuSelectedForeColor;
         (moneyLabelMap["HasPay"] as XLabel).ForeColor  = SkinFactory.Instance().CurrentSkin.MenuSelectedForeColor;
         (moneyLabelMap["NoPay"] as XLabel).ForeColor   = SkinFactory.Instance().CurrentSkin.MenuSelectedForeColor;
     }
     this.Invalidate();
 }
示例#13
0
 public AlphabetRender()
 {
     this.Size             = new Size(24, 24);
     this.font             = new Font("微软雅黑", 12F, GraphicsUnit.Pixel);
     this.moveBackBrush    = SkinFactory.Instance().CurrentSkin.ToolButton_Back_Brush;
     this.selectBackBrush  = SkinFactory.Instance().CurrentSkin.TabControl_Back_Brush;
     this.foreNormalBrush  = SkinFactory.Instance().CurrentSkin.TabControl_Back_Brush;
     this.foreSelectBrush  = new SolidBrush(Color.FromArgb(255, 255, 255));
     this.foreDisableBrush = new SolidBrush(Color.FromArgb(178, 178, 178));
     sf               = new StringFormat();
     sf.Alignment     = StringAlignment.Center;
     sf.LineAlignment = StringAlignment.Center;
     SkinFactory.Instance().SkinChanged += new SkinFactory.SkinChangedEventHandler(AlphabetRender_SkinChanged);
 }
示例#14
0
        protected virtual void InitBtnGroup()
        {
            XVerticalToolBar xToolBar = new XVerticalToolBar(this);//父容器

            //xToolBar.ButtonsNumInGroup = 3;
            xToolBar.PaddingTop = 20;
            xToolBar.BackColor  = Color.White;

            this.BackColor = Color.White;

            int tabIndex = 0;

            List <Dictionary <string, AssiBtnDTO> > btnGrpList = this.GetDispalyBtnGroup();

            int[] btnGrp = new int[btnGrpList.Count];
            for (int i = 0; i < btnGrpList.Count; i++)
            {
                Dictionary <string, AssiBtnDTO> btnDic = btnGrpList[i];
                btnGrp[i] = btnDic.Count;
                foreach (string key in btnDic.Keys)
                {
                    AssiBtnDTO      btnDTO = btnDic[key];
                    XIconToolButton button = new XIconToolButton();
                    button.TabIndex = tabIndex++;
                    button.Text     = btnDTO.Text;
                    button.ButtonId = btnDTO.ButtonId;
                    button.TipText  = string.IsNullOrEmpty(btnDTO.TipText) ? btnDTO.Text : btnDTO.TipText;
                    if (btnDTO.ButtonId.Equals("btnDiagDef"))
                    {
                        button.TipText     = "诊断";
                        button.MouseClick += btnDi_MouseClick;
                    }
                    else
                    {
                        button.MouseClick += Button_MouseClick;
                    }
                    button.ValueObj = btnDTO;
                    SetToolbarButtonImage(button, button.Text);
                    xToolBar.AddRender(button);
                    xIconToolButtonsList.Add(button);
                }
            }

            xToolBar.BtnsInGroupAry = btnGrp;
            xToolBar.Layout();
            this.AddRender(xToolBar);

            // 切换按钮样式事件
            SkinFactory.Instance().SkinChanged += AssistantBtnBaseView_SkinChanged;
        }
示例#15
0
 public void SetSkin(FT.Windows.Controls.SimpleSkinType skin)
 {
     /* ISkinControl tmp = null;
      * foreach (Control ctr in this.Controls)
      * {
      *   tmp = ctr as ISkinControl;
      *   if(tmp!=null)
      *   {
      *      tmp.Skin = skin;
      *
      *   }
      * }*/
     SkinFactory.DesignBySkin(this, skin);
 }
示例#16
0
        void buttonView_Load(object sender, EventArgs e)
        {
            //
            // string[] titles = { "门诊组套", "", "医嘱模板", "医技常规", "患者常用", "服务分类", "临床指南" };

            szCiCommand = new ICiCommand[] {
                (ICiCommand)this.Context.Config.GetInstance("MedclingrpAppCommand"),       // 门诊组套
                (ICiCommand)this.Context.Config.GetInstance(TPL_COMMAND),                  // 病历模板
                (ICiCommand)this.Context.Config.GetInstance("OrderTemplateCommand"),       //医嘱模板
                (ICiCommand)this.Context.Config.GetInstance("OpMedicalTechmologyCommand"), //医技常规,
                //(ICiCommand)this.Context.Config.GetInstance("OpPatCommonUseCommand"), // 患者常用
                (ICiCommand)this.Context.Config.GetInstance("OpMedSrvCatgCommand")         // 服务分类
                //(ICiCommand)this.Context.Config.GetInstance("OpClinicalGuideCommand") // 临床指南 暂时屏蔽
            };

            XVerticalToolBar xToolBar = new XVerticalToolBar(this);//父容器

            xToolBar.ButtonsNumInGroup = 4;
            xToolBar.PaddingTop        = 20;
            xToolBar.BackColor         = Color.White;

            this.BackColor = Color.White;

            int tabIndex = 0;

            foreach (ICiCommand cmd in szCiCommand)
            {
                XIconToolButton button = new XIconToolButton();
                button.TabIndex    = tabIndex++;
                button.Text        = cmd.GetTitle();
                button.ImageShow   = false;
                button.ButtonId    = "";
                button.TipText     = cmd.GetTitle();
                button.MouseClick += new MouseEventHandler(button_MouseClick);
                button.ValueObj    = cmd;
                //this.SetBindingAction(xbuttoneventtype[cmd.GetTitle()], button);
                setToolbarButtonImage(tmpIamgePath, button, cmd.GetTitle(), null); // SkinFactory.Instance().CurrentSkin.SkinPath
                xToolBar.AddRender(button);
                _xIconToolButtonsList.Add(button);
            }

            xToolBar.Layout();
            this.AddRender(xToolBar);

            //图标换肤 ganwh add 2016-9-13
            SkinFactory.Instance().SkinChanged += OnSkinChanged;
        }
示例#17
0
 private void Initialize()
 {
     this.top            = 15;
     this.left           = 19;
     this.height         = 39;
     this.width          = 160;
     this.itemHeight     = 31;
     this.itemWidth      = 238;
     this.textBrush      = SkinFactory.Instance().CurrentSkin.MenuViewMain_Fore_Brush;
     this.menuTitleBrush = SkinFactory.Instance().CurrentSkin.MenuViewChild_Title_Brush;
     this.menuItemLeft   = 20;
     //this.menuTitleLeft = 20;
     this.font     = new Font("微软雅黑", 12F, GraphicsUnit.Pixel);
     this.itemFont = new Font("微软雅黑", 10);
     // this.menuItem = new xap.sys.devcfg.func.d.MenuItem();
     //this.selected = false;
     this.isMoveOn   = false;
     this.isMarked   = false;
     this.textRender = new TextRender();
 }
示例#18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="g"></param>


        public void DoMenuRendering(System.Drawing.Graphics g)
        {
            if (this.MenuLevel == 0)
            {
                SizeF  textSize = g.MeasureString(this.Text, this.Font);
                string imgSrc   = "iih.ci.ord.Resources.蓝-01.png";
                Image  img      = Bitmap.FromStream(Assembly.GetCallingAssembly().GetManifestResourceStream(imgSrc));
                float  startX   = this.mouseBound.X + 10;
                float  startY   = (float)this.mouseBound.Y + (this.mouseBound.Height - img.Height) / 2;
                float  startY2  = (float)this.mouseBound.Y + (this.mouseBound.Height - textSize.Height) / 2;

                g.DrawImage(img, new PointF(startX, startY));
                g.DrawString(this.Text, font, SkinFactory.Instance().CurrentSkin.MenuViewMain_Fore_Brush, startX + img.Width + 2, startY2);

                Pen   pen = SkinFactory.Instance().CurrentSkin.NaviMenu_SplitLine_Pen;
                Point p1  = new Point(this.mouseBound.Left, this.mouseBound.Bottom);
                Point p2  = new Point(this.mouseBound.Right - 1, this.mouseBound.Bottom);
                // g.DrawLine(pen, p1, p2);
            }
            else if (this.MenuLevel == 1)
            {
                SizeF textSize = g.MeasureString(this.Text, this.Font);
                float startX   = (float)this.mouseBound.X;//(this.mouseBound.Width - textSize.Width) / 2;
                float startY   = (float)this.mouseBound.Y + (this.mouseBound.Height - textSize.Height) / 2;
                g.DrawString(this.Text, font, SkinFactory.Instance().CurrentSkin.MenuViewChild_Title_Brush, startX, startY);
            }
            else if (this.MenuLevel == 2)
            {
                SizeF textSize = g.MeasureString(this.Text, this.itemFont);
                float startX   = (float)this.mouseBound.X + menuItemLeft;
                float startY   = (float)this.mouseBound.Y + (this.mouseBound.Height - textSize.Height) / 2;

                StringFormat format = new StringFormat();
                format.Trimming      = StringTrimming.EllipsisCharacter;
                textRender.ForeBrush = SkinFactory.Instance().CurrentSkin.MenuViewMain_Fore_Brush;
                textRender.Font      = this.itemFont;
                textRender.Name      = this.Text;
                textRender.Render(g);
                // g.DrawString(this.Text, this.itemFont, textBrush, new RectangleF(startX,startY,this.Bound.Right - 30 -startX,textSize.Height),format);
            }
        }
示例#19
0
        public override void Render(Graphics g)
        {
            //文本色刷
            Brush drawBrush = new SolidBrush(foreColor);
            Brush fillBrush = null;
            Pen   borderPen = null;

            switch (ItemState)
            {
            case RenderState.Normal:
                break;

            case RenderState.Down:
                borderPen = SkinFactory.Instance().CurrentSkin.SelectedBorderPen;
                fillBrush = SkinFactory.Instance().CurrentSkin.ToolButton_Back_Brush;
                g.FillRectangle(fillBrush, this.mouseBound);
                g.DrawRectangle(borderPen, new Rectangle(this.Location.X + 1, this.Location.Y + 1, this.Size.Width - 2, this.Size.Height - 2));
                break;

            case RenderState.Disable:
                break;

            default:
                borderPen = SkinFactory.Instance().CurrentSkin.SelectedBorderPen;
                g.DrawRectangle(borderPen, new Rectangle(this.Location.X + 1, this.Location.Y + 1, this.Size.Width - 2, this.Size.Height - 2));
                break;
            }
            Rectangle drawStringRect;

            if (FlagIcon != null)
            {
                g.DrawImage(FlagIcon, new Point(this.Bound.X + 10, this.Bound.Y + (this.Bound.Height - FlagIcon.Height) / 2));
                drawStringRect = new Rectangle(new Point(this.Bound.X + 10 + 8 + FlagIcon.Width, this.Bound.Y + (this.Bound.Height - this.fontSize.Height) / 2), new Size(this.Bound.Width - 10 - 8 - FlagIcon.Width, this.fontSize.Height));
            }
            else
            {
                drawStringRect = new Rectangle(new Point(this.Bound.X + 10 + 8 + 16, this.Bound.Y + (this.Bound.Height - this.fontSize.Height) / 2), new Size(this.Bound.Width - 10 - 8 - 16, this.fontSize.Height));
            }
            g.DrawString(this.Text, DrawFont, drawBrush, drawStringRect, _drawFormat);
        }
示例#20
0
 /// <summary>
 /// 描绘浮动mark
 /// </summary>
 /// <param name = "g"></param>
 public void DoRenderingWidhMoveEnter(System.Drawing.Graphics g)
 {
     if (this.MenuLevel != 1)
     {
         if (menuLevel == 0)
         {
             //g.FillRectangle(PaintToolBox.moveBrush, this.mouseBound);
             g.FillRectangle(SkinFactory.Instance().CurrentSkin.MenuViewMain_Hover_Brush, this.mouseBound);
         }
         else if (menuLevel == 2)
         {
             //g.FillRectangle(PaintToolBox.itemMoveBrush, this.mouseBound);
             g.FillRectangle(SkinFactory.Instance().CurrentSkin.MenuViewChild_Hover_Brush, this.mouseBound);
             DoRenderingWidhFloatMark(g);
             this.textRender.IsMoveOn = true;
             //if (!this.textRender.timer.Enabled)
             {
                 this.textRender.StartRolling();
             }
         }
     }
 }
示例#21
0
 public void DesignBySkin(SimpleSkinType skin)
 {
     SkinFactory.DefaultDesignBySkin(this, skin);
 }
示例#22
0
 void cidiView_SkinChanged()
 {
     this.BackColor = SkinFactory.Instance().CurrentSkin.BannerBackColor;
     this.Invalidate();
 }
示例#23
0
 protected override void DisposeManaged()
 {
     SkinFactory.Instance().SkinChanged -= new SkinFactory.SkinChangedEventHandler(AlphabetRender_SkinChanged);
     base.DisposeManaged();
 }
示例#24
0
 protected override void DisposeManaged()
 {
     base.DisposeManaged();
     SkinFactory.Instance().SkinChanged -= new SkinFactory.SkinChangedEventHandler(OrdListView_SkinChanged);
 }