예제 #1
0
        void sign_OnButtonGraphicCheckChanged(object sender, ButtonGraphicEventArgs e)
        {
            for (int i = 0; i < panelSign.Controls.Count; i++)
            {
                SignSettingControl sign = panelSign.Controls[i] as SignSettingControl;
                if (sign != e.Sign)
                {
                    sign.ButtonGraphic = false;
                }
            }

            _useButtonGraphic = e.Sign.ButtonGraphic;

            if (e.Sign.LiveMessage != null)
            {
                if (e.Sign.LiveMessage.Target != null && e.Sign.LiveMessage.Image != null)
                {
                    _buttonImage = e.Sign.LiveMessage.Image;
                }
                else
                {
                    _buttonImage = null;
                }
            }
            else
            {
                _buttonImage = null;
            }

            rdoSize_SelectedIndexChanged(sender, e);
        }
예제 #2
0
 private void LoadSignToControl(LiveSign sign)
 {
     for (int i = 0; i < panelSign.Controls.Count; i++)
     {
         SignSettingControl ctlSign = panelSign.Controls[i] as SignSettingControl;
         if (ctlSign.SignName == sign.Name)
         {
             ctlSign.LiveSign = sign;
             break;
         }
     }
 }
예제 #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            int ctlCount = panelSign.Controls.Count;

            if (ctlCount > 0)
            {
                for (int i = 0; i < ctlCount; i++)
                {
                    SignSettingControl ctlSign = panelSign.Controls[i] as SignSettingControl;

                    if (ctlSign.SignEnable)
                    {
                        _lstSign.Add(ctlSign.LiveSign);
                    }
                }
            }

            this.DialogResult = DialogResult.OK;
        }
예제 #4
0
        private void LoadSign()
        {
            if (_signItem != null)
            {
                DashboardItem[] itms = _signItem;

                if (itms.Length > 0)
                {
                    SignSettingControl sign = null;
                    Point point             = new Point(1, 1);

                    for (int i = 0; i < itms.Length; i++)
                    {
                        if (itms[i] == null)
                        {
                            return;
                        }
                        sign = new SignSettingControl();
                        sign.OnButtonGraphicCheckChanged += new EventHandler <ButtonGraphicEventArgs>(sign_OnButtonGraphicCheckChanged);
                        sign.SignName   = itms[i].Name;
                        sign.Location   = point;
                        sign.SignItem   = itms[i];
                        sign.SignEnable = false;
                        panelSign.Controls.Add(sign);
                        point.Y += sign.Height + 4;
                    }

                    if (panelSign.Height < point.Y)
                    {
                        panelSign.Height = point.Y;
                    }

                    SetScrollBar();
                }
            }
        }