public override ObjectState CalcButtonState(IBaseButton button, IButtonsPanel panel)
        {
            CustomFlyoutPanel flyoutPanel = panel.Owner as CustomFlyoutPanel;

            if (flyoutPanel.HotButtonIndex == panel.Buttons.IndexOf(button))
            {
                return(ObjectState.Hot);
            }
            return(base.CalcButtonState(button, panel));
        }
コード例 #2
0
        private void BtnZoomInAction(IBaseButton button)
        {
            schedulerMain.TimelineView.Scales[5].Width = schedulerMain.Bounds.Width / 18;
            schedulerMain.TimelineView.Scales[7].Width = schedulerMain.TimelineView.Scales[5].Width / 2;
            schedulerMain.GoToDate(schedulerMain.Start.Date.AddHours(6));
            schedulerMain.ActiveView.LayoutChanged();
            var buttonMinus = groupControlMain.CustomHeaderButtons.Where(x => x.Properties.Caption.Equals("Уменьшить")).Single();

            buttonMinus.Properties.Enabled = true;
            button.Properties.Enabled      = false;
        }
コード例 #3
0
        private void BtnSearchAction(IBaseButton button)
        {
            switch (button.Properties.ToolTip)
            {
            case "Скрыть поиск":
                BtnHideSearchAction(button);
                break;

            case "Показать поиск":
                BtnShowSearchAction(button);
                break;
            }
        }
コード例 #4
0
ファイル: CFHandCtrl.cs プロジェクト: ewin66/Safety-JM-Server
        /// <summary>
        ///     得到控制量
        /// </summary>
        /// <param name="fzh"></param>
        /// <returns></returns>
        private IBaseButton[] GetControlButtons(string Station, bool ifEnable = false)
        {
            // 20170629
            IBaseButton[] temp = null;
            if (string.IsNullOrEmpty(Station))
            {
                return(temp);
            }
            var fzh = 0;

            if (Station.Length > 3)
            {
                fzh = Convert.ToInt32(Station.Substring(0, 3));
            }
            if (fzh <= 0)
            {
                return(temp);
            }
            IList <Jc_DefInfo> Control = DEFServiceModel.QueryPointByInfs(fzh, 3);

            if (null == Control)
            {
                return(temp);
            }
            try
            {
                Control = Control.OrderBy(item => item.Kh).ToList();
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }

            temp = new IBaseButton[Control.Count];
            for (var i = 0; i < Control.Count; i++)
            {
                var tempButton = new WindowsUIButton();
                tempButton.Caption = Control[i].Point;
                tempButton.ToolTip = Control[i].Wz;
                tempButton.Tag     = Control[i].Bz14; //xuzp20160524
                tempButton.Style   = ButtonStyle.CheckButton;
                tempButton.Image   = Resources.apply_32x32;
                tempButton.Checked = true; //表示当前都没有控制
                if (ifEnable)
                {
                    tempButton.Enabled = false;
                }
                temp[i] = tempButton;
            }
            return(temp);
        }
コード例 #5
0
 private void BtnHideSearchAction(IBaseButton button)
 {
     button.Properties.ToolTip             = "Показать поиск";
     button.Properties.Image               = Properties.Resources.search_pink_32x32;
     gvFreeDeals.OptionsFind.AlwaysVisible = false;
 }
コード例 #6
0
 private void BtnShowSearchAction(IBaseButton button)
 {
     button.Properties.ToolTip             = "Скрыть поиск";
     button.Properties.Image               = Properties.Resources.search_32x32;
     gvFreeDeals.OptionsFind.AlwaysVisible = true;
 }