Beispiel #1
0
        public KmsHuman(Main trayPtn, KmsRobot robot, DataModel dataModel)
        {
            _TrayPtn = trayPtn;
            _Robot = robot;
            _DataModel = dataModel;

            InitializeComponent();
            BtRes.Image = _ResLeave;

            CbRes.Items.Add(new MCategory { C2010203 = "0", C2010205 = "请选择" });
            CbRes.Items.AddRange(_DataModel.ListCategory().ToArray());
            CbRes.SelectedIndex = 0;
            MiTxt.Checked = true;

            if (_TxtLast == null)
            {
                _TxtLast = new TxtDefault(this, _DataModel);
            }
            ShowControl(_TxtLast.Control);

            Rectangle rect = Screen.PrimaryScreen.WorkingArea;
            _MagicPtn = new MagicPtn(this);
            _MagicPtn.UseDefaultAction();
            _MagicPtn.ExitButtonHandler = PbExit_Click;
            _MagicPtn.Location = new Point(rect.Width - _MagicPtn.Width, rect.Height - _MagicPtn.Height);
            _MagicPtn.Text = "会话";
        }
Beispiel #2
0
        public AppWindow()
        {
            InitializeComponent();

            _MagicPtn = new MagicPtn(this);
            _MagicPtn.LoadRes();
            _MagicPtn.InitExitButton(Properties.Resources._del, null, null);
            _MagicPtn.ExitButtonToolTip = "取消";
            _MagicPtn.ExitButtonHandler = PbExit_Click;
            _MagicPtn.InitHideButton(Properties.Resources._add, null, null);
            _MagicPtn.HideButtonToolTip = "选择";
            _MagicPtn.HideButtonHandler = PbHide_Click;
            _MagicPtn.InitMenuButton(Properties.Resources._win, null, null);
            _MagicPtn.MenuButtonToolTip = "窗体列表";
            _MagicPtn.MenuButtonVisible = true;
            _MagicPtn.MenuButtonHandler = PbMenu_Click;

            Rectangle rect = Screen.PrimaryScreen.WorkingArea;
            _MagicPtn.Location = new Point(rect.Width - _MagicPtn.Width, rect.Height - _MagicPtn.Height);
            _MagicPtn.Text = "查找组件";
        }