Exemple #1
0
        public WeekSelectorCtrl()
        {
            PopupContainerControl popupControl = new PopupContainerControl();

            weekSelector = new UCWeekSelector();
            popupControl.Controls.Add(weekSelector);

            Properties.PopupControl               = popupControl;
            Properties.DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Custom;
            this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;

            popupControl.Width  = this.Width;
            popupControl.Height = 320;
            weekSelector.Dock   = System.Windows.Forms.DockStyle.Fill;

            SizeChanged += new EventHandler(
                delegate(object s, EventArgs e)
            {
                popupControl.Width = Width;
            });
            weekSelector.DateChanged += new EventHandler(
                delegate(object o, EventArgs e)
            {
                OnDateChanged();
            });
            Date        = DateTime.Today;
            this.Popup += new EventHandler(
                delegate(object s, EventArgs e)
            {
                weekSelector.MakeRowVisible();
            });
            AddButton();
        }
        private void BindToViewModel()
        {
            bindingSource.DataSource = viewModel;
            searchNumber.DataBindings.Add("Editvalue", bindingSource, "SearchNumber");
            elementNumber.DataBindings.Add("Text", bindingSource, "ElementNumber");

            elementType.DataBindings.Add(
                BindingHelper.CreateOneWayReadToString("Text", bindingSource, "ElementType",
                                                       (value) =>
            {
                return((string)localizedAllPartTypes[(int)value]);
            }));

            inspections.DataBindings.Add("DataSource", bindingSource, "InspectionTestResults");

            inspectorsDataSource.DataSource      = viewModel.Inspectors;
            inspectorsDataSource.ListChanged    += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();

            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock                        = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl             = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;
        }
Exemple #3
0
        protected override PopupContainerControl CreatePopupCheckListControl()
        {
            PopupContainerControl containerControl = base.CreatePopupCheckListControl();

            SetControl(containerControl);
            return(containerControl);
        }
        private PopupContainerControl CreatePopupControl()
        {
            PopupContainerControl popupControl = new PopupContainerControl();

            popupControl.Controls.Add(DetailGrid);
            return(popupControl);
        }
Exemple #5
0
        public WeekSelectorCtrl()
        {
            PopupContainerControl popupControl = new PopupContainerControl();
            weekSelector = new UCWeekSelector();
            popupControl.Controls.Add(weekSelector);
            
            Properties.PopupControl = popupControl;
            Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
            this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
            
            popupControl.Width = this.Width;
            popupControl.Height = 320;
            weekSelector.Dock = System.Windows.Forms.DockStyle.Fill;

                SizeChanged += new EventHandler(
                    delegate(object s, EventArgs e)
                    { 
                        popupControl.Width = Width;
                    });
                weekSelector.DateChanged += new EventHandler(
                    delegate(object o, EventArgs e)
                    {
                        OnDateChanged();
                    });
                Date = DateTime.Today;
                this.Popup += new EventHandler(
                    delegate(object s, EventArgs e)
                    {
                        weekSelector.MakeRowVisible();
                    });
            AddButton();
        }
Exemple #6
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public DaDataAddress()
        {
            _listBox = new ListBox
            {
                Dock = DockStyle.Fill
            };
            _listBox.MouseDoubleClick += _listBox_MouseDoubleClick;

            _popupControl = new PopupContainerControl();
            _popupControl.Controls.Add(_listBox);

            _popupEdit = new PopupContainerEdit()
            {
                Dock = DockStyle.Fill
            };

            _popupEdit.Properties.PopupFormMinSize = _popupEdit.MinimumSize;
            _popupEdit.Properties.PopupControl     = _popupControl;
            _popupEdit.Properties.TextEditStyle    = TextEditStyles.Standard;
            _popupEdit.ButtonClick += DaDataAddress_ButtonClick;
            _popupEdit.QueryPopUp  += _popupEdit_QueryPopUp;
            _popupEdit.Resize      += _popupEdit_Resize;

            this.Controls.Add(_popupEdit);
        }
        public XtraFADatePicker()
        {
            ToolTipController.DefaultController.CalcSize   += OnCalculateToolTip;
            ToolTipController.DefaultController.CustomDraw += OnCustomDrawToolTip;

            picker                          = new XtraFAMonthView();
            picker.ShowBorder               = false;
            picker.SelectedDateTime         = null;
            picker.Dock                     = DockStyle.Fill;
            picker.DoubleClick             += OnDoubleClicked;
            picker.ButtonClicked           += OnButtonClicked;
            picker.SelectedDateTimeChanged += OnSelectionChanged;

            popupContainerControl = new PopupContainerControl();
            popupContainerControl.Controls.Add(picker);

            Properties.PopupControl = popupContainerControl;
            Properties.QueryPopUp  += OnEditorQueryPopup;

            popupContainerControl.Size = new Size(200, 200);
            popupContainerControl.PopupContainerProperties.PopupSizeable          = false;
            popupContainerControl.PopupContainerProperties.CloseOnLostFocus       = true;
            popupContainerControl.PopupContainerProperties.CloseOnOuterMouseClick = true;
            popupContainerControl.PopupContainerProperties.PopupSizeable          = false;

            Text = string.Empty;
            Controls.Add(popupContainerControl);
            UpdateTheme();
        }
 public ToolBarPopupEdit(Codon codon, object caller)
     : base(new PopupContainerEdit())
 {
     this.menuCommand = null;
     this.RightToLeft = RightToLeft.Inherit;
     this.caller = caller;
     this.codon = codon;
     this.popupContainerEdit = base.Control as PopupContainerEdit;
     PopupContainerControl control = new PopupContainerControl();
     this.popupContainerEdit.Properties.PopupControl = control;
     this.popupContainerEdit.Properties.CloseOnLostFocus = false;
     this.popupContainerEdit.Properties.CloseOnOuterMouseClick = false;
     control.ControlAdded += new ControlEventHandler(this.popupControl_ControlAdded);
     this.popupContainerEdit.QueryPopUp += new CancelEventHandler(this.popupContainerEdit_QueryPopUp);
     this.popupContainerEdit.QueryCloseUp += new CancelEventHandler(this.popupContainerEdit_QueryCloseUp);
     try
     {
         this.CreateCommand(codon);
     }
     catch (Exception exception)
     {
         LoggingService.Error(exception);
     }
     this.UpdateStatus();
     this.UpdateText();
 }
        public XtraFADatePicker()
        {
            ToolTipController.DefaultController.CalcSize += OnCalculateToolTip;
            ToolTipController.DefaultController.CustomDraw += OnCustomDrawToolTip;

            picker = new XtraFAMonthView();
            picker.ShowBorder = false;
            picker.SelectedDateTime = null;
            picker.Dock = DockStyle.Fill;
            picker.DoubleClick += OnDoubleClicked;
            picker.ButtonClicked += OnButtonClicked;
            picker.SelectedDateTimeChanged += OnSelectionChanged;

            popupContainerControl = new PopupContainerControl();
            popupContainerControl.Controls.Add(picker);

            Properties.PopupControl = popupContainerControl;
            Properties.QueryPopUp += OnEditorQueryPopup;

            popupContainerControl.Size = new Size(200, 200);
            popupContainerControl.PopupContainerProperties.PopupSizeable = false;
            popupContainerControl.PopupContainerProperties.CloseOnLostFocus = true;
            popupContainerControl.PopupContainerProperties.CloseOnOuterMouseClick = true;
            popupContainerControl.PopupContainerProperties.PopupSizeable = false;

            Text = string.Empty;
            Controls.Add(popupContainerControl);
            UpdateTheme();
        }
Exemple #10
0
        private void BindToViewModel()
        {
            SpoolBindingSource.DataSource = viewModel;

            pipeNumber.DataBindings
            .Add("EditValue", SpoolBindingSource, "PipeNumber");

            pipeLength.DataBindings
            .Add("EditValue", SpoolBindingSource, "PipeLength");

            spoolNumber.DataBindings
            .Add("EditValue", SpoolBindingSource, "SpoolNumber");

            spoolLength.DataBindings
            .Add("EditValue", SpoolBindingSource, "SpoolLength");

            pipeNumber.Properties.DataSource = viewModel.allPipes;

            inspectionHistory.DataBindings
            .Add("DataSource", SpoolBindingSource, "InspectionTestResults");

            deactivated.DataBindings
            .Add(BindingHelper.CreateCheckEditInverseBinding(
                     "Checked", SpoolBindingSource, "SpoolIsActive"));

            inspectorsDataSource.DataSource      = viewModel.Inspectors;
            inspectorsDataSource.ListChanged    += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();

            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock                        = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl             = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;
        }
Exemple #11
0
        private void InitializeComponent()
        {
            this.cntrlSearch1 = new CTechCore.Tools.cntrlSearch();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // cntrlSearch1
            //
            this.cntrlSearch1.BackColor          = System.Drawing.Color.White;
            this.cntrlSearch1.Dock               = System.Windows.Forms.DockStyle.Fill;
            this.cntrlSearch1.DataSource         = null;
            this.cntrlSearch1.EditValue          = null;
            this.cntrlSearch1.FocusedRow         = null;
            this.cntrlSearch1.Location           = new System.Drawing.Point(0, 0);
            this.cntrlSearch1.Name               = "cntrlSearch1";
            this.cntrlSearch1.NewButtonVisible   = false;
            this.cntrlSearch1.OnRowCellStyle     = null;
            this.cntrlSearch1.OnRowClick         = null;
            this.cntrlSearch1.ShowButtonPanel    = false;
            this.cntrlSearch1.ShowFindPanel      = true;
            this.cntrlSearch1.ViewShowGroupPanel = false;
            this.cntrlSearch1.ShowSummary        = false;
            this.cntrlSearch1.Size               = new System.Drawing.Size(865, 536);
            this.cntrlSearch1.TextEditor.Properties.EditValueChanging += TextEditor_EditValueChanged;

            _popupContainerControl = new PopupContainerControl()
            {
                Name = "1"
            };
            _popupContainerControl.Size = new System.Drawing.Size(400, 300);
            _popupContainerControl.Controls.Add(cntrlSearch1);
            PopupControl = _popupContainerControl;

            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
Exemple #12
0
        void InitPopup()
        {
            gridLoaiCong.Visible = true;
            //Lấy table loại công và add column Chon
            dtLoaiCong = _dbData.GetDataTable("select * from LoaiCong where NgungSuDung='0' order by LoaiCongLam");
            DataColumn dcChon = new DataColumn("Chon", typeof(Boolean));

            dcChon.DefaultValue = false;
            dtLoaiCong.Columns.Add(dcChon);
            dtLCBackup = dtLoaiCong.Copy();

            // gán dữ liệu vào gridLoaiCong
            gridLoaiCong.DataSource = dtLoaiCong;
            gvLoaiCong.BestFitColumns();
            gridLoaiCong.Dock = DockStyle.Fill;

            //
            PopupContainerControl pcc = new PopupContainerControl();

            pcc.Controls.Add(gridLoaiCong);
            riPopup.PopupControl     = pcc;
            riPopup.TextEditStyle    = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
            riPopup.PopupFormMinSize = new Size(300, 200);
            riPopup.QueryPopUp      += new CancelEventHandler(riPopup_QueryPopUp);                               //chuyen du lieu tu cell vao grid control loai cong
            riPopup.CloseUp         += new DevExpress.XtraEditors.Controls.CloseUpEventHandler(riPopup_CloseUp); //lay du lieu tu grid control loai cong vao cell

            gridNhanVien.RepositoryItems.Add(riPopup);
        }
        public RepositoryItemSelectDMGridTemplate(GroupElementType type, GridView gridView, string TableName, string columnField, string IDField, string DislayField, string getField, string[] NameFields,
            string[] Subjects, string FilterField, DMBasicGrid.InitGridColumns InitGridCol, DMBasicGrid.GetRule Rule, DelegationLib.DefinePermission permission, params string[] readOnlyField)
        {
            CotAo = columnField + getField + "_PLV";
            this.ShowPopupShadow = true;
            dmGridTemplate1 = new DMGrid();
            popupControl = new PopupContainerControl();
            this.CloseOnOuterMouseClick = false;
            this.PopupControl = popupControl;
            popupControl.Controls.Add(dmGridTemplate1);
            popupControl.Size = dmGridTemplate1.Size;
            this.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
            this.EditValueChanging += new DevExpress.XtraEditors.Controls.ChangingEventHandler(RepositoryItemSelectDMGridTemplate_EditValueChanging);
            //dmGridTemplate1._init(type, TableName, IDField, DislayField, NameFields, Subjects, InitGridCol, Rule, permission, readOnlyField);
            this.Popup += new EventHandler(RepositoryItemSelectDMGridTemplate_Popup);
            this.CloseUp += new DevExpress.XtraEditors.Controls.CloseUpEventHandler(popupContainerEdit1_CloseUp);
            this.Closed += new DevExpress.XtraEditors.Controls.ClosedEventHandler(popupContainerEdit1_Closed);
            this.KeyDown += new KeyEventHandler(popupContainerEdit1_KeyDown);
            this.DislayField = DislayField;
            this.FilterField = FilterField;

            gridView.GridControl.DataSourceChanged += delegate(object sender, EventArgs e)
            {
                if (gridView.GridControl.DataSource != null &&
                    !((DataTable)gridView.GridControl.DataSource).Columns.Contains(CotAo))
                {

                    DataTable dt = (DataTable)gridView.GridControl.DataSource;
                    dt.Columns.Add(new DataColumn(CotAo));
                    SetValueTable(ref dt, columnField, CotAo, TableName, "ID", getField);
                }
            };

            long idValue;

            gridView.CellValueChanging += delegate(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
            {
                if (e.Column.FieldName.Equals(CotAo))
                {
                    idValue = _getSelectedID();
                    if (e.RowHandle < 0)
                    {
                        gridView.EditingValue = idValue;
                        gridView.SetFocusedRowCellValue(gridView.Columns.ColumnByFieldName(columnField), idValue);
                    }
                    else
                    {
                        DataTable dt = ((DataTable)gridView.GridControl.DataSource);
                        DataRow row = dt.Rows[e.RowHandle];
                        row[columnField] = idValue;
                        row[CotAo] = e.Value;
                    }
                }
            };
            gridView.InitNewRow += delegate(object sender, InitNewRowEventArgs e)
            {
                gridView.SetRowCellValue(e.RowHandle, columnField,_getSelectedID());
            };
        }
Exemple #14
0
        public popControl()
        {
            InitializeComponent();
            PopupContainerControl m_popupContainerControl = new PopupContainerControl();

            m_popupContainerControl.Controls.Add(this.gridControlEx1);
            this.PopupControl = m_popupContainerControl;
        }
Exemple #15
0
 private void InitializeComponent()
 {
     base.Properties.TextEditStyle = TextEditStyles.Standard;
     this.popupContainer           = new PopupContainerControl();
     base.Properties.PopupControl  = this.popupContainer;
     this.NullText = "";
     base.Size     = new Size(100, 0x15);
 }
Exemple #16
0
 public UCSelectPrinPLM()
 {
     this.showSysAdmin = true;
     this.InitializeComponent();
     base.Properties.TextEditStyle = TextEditStyles.Standard;
     this.popupContainer           = new PopupContainerControl();
     base.Properties.PopupControl  = this.popupContainer;
     base.KeyDown += new KeyEventHandler(this.UCSelectPrin_KeyDown);
 }
Exemple #17
0
        private void AppendTreelist()
        {
            //初始化树
            _treeList.OptionsBehavior.Editable = false;
            _treeList.OptionsSelection.EnableAppearanceFocusedCell = false;
            _treeList.OptionsView.ShowFocusedFrame = false;
            _treeList.OptionsView.ShowIndicator    = false;
            _treeList.OptionsView.ShowColumns      = false;
            _treeList.RowHeight   = 23;
            _treeList.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
            _treeList.Dock        = System.Windows.Forms.DockStyle.Fill;
            _treeList.MouseUp    += new MouseEventHandler(OnSelectedNode);

            //
            // txtFilter
            //
            this.txtFilter.Location = new System.Drawing.Point(5, 5);
            this.txtFilter.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            this.txtFilter.Name     = "txtFilter";
            this.txtFilter.Properties.Buttons.Clear();
            this.txtFilter.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Delete)
            });
            this.txtFilter.Properties.MaxLength       = 50;
            this.txtFilter.Properties.NullValuePrompt = "输入查找内容,按下回车键模糊查找";
            this.txtFilter.Properties.NullValuePromptShowForEmptyValue = true;
            this.txtFilter.Size         = new System.Drawing.Size(190, 20);
            this.txtFilter.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.txtFilter_ButtonClick);
            this.txtFilter.KeyDown     += new System.Windows.Forms.KeyEventHandler(this.txtFilter_KeyDown);
            //
            // panelControl1
            //
            this.panelControl1.Controls.Add(this.txtFilter);
            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(190, 34);

            _labelMsg.ForeColor = Color.Green;
            _labelMsg.Dock      = DockStyle.Bottom;
            _labelMsg.Text      = "请选择节点";

            PopupContainerControl _container = new PopupContainerControl();

            _container.SuspendLayout();
            _container.Controls.Add(_treeList);
            _container.Controls.Add(panelControl1);
            _container.Controls.Add(_labelMsg);

            this.Properties.PopupSizeable        = false;
            this.Properties.ShowPopupCloseButton = false;
            this.Properties.ShowPopupShadow      = false;
            this.Properties.PopupControl         = _container;

            _container.ResumeLayout();
            this.OnResize(null);
        }
 private void initializeButton(RepositoryItemPopupContainerEdit button, PopupContainerControl control, Action <CloseUpEventArgs> closeUpHandler)
 {
     button.Buttons[0].Kind        = ButtonPredefines.Combo;
     button.PopupControl           = control;
     button.CloseOnOuterMouseClick = false;
     button.QueryDisplayText      += (o, e) => OnEvent(queryDisplayText, e);
     button.CloseUp   += (o, e) => OnEvent(closeUpHandler, e);
     button.CloseUpKey = new KeyShortcut(Keys.Enter);
     button.AllowDropDownWhenReadOnly = DefaultBoolean.False;
 }
Exemple #19
0
 private void InitPopupContainerControl()
 {
     popupControl = new PopupContainerControl();
     Controls.Add(popupControl);
     popupControl.Controls.Add(treeList);
     parentTypeEdit.Properties.PopupControl = popupControl;
     parentTypeEdit.Text = "All Product Types";
     treeList.CollapseAll();
     treeList.Width = parentTypeEdit.Width;
 }
Exemple #20
0
 void FillPropertyInfoTree(string value, PopupContainerControl popcontainer)
 {
     if (popcontainer.Controls.Count > 0)
     {
         PropertyInfoTree ppit = popcontainer.Controls[0] as PropertyInfoTree;
         if (ppit != null)
         {
             ppit.SetClassParams(value);
         }
     }
 }
Exemple #21
0
        void GenPropertyInfoTree(string typestring, string value, PopupContainerControl popcontainer)
        {
            if (string.IsNullOrEmpty(typestring))
            {
                return;
            }
            PropertyInfoTree ppit = GetCachePropTree(typestring, popcontainer.Name);

            popcontainer.Controls.Clear();
            popcontainer.Controls.Add(ppit);
        }
 public TrialPLDanhMucAdv()
     : base()
 {
     popupContainerControl = new PopupContainerControl();
     plDanhMuc = new TrialPLDanhMucAdvCtrl();
     this.Properties.PopupControl = popupContainerControl;
     popupContainerControl.Controls.Add(plDanhMuc);
     popupContainerControl.Size = plDanhMuc.Size;
     this.Properties.PopupSizeable = false;
     this.Properties.ShowPopupCloseButton = false;
 }
 private CheckedListBoxControl GetCheckedListBoxControl(PopupContainerControl ctrl)
 {
     foreach (Control c in ctrl.Controls)
     {
         if (c is CheckedListBoxControl)
         {
             return(c as CheckedListBoxControl);
         }
     }
     return(null);
 }
        protected override PopupContainerControl CreatePopupCheckListControl()
        {
            PopupContainerControl ctrl    = base.CreatePopupCheckListControl();
            CheckedListBoxControl listBox = GetCheckedListBoxControl(ctrl);

            if (Properties.CanShowImageInDropDown)
            {
                listBox.DrawItem += OnDrawItem;
            }
            return(ctrl);
        }
 public TrialPLDataTreeNew()
 {
     popupContainerControl = new PopupContainerControl();
     dataTree = new UserControlDataTree();
     popupContainerControl.Controls.Add(dataTree);
     this.Properties.PopupControl = popupContainerControl;
     popupContainerControl.Size = dataTree.Size;
     this.Properties.PopupSizeable = false;
     this.Properties.ShowPopupCloseButton = false;
     dataTree.PopupContainerEdit = this;
     this.Properties.NullText = GlobalConst.NULL_TEXT;
 }
Exemple #26
0
        protected override void OnResize(EventArgs e)
        {
            if (this.Properties.PopupControl == null)
            {
                return;
            }
            PopupContainerControl _container = this.Properties.PopupControl as PopupContainerControl;

            _container.Size = new System.Drawing.Size(this.Width - 2, 200);

            base.OnResize(e);
        }
Exemple #27
0
        public RepositoryItemMyPopupContainerEdit()
        {
            PopupContainerControl popupControl = new PopupContainerControl();

            imageListBox                    = new ImageListBoxControl();
            imageListBox.Dock               = System.Windows.Forms.DockStyle.Fill;
            imageListBox.HotTrackItems      = true;
            imageListBox.HotTrackSelectMode = HotTrackSelectMode.SelectItemOnClick;
            popupControl.Controls.Add(imageListBox);
            PopupControl  = popupControl;
            TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
        }
Exemple #28
0
        /// <summary>
        ///    Fill the given <paramref name="popupController" /> with the <paramref name="controlToAdd" />
        /// </summary>
        /// <param name="popupController">
        ///    Popup container control to fill.The popup control size will be adjusted to fit the
        ///    <paramref name="controlToAdd" />
        /// </param>
        /// <param name="controlToAdd">Control that will be added in the control.The control will fill the available space</param>
        public static void FillWith(this PopupContainerControl popupController, Control controlToAdd)
        {
            if (controlToAdd == null)
            {
                return;
            }
            var size = controlToAdd.Size;

            //necessary to cast as Control to avoid loop
            FillWith((Control)popupController, controlToAdd);
            popupController.Size = size;
        }
Exemple #29
0
 private void SetControl(PopupContainerControl containerControl)
 {
     foreach (Control con in containerControl.Controls)
     {
         if (con.GetType().BaseType == typeof(CheckedListBoxControl))
         {
             listBoxControl           = con as CheckedListBoxControl;
             listBoxControl.DrawItem += CustomCheckedComboBoxEdit_DrawItem;
             return;
         }
     }
 }
Exemple #30
0
 public void Init()
 {
     m_PopupContainer         = new PopupContainerControl();
     m_ActionPanel            = new XtraPanel();
     m_PopupContainer.Padding = new Padding(4, 0, 4, 0);
     m_ActionPanel.Height     = 31;
     m_ActionPanel.Parent     = m_PopupContainer;
     m_ActionPanel.Dock       = DockStyle.Bottom;
     AddButton(m_CancelButton = new SimpleButton(), BvMessages.Get("strCancel_Id"));
     AddButton(m_OkButton     = new SimpleButton(), BvMessages.Get("strOK_Id"), m_CancelButton);
     m_OkButton.Click        += OkClick;
     m_CancelButton.Click    += CancelClick;
 }
 public RepositoryItemSelectDMTreeGroup()
 {
     plGroupCatNew1 = new DMTreeGroup();
     popupControl = new PopupContainerControl();
     this.PopupControl = popupControl;
     popupControl.Controls.Add(plGroupCatNew1);
     popupControl.Size = plGroupCatNew1.Size;
     this.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
     this.EditValueChanging += new DevExpress.XtraEditors.Controls.ChangingEventHandler(RepositoryItemSelectDMGridTemplate_EditValueChanging);
     this.Popup += new EventHandler(RepositoryItemSelectDMGridTemplate_Popup);
     this.CloseUp += new DevExpress.XtraEditors.Controls.CloseUpEventHandler(popupContainerEdit1_CloseUp);
     this.Closed += new DevExpress.XtraEditors.Controls.ClosedEventHandler(popupContainerEdit1_Closed);
     this.KeyDown += new KeyEventHandler(popupContainerEdit1_KeyDown);
 }
Exemple #32
0
 /// <summary>
 /// 初始化器
 /// </summary>
 private void Init()
 {
     try
     {
         PopupContainerControl popupContainerControl1 = new PopupContainerControl();
         CheckedListBoxControl chkListBoxControlDX    = new CheckedListBoxControl();
         popupContainerControl1.Controls.Add(chkListBoxControlDX);
         chkListBoxControlDX.Dock     = DockStyle.Fill;
         this.Properties.PopupControl = popupContainerControl1;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            DXPopupMenu menu = new DXPopupMenu();

            menu.Items.Add(new DXMenuItem("Test1"));
            menu.Items.Add(new DXMenuItem("Test2"));
            menu.Items.Add(new DXMenuItem("Test3"));
            dropDownButton1.DropDownControl = menu;
            dropDownButton2.DropDownControl = new MyPopupControl(new XtraUserControl1());
            PopupContainerControl container = new PopupContainerControl();
            XtraUserControl1      uc        = new XtraUserControl1();

            uc.Dock = DockStyle.Fill;
            container.Controls.Add(uc);
            popupContainerEdit1.Properties.PopupControl = container;
        }
        private void BindToViewModel()
        {
            componentBindingSource.DataSource = viewModel;

            foreach (var t in viewModel.ComponentTypes)
            {
                if (t.IsActive)
                {
                    type.Properties.Items.Add(t);
                }
            }

            #region   ---- Prizm.Data Bindings ----
            componentNumber.DataBindings
            .Add("EditValue", componentBindingSource, "Number");

            certificateNumber.DataBindings
            .Add("EditValue", componentBindingSource, "Certificate");

            componentParameters.DataBindings
            .Add("DataSource", componentBindingSource, "Connectors");

            type.DataBindings
            .Add("EditValue", componentBindingSource, "Type");

            deactivated.DataBindings
            .Add(BindingHelper.CreateCheckEditInverseBinding(
                     "Checked", componentBindingSource, "ComponentIsActive"));

            inspectionHistoryGrid.DataBindings
            .Add("DataSource", componentBindingSource, "InspectionTestResults");

            componentLength.DataBindings
            .Add("EditValue", componentBindingSource, "Length");
            #endregion

            inspectorsDataSource.DataSource      = viewModel.Inspectors;
            inspectorsDataSource.ListChanged    += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock                        = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl             = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;
        }
Exemple #35
0
        public RepositoryItemTextEditPopUp()
            : base()
        {
            // Create PopupContainerControl with a ListBoxControl and bind it
            // to the editor
            lb        = new ListBoxControl();
            lb.Dock   = System.Windows.Forms.DockStyle.Fill;
            lb.Click += new EventHandler(lb_Click);

            PopupContainerControl pc = new PopupContainerControl();

            pc.Controls.Add(lb);

            this.PopupControl       = pc;
            this.TextEditStyle      = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
            this.EditValueChanging += new DevExpress.XtraEditors.Controls.ChangingEventHandler(RepositoryItemTextEditPopUp_EditValueChanging);
            this.KeyDown           += new KeyEventHandler(RepositoryItemTextEditPopUp_KeyDown);
        }
Exemple #36
0
 private void CloseParent()
 {
     if (base.Parent != null)
     {
         if (base.Parent is PopupContainerControl)
         {
             PopupContainerControl parent = base.Parent as PopupContainerControl;
             if ((parent != null) && (parent.OwnerEdit != null))
             {
                 parent.OwnerEdit.ClosePopup();
             }
         }
         else
         {
             base.Parent.Hide();
         }
     }
 }
        private void LoadData()
        {
            // using (DataPagingBL bl = new DataPagingBL())
            {
                DataPagingBL bl = new DataPagingBL();
                searchModel.SortBy        = nameof(ELMAH_Error.Type);
                searchModel.SortDirection = "DESC";
                //searchModel.PageNum = pageCurrent;
                //searchModel.PageSize = pageSize;
                //searchModel.PageSkip

                //改写控件时,只需将search model传给user control
                List <ELMAH_Error> ls = bl.GetElmahErrorLog(searchModel);

                this.gridControl1.DataSource = ls;
                this.gridView1.OptionsCustomization.AllowRowSizing = true; //行可再设高

                //this.gridView1.CanResizeRow = true;
                //for (int i = 0; i < this.gridView1.RowCount; i++)
                {
                    this.repositoryItemMemoExEdit1.ShowIcon = false;
                    gridView1.Columns["Message"].ColumnEdit = this.repositoryItemMemoExEdit1;
                    this.gridControl1.RepositoryItems.Add(this.repositoryItemMemoExEdit1);

                    gridView1.Columns["Type"].ColumnEdit = this.repositoryItemMemoEdit1;
                    this.gridControl1.RepositoryItems.Add(this.repositoryItemMemoEdit1);

                    var popupContainerControl = new PopupContainerControl();
                    popupContainerControl.Controls.Add(new TextBox());
                    this.repositoryItemPopupContainerEdit1.PopupControl = popupContainerControl;
                    gridView1.Columns["Application"].ColumnEdit         = this.repositoryItemPopupContainerEdit1;
                    this.gridControl1.RepositoryItems.Add(this.repositoryItemPopupContainerEdit1);

                    gridView1.Columns["Host"].ColumnEdit = this.repositoryItemRichTextEdit1;
                    this.gridControl1.RepositoryItems.Add(this.repositoryItemRichTextEdit1);

                    gridView1.Columns["Source"].ColumnEdit = this.repositoryItemTextEdit1;
                    this.gridControl1.RepositoryItems.Add(this.repositoryItemTextEdit1);
                }
            }
        }
Exemple #38
0
 private void CreatePopupControl()
 {
     integratedPopupControl = new PopupContainerControl();
     Controls.Add(integratedPopupControl);
     Properties.PopupControl = integratedPopupControl;
 }
        private void BindToViewModel()
        {
            SpoolBindingSource.DataSource = viewModel;

            pipeNumber.DataBindings
                .Add("EditValue", SpoolBindingSource, "PipeNumber");

            pipeLength.DataBindings
                .Add("EditValue", SpoolBindingSource, "PipeLength");

            spoolNumber.DataBindings
                .Add("EditValue", SpoolBindingSource, "SpoolNumber");

            spoolLength.DataBindings
                .Add("EditValue", SpoolBindingSource, "SpoolLength");

            pipeNumber.Properties.DataSource = viewModel.allPipes;

            inspectionHistory.DataBindings
               .Add("DataSource", SpoolBindingSource, "InspectionTestResults");

            deactivated.DataBindings
                .Add(BindingHelper.CreateCheckEditInverseBinding(
                "Checked", SpoolBindingSource, "SpoolIsActive"));

            inspectorsDataSource.DataSource = viewModel.Inspectors;
            inspectorsDataSource.ListChanged += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;

        }
Exemple #40
0
 private void InitializeComponent()
 {
     this.gpgLogGrid = new GPGChatGrid();
     this.gvLogView = new GridView();
     this.colTime = new GridColumn();
     this.repositoryItemTimeEdit1 = new RepositoryItemTimeEdit();
     this.colType = new GridColumn();
     this.colDescription = new GridColumn();
     this.colData = new GridColumn();
     this.rimMemoEdit3 = new RepositoryItemMemoEdit();
     this.rimPictureEdit3 = new RepositoryItemPictureEdit();
     this.rimTextEdit = new RepositoryItemTextEdit();
     this.riPopup = new RepositoryItemPopupContainerEdit();
     this.pcPropertyView = new PopupContainerControl();
     this.pgData = new PropertyGridControl();
     this.repositoryItemMemoExEdit1 = new RepositoryItemMemoExEdit();
     this.btnCancel = new GPGButton();
     this.gpgLogGrid.BeginInit();
     this.gvLogView.BeginInit();
     this.repositoryItemTimeEdit1.BeginInit();
     this.rimMemoEdit3.BeginInit();
     this.rimPictureEdit3.BeginInit();
     this.rimTextEdit.BeginInit();
     this.riPopup.BeginInit();
     this.pcPropertyView.BeginInit();
     this.pcPropertyView.SuspendLayout();
     this.pgData.BeginInit();
     this.repositoryItemMemoExEdit1.BeginInit();
     base.SuspendLayout();
     base.ttDefault.DefaultController.AutoPopDelay = 0x3e8;
     this.gpgLogGrid.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this.gpgLogGrid.CustomizeStyle = false;
     this.gpgLogGrid.EmbeddedNavigator.Name = "";
     this.gpgLogGrid.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.gpgLogGrid.IgnoreMouseWheel = false;
     this.gpgLogGrid.Location = new Point(13, 0x4c);
     this.gpgLogGrid.LookAndFeel.SkinName = "Money Twins";
     this.gpgLogGrid.LookAndFeel.UseDefaultLookAndFeel = false;
     this.gpgLogGrid.MainView = this.gvLogView;
     this.gpgLogGrid.Name = "gpgLogGrid";
     this.gpgLogGrid.RepositoryItems.AddRange(new RepositoryItem[] { this.rimPictureEdit3, this.rimTextEdit, this.rimMemoEdit3, this.riPopup, this.repositoryItemTimeEdit1, this.repositoryItemMemoExEdit1 });
     this.gpgLogGrid.ShowOnlyPredefinedDetails = true;
     this.gpgLogGrid.Size = new Size(0x268, 0x138);
     this.gpgLogGrid.TabIndex = 0x1c;
     this.gpgLogGrid.ViewCollection.AddRange(new BaseView[] { this.gvLogView });
     this.gvLogView.ActiveFilterString = "";
     this.gvLogView.Appearance.ColumnFilterButton.BackColor = Color.Black;
     this.gvLogView.Appearance.ColumnFilterButton.BackColor2 = Color.FromArgb(20, 20, 20);
     this.gvLogView.Appearance.ColumnFilterButton.BorderColor = Color.Black;
     this.gvLogView.Appearance.ColumnFilterButton.ForeColor = Color.Gray;
     this.gvLogView.Appearance.ColumnFilterButton.Options.UseBackColor = true;
     this.gvLogView.Appearance.ColumnFilterButton.Options.UseBorderColor = true;
     this.gvLogView.Appearance.ColumnFilterButton.Options.UseForeColor = true;
     this.gvLogView.Appearance.ColumnFilterButtonActive.BackColor = Color.FromArgb(20, 20, 20);
     this.gvLogView.Appearance.ColumnFilterButtonActive.BackColor2 = Color.FromArgb(0x4e, 0x4e, 0x4e);
     this.gvLogView.Appearance.ColumnFilterButtonActive.BorderColor = Color.FromArgb(20, 20, 20);
     this.gvLogView.Appearance.ColumnFilterButtonActive.ForeColor = Color.Blue;
     this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true;
     this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true;
     this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true;
     this.gvLogView.Appearance.Empty.BackColor = Color.Black;
     this.gvLogView.Appearance.Empty.Options.UseBackColor = true;
     this.gvLogView.Appearance.FilterCloseButton.BackColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvLogView.Appearance.FilterCloseButton.BackColor2 = Color.FromArgb(90, 90, 90);
     this.gvLogView.Appearance.FilterCloseButton.BorderColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvLogView.Appearance.FilterCloseButton.ForeColor = Color.Black;
     this.gvLogView.Appearance.FilterCloseButton.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvLogView.Appearance.FilterCloseButton.Options.UseBackColor = true;
     this.gvLogView.Appearance.FilterCloseButton.Options.UseBorderColor = true;
     this.gvLogView.Appearance.FilterCloseButton.Options.UseForeColor = true;
     this.gvLogView.Appearance.FilterPanel.BackColor = Color.Black;
     this.gvLogView.Appearance.FilterPanel.BackColor2 = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvLogView.Appearance.FilterPanel.ForeColor = Color.White;
     this.gvLogView.Appearance.FilterPanel.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvLogView.Appearance.FilterPanel.Options.UseBackColor = true;
     this.gvLogView.Appearance.FilterPanel.Options.UseForeColor = true;
     this.gvLogView.Appearance.FixedLine.BackColor = Color.FromArgb(0x3a, 0x3a, 0x3a);
     this.gvLogView.Appearance.FixedLine.Options.UseBackColor = true;
     this.gvLogView.Appearance.FocusedCell.BackColor = Color.Black;
     this.gvLogView.Appearance.FocusedCell.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.FocusedCell.ForeColor = Color.White;
     this.gvLogView.Appearance.FocusedCell.Options.UseBackColor = true;
     this.gvLogView.Appearance.FocusedCell.Options.UseFont = true;
     this.gvLogView.Appearance.FocusedCell.Options.UseForeColor = true;
     this.gvLogView.Appearance.FocusedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2);
     this.gvLogView.Appearance.FocusedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190);
     this.gvLogView.Appearance.FocusedRow.Font = new Font("Arial", 9.75f);
     this.gvLogView.Appearance.FocusedRow.ForeColor = Color.White;
     this.gvLogView.Appearance.FocusedRow.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvLogView.Appearance.FocusedRow.Options.UseBackColor = true;
     this.gvLogView.Appearance.FocusedRow.Options.UseFont = true;
     this.gvLogView.Appearance.FocusedRow.Options.UseForeColor = true;
     this.gvLogView.Appearance.FooterPanel.BackColor = Color.Black;
     this.gvLogView.Appearance.FooterPanel.BorderColor = Color.Black;
     this.gvLogView.Appearance.FooterPanel.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.FooterPanel.ForeColor = Color.White;
     this.gvLogView.Appearance.FooterPanel.Options.UseBackColor = true;
     this.gvLogView.Appearance.FooterPanel.Options.UseBorderColor = true;
     this.gvLogView.Appearance.FooterPanel.Options.UseFont = true;
     this.gvLogView.Appearance.FooterPanel.Options.UseForeColor = true;
     this.gvLogView.Appearance.GroupButton.BackColor = Color.Black;
     this.gvLogView.Appearance.GroupButton.BorderColor = Color.Black;
     this.gvLogView.Appearance.GroupButton.ForeColor = Color.White;
     this.gvLogView.Appearance.GroupButton.Options.UseBackColor = true;
     this.gvLogView.Appearance.GroupButton.Options.UseBorderColor = true;
     this.gvLogView.Appearance.GroupButton.Options.UseForeColor = true;
     this.gvLogView.Appearance.GroupFooter.BackColor = Color.FromArgb(10, 10, 10);
     this.gvLogView.Appearance.GroupFooter.BorderColor = Color.FromArgb(10, 10, 10);
     this.gvLogView.Appearance.GroupFooter.ForeColor = Color.White;
     this.gvLogView.Appearance.GroupFooter.Options.UseBackColor = true;
     this.gvLogView.Appearance.GroupFooter.Options.UseBorderColor = true;
     this.gvLogView.Appearance.GroupFooter.Options.UseForeColor = true;
     this.gvLogView.Appearance.GroupPanel.BackColor = Color.Black;
     this.gvLogView.Appearance.GroupPanel.BackColor2 = Color.Black;
     this.gvLogView.Appearance.GroupPanel.Font = new Font("Tahoma", 10f, FontStyle.Bold);
     this.gvLogView.Appearance.GroupPanel.ForeColor = Color.White;
     this.gvLogView.Appearance.GroupPanel.Options.UseBackColor = true;
     this.gvLogView.Appearance.GroupPanel.Options.UseFont = true;
     this.gvLogView.Appearance.GroupPanel.Options.UseForeColor = true;
     this.gvLogView.Appearance.GroupRow.BackColor = Color.Gray;
     this.gvLogView.Appearance.GroupRow.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.GroupRow.ForeColor = Color.White;
     this.gvLogView.Appearance.GroupRow.Options.UseBackColor = true;
     this.gvLogView.Appearance.GroupRow.Options.UseFont = true;
     this.gvLogView.Appearance.GroupRow.Options.UseForeColor = true;
     this.gvLogView.Appearance.HeaderPanel.BackColor = Color.Black;
     this.gvLogView.Appearance.HeaderPanel.BorderColor = Color.Black;
     this.gvLogView.Appearance.HeaderPanel.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.gvLogView.Appearance.HeaderPanel.ForeColor = Color.Black;
     this.gvLogView.Appearance.HeaderPanel.Options.UseBackColor = true;
     this.gvLogView.Appearance.HeaderPanel.Options.UseBorderColor = true;
     this.gvLogView.Appearance.HeaderPanel.Options.UseFont = true;
     this.gvLogView.Appearance.HeaderPanel.Options.UseForeColor = true;
     this.gvLogView.Appearance.HideSelectionRow.BackColor = Color.Gray;
     this.gvLogView.Appearance.HideSelectionRow.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.HideSelectionRow.ForeColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvLogView.Appearance.HideSelectionRow.Options.UseBackColor = true;
     this.gvLogView.Appearance.HideSelectionRow.Options.UseFont = true;
     this.gvLogView.Appearance.HideSelectionRow.Options.UseForeColor = true;
     this.gvLogView.Appearance.HorzLine.BackColor = Color.FromArgb(0x52, 0x83, 190);
     this.gvLogView.Appearance.HorzLine.Options.UseBackColor = true;
     this.gvLogView.Appearance.Preview.BackColor = Color.White;
     this.gvLogView.Appearance.Preview.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.Preview.ForeColor = Color.Purple;
     this.gvLogView.Appearance.Preview.Options.UseBackColor = true;
     this.gvLogView.Appearance.Preview.Options.UseFont = true;
     this.gvLogView.Appearance.Preview.Options.UseForeColor = true;
     this.gvLogView.Appearance.Row.BackColor = Color.Black;
     this.gvLogView.Appearance.Row.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0xb2);
     this.gvLogView.Appearance.Row.ForeColor = Color.White;
     this.gvLogView.Appearance.Row.Options.UseBackColor = true;
     this.gvLogView.Appearance.Row.Options.UseFont = true;
     this.gvLogView.Appearance.Row.Options.UseForeColor = true;
     this.gvLogView.Appearance.RowSeparator.BackColor = Color.White;
     this.gvLogView.Appearance.RowSeparator.BackColor2 = Color.White;
     this.gvLogView.Appearance.RowSeparator.Options.UseBackColor = true;
     this.gvLogView.Appearance.SelectedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2);
     this.gvLogView.Appearance.SelectedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190);
     this.gvLogView.Appearance.SelectedRow.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.gvLogView.Appearance.SelectedRow.ForeColor = Color.White;
     this.gvLogView.Appearance.SelectedRow.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvLogView.Appearance.SelectedRow.Options.UseBackColor = true;
     this.gvLogView.Appearance.SelectedRow.Options.UseFont = true;
     this.gvLogView.Appearance.SelectedRow.Options.UseForeColor = true;
     this.gvLogView.Appearance.TopNewRow.Font = new Font("Tahoma", 10f);
     this.gvLogView.Appearance.TopNewRow.ForeColor = Color.White;
     this.gvLogView.Appearance.TopNewRow.Options.UseFont = true;
     this.gvLogView.Appearance.TopNewRow.Options.UseForeColor = true;
     this.gvLogView.Appearance.VertLine.BackColor = Color.FromArgb(0x52, 0x83, 190);
     this.gvLogView.Appearance.VertLine.Options.UseBackColor = true;
     this.gvLogView.BorderStyle = BorderStyles.NoBorder;
     this.gvLogView.Columns.AddRange(new GridColumn[] { this.colTime, this.colType, this.colDescription, this.colData });
     this.gvLogView.GridControl = this.gpgLogGrid;
     this.gvLogView.Name = "gvLogView";
     this.gvLogView.OptionsBehavior.AutoPopulateColumns = false;
     this.gvLogView.OptionsDetail.AllowZoomDetail = false;
     this.gvLogView.OptionsDetail.EnableMasterViewMode = false;
     this.gvLogView.OptionsDetail.ShowDetailTabs = false;
     this.gvLogView.OptionsDetail.SmartDetailExpand = false;
     this.gvLogView.OptionsSelection.EnableAppearanceFocusedCell = false;
     this.gvLogView.OptionsSelection.MultiSelect = true;
     this.gvLogView.OptionsView.RowAutoHeight = true;
     this.colTime.Caption = "Time";
     this.colTime.ColumnEdit = this.repositoryItemTimeEdit1;
     this.colTime.FieldName = "DateTime";
     this.colTime.Name = "colTime";
     this.colTime.OptionsColumn.AllowEdit = false;
     this.colTime.Visible = true;
     this.colTime.VisibleIndex = 0;
     this.repositoryItemTimeEdit1.AutoHeight = false;
     this.repositoryItemTimeEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton() });
     this.repositoryItemTimeEdit1.Name = "repositoryItemTimeEdit1";
     this.colType.Caption = "Type";
     this.colType.FieldName = "LogType";
     this.colType.Name = "colType";
     this.colType.OptionsColumn.AllowEdit = false;
     this.colType.Visible = true;
     this.colType.VisibleIndex = 1;
     this.colDescription.Caption = "Description";
     this.colDescription.FieldName = "Description";
     this.colDescription.Name = "colDescription";
     this.colDescription.OptionsColumn.AllowEdit = false;
     this.colDescription.Visible = true;
     this.colDescription.VisibleIndex = 2;
     this.colData.Caption = "Data";
     this.colData.ColumnEdit = this.rimMemoEdit3;
     this.colData.FieldName = "Data";
     this.colData.Name = "colData";
     this.colData.Visible = true;
     this.colData.VisibleIndex = 3;
     this.rimMemoEdit3.MaxLength = 500;
     this.rimMemoEdit3.Name = "rimMemoEdit3";
     this.rimPictureEdit3.Name = "rimPictureEdit3";
     this.rimPictureEdit3.PictureAlignment = ContentAlignment.TopCenter;
     this.rimTextEdit.AutoHeight = false;
     this.rimTextEdit.Name = "rimTextEdit";
     this.riPopup.AutoHeight = false;
     this.riPopup.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.riPopup.Name = "riPopup";
     this.riPopup.PopupControl = this.pcPropertyView;
     this.riPopup.Popup += new EventHandler(this.riPopup_Popup);
     this.pcPropertyView.Controls.Add(this.pgData);
     this.pcPropertyView.Location = new Point(13, 0xda);
     this.pcPropertyView.Name = "pcPropertyView";
     this.pcPropertyView.Size = new Size(0xdf, 180);
     this.pcPropertyView.TabIndex = 0x1f;
     this.pcPropertyView.Text = "popupContainerControl1";
     this.pgData.Dock = DockStyle.Fill;
     this.pgData.Location = new Point(0, 0);
     this.pgData.Name = "pgData";
     this.pgData.Size = new Size(0xdf, 180);
     this.pgData.TabIndex = 0;
     this.repositoryItemMemoExEdit1.AutoHeight = false;
     this.repositoryItemMemoExEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.repositoryItemMemoExEdit1.Name = "repositoryItemMemoExEdit1";
     this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this.btnCancel.Appearance.ForeColor = Color.Black;
     this.btnCancel.Appearance.Options.UseForeColor = true;
     this.btnCancel.Location = new Point(0x20d, 0x18a);
     this.btnCancel.LookAndFeel.SkinName = "London Liquid Sky";
     this.btnCancel.LookAndFeel.UseDefaultLookAndFeel = false;
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.Size = new Size(0x68, 0x17);
     this.btnCancel.TabIndex = 30;
     this.btnCancel.Text = "<LOC>Cancel";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
     base.AutoScaleMode = AutoScaleMode.None;
     base.ClientSize = new Size(640, 480);
     base.Controls.Add(this.pcPropertyView);
     base.Controls.Add(this.btnCancel);
     base.Controls.Add(this.gpgLogGrid);
     this.Font = new Font("Verdana", 8f);
     base.Location = new Point(0, 0);
     base.Name = "DlgLogWatcher";
     this.Text = "Log Watcher";
     base.Controls.SetChildIndex(this.gpgLogGrid, 0);
     base.Controls.SetChildIndex(this.btnCancel, 0);
     base.Controls.SetChildIndex(this.pcPropertyView, 0);
     this.gpgLogGrid.EndInit();
     this.gvLogView.EndInit();
     this.repositoryItemTimeEdit1.EndInit();
     this.rimMemoEdit3.EndInit();
     this.rimPictureEdit3.EndInit();
     this.rimTextEdit.EndInit();
     this.riPopup.EndInit();
     this.pcPropertyView.EndInit();
     this.pcPropertyView.ResumeLayout(false);
     this.pgData.EndInit();
     this.repositoryItemMemoExEdit1.EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
 private void init()
 {
     plDanhMuc = new TrialPLDanhMucAdvCtrl();
     popupControl = new PopupContainerControl();
     this.PopupControl = popupControl;
     popupControl.Controls.Add(plDanhMuc);
     popupControl.Size = plDanhMuc.Size;
     this.PopupSizeable = false;
     this.ShowPopupCloseButton = false;
 }
        private void BindToViewModel()
        {
            bindingSource.DataSource = viewModel;
            searchNumber.DataBindings.Add("Editvalue", bindingSource, "SearchNumber");
            elementNumber.DataBindings.Add("Text", bindingSource, "ElementNumber");

            elementType.DataBindings.Add(
                BindingHelper.CreateOneWayReadToString("Text", bindingSource, "ElementType",
                (value) =>
                {
                    return (string)localizedAllPartTypes[(int)value];
                }));

            inspections.DataBindings.Add("DataSource", bindingSource, "InspectionTestResults");

            inspectorsDataSource.DataSource = viewModel.Inspectors;
            inspectorsDataSource.ListChanged += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;
        }
Exemple #43
0
 private void InitializeComponent()
 {
     this.txtUser = new DevExpress.XtraEditors.PopupContainerEdit();
     this.pcContainer = new DevExpress.XtraEditors.PopupContainerControl();
     this.txtPassword = new DevExpress.XtraEditors.TextEdit();
     this.btOk = new DevExpress.XtraEditors.SimpleButton();
     this.btCancel = new DevExpress.XtraEditors.SimpleButton();
     this.backgroundWorker = new System.ComponentModel.BackgroundWorker();
     this.marqueeProgressBarControl1 = new DevExpress.XtraEditors.MarqueeProgressBarControl();
     this.pClose = new System.Windows.Forms.PictureBox();
     ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pcContainer)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtPassword.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.pClose)).BeginInit();
     this.SuspendLayout();
     //
     // txtUser
     //
     this.txtUser.Location = new System.Drawing.Point(182, 95);
     this.txtUser.Name = "txtUser";
     this.txtUser.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
     this.txtUser.Properties.PopupControl = this.pcContainer;
     this.txtUser.Size = new System.Drawing.Size(154, 21);
     this.txtUser.TabIndex = 3;
     this.txtUser.DoubleClick += new System.EventHandler(this.ogmTv_DoubleClick);
     //
     // pcContainer
     //
     this.pcContainer.Location = new System.Drawing.Point(12, 165);
     this.pcContainer.Name = "pcContainer";
     this.pcContainer.Size = new System.Drawing.Size(72, 24);
     this.pcContainer.TabIndex = 4;
     //
     // txtPassword
     //
     this.txtPassword.EditValue = "";
     this.txtPassword.Location = new System.Drawing.Point(183, 127);
     this.txtPassword.Name = "txtPassword";
     this.txtPassword.Size = new System.Drawing.Size(154, 21);
     this.txtPassword.TabIndex = 0;
     //
     // btOk
     //
     this.btOk.Location = new System.Drawing.Point(183, 165);
     this.btOk.Name = "btOk";
     this.btOk.Size = new System.Drawing.Size(75, 23);
     this.btOk.TabIndex = 1;
     this.btOk.Text = "登录";
     this.btOk.Click += new System.EventHandler(this.btOk_Click);
     //
     // btCancel
     //
     this.btCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.btCancel.Location = new System.Drawing.Point(261, 165);
     this.btCancel.Name = "btCancel";
     this.btCancel.Size = new System.Drawing.Size(75, 23);
     this.btCancel.TabIndex = 2;
     this.btCancel.Text = "取消";
     //
     // backgroundWorker
     //
     this.backgroundWorker.WorkerReportsProgress = true;
     this.backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted);
     //
     // marqueeProgressBarControl1
     //
     this.marqueeProgressBarControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.marqueeProgressBarControl1.EditValue = "";
     this.marqueeProgressBarControl1.Location = new System.Drawing.Point(0, 247);
     this.marqueeProgressBarControl1.Name = "marqueeProgressBarControl1";
     this.marqueeProgressBarControl1.Size = new System.Drawing.Size(460, 14);
     this.marqueeProgressBarControl1.TabIndex = 8;
     //
     // pClose
     //
     this.pClose.Image = global::Properties.Resources.关闭;
     this.pClose.InitialImage = null;
     this.pClose.Location = new System.Drawing.Point(431, 2);
     this.pClose.Name = "pClose";
     this.pClose.Size = new System.Drawing.Size(19, 17);
     this.pClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pClose.TabIndex = 9;
     this.pClose.TabStop = false;
     this.pClose.MouseLeave += new System.EventHandler(this.pClose_MouseLeave);
     this.pClose.Click += new System.EventHandler(this.pClose_Click);
     this.pClose.MouseHover += new System.EventHandler(this.pClose_MouseHover);
     //
     // UserLogin
     //
     this.AcceptButton = this.btOk;
     this.Appearance.BackColor = System.Drawing.Color.Transparent;
     this.Appearance.Options.UseBackColor = true;
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
     this.BackgroundImageLayoutStore = System.Windows.Forms.ImageLayout.Tile;
     this.BackgroundImageStore = global::Properties.Resources.评估管理软件登录;
     this.CancelButton = this.btCancel;
     this.ClientSize = new System.Drawing.Size(460, 261);
     this.Controls.Add(this.pClose);
     this.Controls.Add(this.marqueeProgressBarControl1);
     this.Controls.Add(this.btCancel);
     this.Controls.Add(this.pcContainer);
     this.Controls.Add(this.btOk);
     this.Controls.Add(this.txtPassword);
     this.Controls.Add(this.txtUser);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.LookAndFeel.UseDefaultLookAndFeel = false;
     this.MaximizeBox = false;
     this.Name = "UserLogin";
     this.Text = "UserLogin";
     ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pcContainer)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.txtPassword.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.marqueeProgressBarControl1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.pClose)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 private void init()
 {
     dataTree = new UserControlDataTreeExt();
     popupControl = new PopupContainerControl();
     this.PopupControl = popupControl;
     popupControl.Controls.Add(dataTree);
     popupControl.Size = dataTree.Size;
     this.PopupSizeable = false;
     this.ShowPopupCloseButton = false;
     this.Popup += new EventHandler(RepositoryDataTree_Popup);
     this.Leave += new EventHandler(RepositoryDataTree_Leave);
 }
        private void BindToViewModel()
        {
            componentBindingSource.DataSource = viewModel;

            foreach(var t in viewModel.ComponentTypes)
            {
                if(t.IsActive)
                {
                    type.Properties.Items.Add(t);
                }
            }

            #region   ---- Prizm.Data Bindings ----
            componentNumber.DataBindings
                .Add("EditValue", componentBindingSource, "Number");

            certificateNumber.DataBindings
                .Add("EditValue", componentBindingSource, "Certificate");

            componentParameters.DataBindings
              .Add("DataSource", componentBindingSource, "Connectors");

            type.DataBindings
                .Add("EditValue", componentBindingSource, "Type");

            deactivated.DataBindings
                .Add(BindingHelper.CreateCheckEditInverseBinding(
                        "Checked", componentBindingSource, "ComponentIsActive"));

            inspectionHistoryGrid.DataBindings
                .Add("DataSource", componentBindingSource, "InspectionTestResults");

            componentLength.DataBindings
                .Add("EditValue", componentBindingSource, "Length");
            #endregion

            inspectorsDataSource.DataSource = viewModel.Inspectors;
            inspectorsDataSource.ListChanged += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;

        }
        private void BindToViewModel()
        {
            pipeNewEditBindingSource.DataSource = viewModel;

            #region ComboBox filling

            foreach(var t in viewModel.PipeTypes)
            {
                if(t.IsActive)
                {
                    pipeSize.Properties.Items.Add(t);
                }
            }
            #endregion

            #region DataBindings

            ordersLookUp.Properties.DataSource = viewModel.PurchaseOrders;
            heatsLookUp.Properties.DataSource = viewModel.Heats;

            pipeNumber.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "Number");
            length.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "Length");
            weight.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "Weight");
            diameter.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "Diameter");
            thickness.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "WallThickness");
            pipeLength.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PipeLength");

            deactivated.DataBindings
                .Add(BindingHelper.CreateCheckEditInverseBinding(
                        "Checked", pipeNewEditBindingSource, "PipeIsActive"));

            plateThickness.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PlateThickness");
            pipeCreationDate.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "ProductionDate");

            steelGrade.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "SteelGrade");

            plateManufacturer.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PlateManufacturer");

            pipeSize.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PipeMillSizeType");

            purchaseOrderDate.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PurchaseOrderDate");


            releaseNoteNumber.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "ReleaseNoteNumber");
            releaseNoteDate.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "ReleaseNoteDate");


            railcarNumber.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "RailcarNumber");

            certificateNumber.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "RailcarCertificate");
            destination.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "RailcarDestination");

            plateNumber.DataBindings
                .Add("EditValue", pipeNewEditBindingSource, "PlateNumber", true, DataSourceUpdateMode.OnPropertyChanged);


            inspections.DataBindings
                .Add("DataSource", pipeNewEditBindingSource, "PipeTestResults");


            coatingHistory.DataBindings
                .Add("DataSource", pipeNewEditBindingSource, "Coats");
            weldingHistory.DataBindings
                .Add("DataSource", pipeNewEditBindingSource, "Welds");


            resultStatusLookUpEdit.DataSource = viewModel.TestResultStatuses;

            millStatus.DataBindings.Add(
                BindingHelper.CreateOneWayReadToString("Text", pipeNewEditBindingSource, "PipeStatus",
                (value) =>
                {
                    return (string)localizedAllPipeMillStatus[(int)value];
                }));

            ordersLookUp.DataBindings.Add("EditValue", pipeNewEditBindingSource, "PipePurchaseOrder");

            heatsLookUp.DataBindings.Add("EditValue", pipeNewEditBindingSource, "Heat");

            inspectionCodeLookUpEdit.DataSource = viewModel.AvailableTests;
            #endregion


            weldBindingSource.DataSource = viewModel.Pipe;
            weldBindingSource.DataMember = "Welds";
            weldBindingSource.ListChanged += (s, eve) => IsModified = true;
            weldersDataSource.DataSource = viewModel.Welders;

            weldersSelectionControl.DataSource = weldersDataSource;
            var weldersPopup = new PopupContainerControl();
            weldersPopup.Controls.Add(weldersSelectionControl);
            weldersSelectionControl.Dock = DockStyle.Fill;
            repositoryItemPopupWelders.PopupControl = weldersPopup;
            repositoryItemPopupWelders.PopupControl.MaximumSize = weldersPopup.MaximumSize;

            inspectorsDataSource.DataSource = viewModel.Inspectors;
            inspectorsDataSource.ListChanged += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;

            coatingTypeDict.Clear();
            coatingTypeDict.Add(CoatingType.Internal, Program.LanguageManager.GetString(StringResources.MillPipe_CoatInternal));
            coatingTypeDict.Add(CoatingType.External, Program.LanguageManager.GetString(StringResources.MillPipe_CoatExternal));

            repositoryItemLookUpEditCoatType.DataSource = coatingTypeDict;

            coatDataSource.ListChanged += (s, eve) => IsModified = true;

            coatDataSource.DataSource = viewModel.Pipe;

        }
        private void BindToViewModel()
        {
            jointNewEditBindingSoure.DataSource = viewModel;

            jointNumber.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "Number", true, DataSourceUpdateMode.OnPropertyChanged);

            deactivated.DataBindings
                .Add(BindingHelper.CreateCheckEditInverseBinding(
                        "Checked", jointNewEditBindingSoure, "JointIsActive"));
            loweringDate.DataBindings
               .Add("EditValue", jointNewEditBindingSoure, "LoweringDate", true, DataSourceUpdateMode.OnPropertyChanged);
            GPSLat.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "GpsLatitude");
            GPSLong.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "GpsLongitude");
            seaLevel.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "GpsHeight");
            PKNumber.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "NumberKP");
            distanceFromPK.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "DistanceFromKP");
            controlOperations.DataBindings
               .Add("DataSource", jointNewEditBindingSoure, "JointTestResults");
            repairOperations.DataBindings
               .Add("DataSource", jointNewEditBindingSoure, "JointWeldResults");

            searchNumber.DataBindings.
                Add("EditValue", jointNewEditBindingSoure, "SearchNumber");


            jointStatus.DataBindings.Add(
                BindingHelper.CreateOneWayReadToString("Text", jointNewEditBindingSoure, "JointConstructionStatus",
                (value) =>
                {
                    return (string)localizedAllJointStatus[(int)value];
                }));



            pipelinePiecesBindingSource.DataSource = viewModel.PartDataList;

            SetLookup(firstJointElement);
            SetLookup(secondJointElement);

            firstJointElement.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "FirstElementId", true, DataSourceUpdateMode.OnPropertyChanged);
            secondJointElement.DataBindings
                .Add("EditValue", jointNewEditBindingSoure, "SecondElementId", true, DataSourceUpdateMode.OnPropertyChanged);


            firstJointElement.DataBindings
                .Add("Enabled", jointNewEditBindingSoure, "IsNotWithdrawn", true, DataSourceUpdateMode.OnPropertyChanged);
            secondJointElement.DataBindings
                .Add("Enabled", jointNewEditBindingSoure, "IsNotWithdrawn", true, DataSourceUpdateMode.OnPropertyChanged);


            ControlOperationLookUpEdit.DataSource = viewModel.ControlOperations;
            repairOperationsLookUpEdit.DataSource = viewModel.RepairOperations;

            inspectorsDataSource.DataSource = viewModel.Inspectors;
            inspectorsDataSource.ListChanged += (s, eve) => IsModified = true;
            inspectorSelectionControl.DataSource = inspectorsDataSource;
            var inspectorsPopup = new PopupContainerControl();
            inspectorsPopup.Controls.Add(inspectorSelectionControl);
            inspectorSelectionControl.Dock = DockStyle.Fill;
            inspectorsPopupContainerEdit.PopupControl = inspectorsPopup;
            inspectorsPopupContainerEdit.PopupControl.MaximumSize = inspectorsPopup.MaximumSize;

            weldersDataSource.DataSource = viewModel.Welders;
            weldersDataSource.ListChanged += (s, eve) => IsModified = true;
            weldersSelectionControl.DataSource = weldersDataSource;
            var weldersPopup = new PopupContainerControl();
            weldersPopup.Controls.Add(weldersSelectionControl);
            weldersSelectionControl.Dock = DockStyle.Fill;
            weldersPopupContainerEdit.PopupControl = weldersPopup;
            weldersPopupContainerEdit.PopupControl.MaximumSize = weldersPopup.MaximumSize;

        }