示例#1
0
        void AssMedSrvCatgDialog_Load(object sender, EventArgs e)
        {
            if (this.ownerView == null || this.ownerView.Context.Config == null)
            {
                return;
            }
            XapBaseControl emrView = this.ownerView.Context.Config.GetInstance("emrView") as XapBaseControl;

            this.Location = emrView.PointToScreen(emrView.Location);
            this.Size     = emrView.Size;

            this.rootView = new XLayoutPanel();
            rootView.Dock = DockStyle.Fill;
            this.AddRender(rootView);

            XLayoutPanel centerPanel = new XLayoutPanel();

            XUserControl xUserControl = new XUserControl();

            xUserControl.Init(Application.StartupPath + "\\modules\\iihci\\ui\\assmedsrvcatg\\assmedsrvcatg_config.xml");

            // 此处不能设置为 Fill 方式,否则 xUserControl 会充满整个窗体,
            // 会将其他通过代码创建的控件全部遮挡
            xUserControl.Dock     = DockStyle.Fill;
            xUserControl.Location = new Point(0, 0);
            xUserControl.Size     = this.Size;
            rootView.AddControl(xUserControl, ControlPosition.Center);
            itemView = xUserControl.GetConfig().GetInstance("AssMedSrvCatgItemView") as AssMedSrvCatgItemView;
            itemView.setOwnerView(this.ownerView);

//             treeView = this.ownerView.Context.Config.GetInstance("AssMedSrvCatgTreeView") as AssMedSrvCatgTreeView;
//             itemView = this.ownerView.Context.Config.GetInstance("AssMedSrvCatgItemView") as AssMedSrvCatgItemView;
//             itemView.setOwnerView(this.ownerView);
//
//             centerPanel.AddControl(treeView, ControlPosition.Left, 220);
//             centerPanel.AddControl(itemView, ControlPosition.Center);
//
//             rootView.AddControl(centerPanel, ControlPosition.Center);

            XLayoutPanel bottomPanel = new XLayoutPanel();

            bottomPanel.BackColor = Color.Gray;
            rootView.AddControl(bottomPanel, ControlPosition.Bottom, 44);

            xUserControl.LoadData();
        }
示例#2
0
        private void InfoButton_MouseClick(object sender, MouseEventArgs e)
        {
            var mmContainer = new XBaseControl()
            {
                Size = new Size(473, 200)
            };

            var ordFeeCollectInfoView = new OrdFeeCollectInfoView(mmContainer, _dataSource["group"] as FArrayList);

            ordFeeCollectInfoView.Dock = DockStyle.Fill;
            ordFeeCollectInfoView.SingleBorderStyle = true;
            mmContainer.AddRender(ordFeeCollectInfoView);
            var popWindow = new XContextForm(mmContainer);
            var pt        = this.ownerView.Location;

            pt.Offset((ownerView.Size.Width - mmContainer.Size.Width) / 2, (RelativeUIParam.ScreenSize != ScreenSize.Large)? -7:22);
            popWindow.Show(ownerView.PointToScreen(pt));
        }