Beispiel #1
0
        /// <summary>
        /// 绑定
        /// </summary>
        private void LoadGridComboBoxItem()
        {
            if (this.toolcboProduct.SelectedItem == null)
            {
                return;
            }
            string szProduct = (this.toolcboProduct.SelectedItem as HdpProduct).NAME_SHORT;

            RightPoint[] rights = RightResource.GetRightPoints(szProduct);
            if (rights != null)
            {
                this.colRightKey.Items.AddRange(rights);
            }
            //命令
            this.colUICommand.Items.Clear();
            if (CommandHandler.Instance.Commands.Count > 0)
            {
                foreach (string item in CommandHandler.Instance.Commands.Keys)
                {
                    this.colUICommand.Items.Add(item);
                }
            }
            //快捷键
            this.colShortCuts.Items.Clear();
            string[] arrShortcutKeys = SystemData.ShortcutKeys.GetArrShortcutKeys();
            if (arrShortcutKeys.Length > 0)
            {
                foreach (string item in arrShortcutKeys)
                {
                    this.colShortCuts.Items.Add(item);
                }
            }
        }
Beispiel #2
0
        private void LoadFlpGrantCheckList()
        {
            this.flpGrant.Controls.Clear();
            if (this.cboProduct.SelectedItem == null)
            {
                return;
            }
            string szProduct = (this.cboProduct.SelectedItem as HdpProduct).NAME_SHORT;

            RightPoint[] rights = RightResource.GetRightPoints(szProduct);
            if (rights != null)
            {
                foreach (RightPoint point in rights)
                {
                    CheckBox chk = new CheckBox();
                    chk.Width = 260;
                    chk.Text  = point.RightDesc;
                    chk.Tag   = point;
                    if (dicHdpRoleGrant.ContainsKey(point.RightKey))
                    {
                        chk.Checked = true;
                    }
                    this.flpGrant.Controls.Add(chk);
                }
            }
        }