Beispiel #1
0
 protected void signBtnWarm(System.Windows.Forms.GroupBox pnl, DataTable table)
 {
     foreach (Control ctl in pnl.Controls)
     {
         UIControls.ButtonEx btn = ctl as UIControls.ButtonEx;
         if (btn == null)
         {
             continue;
         }
         if (btn.Tag != null)
         {
             if (btn.BackColor == Color.Red)
             {
                 btn.BackColor = Color.Empty;
             }
             string proNum = btn.Tag.ToString( );
             if (table.Select("programId='" + proNum + "'").Length > 0)
             {
                 int count = Convert.ToInt32(table.Select("programId='" + proNum + "'") [0] ["coun"]);
                 if (proDic.ContainsKey(proNum))
                 {
                     btn.Text      = proDic [proNum];
                     btn.Text      = btn.Text + " " + count.ToString( );
                     btn.BackColor = Color.Red;
                 }
             }
         }
     }
 }
Beispiel #2
0
 protected void ShowMenuByRoles(UILibrary.PushPanel.PushPanelItem pnl)
 {
     foreach (Control ctl in pnl.Controls)
     {
         UIControls.ButtonEx btn = ctl as UIControls.ButtonEx;
         if (btn == null)
         {
             continue;
         }
         if (string.IsNullOrEmpty(btn.FunctionCode))
         {
             btn.Visible = false;
             continue;
         }
         string code    = btn.FunctionCode;
         bool   isexist = FishEntity.Variable.Roles.Exists((i) => { return(i.funcode.Equals(code, StringComparison.OrdinalIgnoreCase)); });
         btn.Visible = isexist;
     }
 }
Beispiel #3
0
        private void buttom_Click(object sender, EventArgs e)
        {
            UIControls.ButtonEx currentBtn = sender as UIControls.ButtonEx;
            if (currentBtn == null)
            {
                return;
            }

            currentBtn.Image = ImageUtil.ButtomLeftImageSelected;

            foreach (UILibrary.PushPanel.PushPanelItem item in pushPanel1.Items)
            {
                foreach (Control ctl in item.Controls)
                {
                    UILibrary.SkinButtom btn = ctl as UILibrary.SkinButtom;
                    if (btn == null)
                    {
                        continue;
                    }
                    if (btn.Equals(currentBtn))
                    {
                        continue;
                    }
                    btn.Image = ImageUtil.ButtonLeftImageNormal;
                }
            }


            if (currentBtn.Form == null)
            {
                return;
            }

            if (currentBtn.Form is FormFish)
            {
                FormFish form = currentBtn.Form as FormFish;
                form.ClickGBEvent += form_ClickGBEvent;
            }
            else if (currentBtn.Form is FormQuote)
            {
                FormQuote form = currentBtn.Form as FormQuote;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormConfirm)
            {
                FormConfirm form = currentBtn.Form as FormConfirm;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSpot)
            {
                FormSpot form = currentBtn.Form as FormSpot;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfSale)
            {
                FormSelfSale form = currentBtn.Form as FormSelfSale;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfMake)
            {
                FormSelfMake form = currentBtn.Form as FormSelfMake;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormRemindMessage)
            {
                FormRemindMessage form = currentBtn.Form as FormRemindMessage;
                form.ClickRemindEvent += form_ClickRemindEvent;
            }
            ///父窗口
            //currentBtn.Form.MdiParent = this;
            currentBtn.Form.Show();
            currentBtn.Form.BringToFront();
        }