public void InitData(PopupContainerEdit popupcEdit, IEnumerable <T> dataSource, string keyFieldName, string parentFieldName, string previewFieldName, bool showCheckBox = false) { PopupcEdit = popupcEdit; allowCheckBox = showCheckBox; DSCommon.SetTreeList(treeList1, showCheckBox); if (showCheckBox) { treeList1.AfterCheckNode += treeList1_AfterCheckNode; } else { treeList1.FocusedNodeChanged += treeList1_FocusedNodeChanged; //treeList1.AfterFocusNode += treeList1_AfterFocusNode; } treeList1.KeyFieldName = keyFieldName; treeList1.ParentFieldName = parentFieldName; treeList1.PreviewFieldName = previewFieldName; if (!string.IsNullOrWhiteSpace(previewFieldName)) { TreeListColumn tc = new TreeListColumn { Name = previewFieldName, FieldName = previewFieldName, VisibleIndex = 0 }; tc.OptionsColumn.AllowEdit = false; treeList1.Columns.Add(tc); } treeList1.DataSource = dataSource; treeList1.ExpandAll(); }
/// <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 MyPopupContainerForm(PopupContainerEdit ownerEdit) : base(ownerEdit) { myButton.Text = "Test"; Controls.Add(myButton); myButton.Click += new EventHandler(myButton_Click); }
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 static void DisplayMultipleText(PopupContainerEdit cont) { var list = cont.Properties.PopupControl.Controls[0] as CheckedListBoxControl; string dispVal = ""; foreach (var i in list.CheckedItems) { if (Utils.IsEmpty(i.ToString())) { continue; } if (i is IObject) { if (0L.Equals(((IObject)i).Key)) { continue; } } if (dispVal.Length > 0) { dispVal += ", "; } dispVal += i.ToString(); } cont.EditValue = dispVal; }
/// <summary> /// 用于处理BindCheckListPopCallBack /// </summary> /// <param name="p_popContainerEdit"></param> /// <param name="p_CallBackHandler"></param> public PopContainerUtil(PopupContainerEdit p_popContainerEdit, BindCheckListPopCallBack p_CallBackHandler) { InitializeComponent(); m_popContainerEdit = p_popContainerEdit; ChkPopList.ItemCheck += new DevExpress.XtraEditors.Controls.ItemCheckEventHandler(ChkPopList_ItemCheck); p_CallBackHandler(ChkPopList);//绑定数据源 p_popContainerEdit.Properties.PopupControl = PopContainer; }
private void repositoryItemPopupContainerEdit1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { PopupContainerEdit edit = (PopupContainerEdit)sender; edit.ShowPopup(); } }
private void OnColumnEditPopup(object sender, EventArgs e) { CurrentPopup = (PopupContainerEdit)sender; DataRowView drv = (DataRowView)gridShelvesView.GetFocusedRow(); CShelfRowCol.LoadColumnsForShelf(Convert.ToInt32(drv["ID"])); gridShelfColumn.DataSource = CShelfRowCol.DefaultView; }
private void riPopup_CloseUp(object sender, CloseUpEventArgs e) { if (!e.AcceptValue) { PopupContainerEdit pSender = (PopupContainerEdit)sender; RichEditControl rEdit = (RichEditControl)pSender.Properties.PopupControl.Controls[0]; rEdit.Document.RtfText = e.Value.ToString(); } }
void Properties_Popup(object sender, EventArgs e) { PopupContainerEdit edit = sender as PopupContainerEdit; if (!edit.IsPopupOpen) { edit.ShowPopup(); } UpdateSelection(edit, popupGridView2); }
void ri_EditValueChanged(object sender, EventArgs e) { PopupContainerEdit edit = sender as PopupContainerEdit; if (!edit.IsPopupOpen) { edit.ShowPopup(); } UpdateSelection(edit, popupGridView1); }
/// <summary> /// 팝업컨테이터 에디트에서의 마우스클릭 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param> private void pop_MouseClick(object sender, MouseEventArgs e) { ///TODO:[가입금등록]팝업컨테이터 에디트에서의 마우스클릭 PopupContainerEdit popedit = (PopupContainerEdit)sender; if (popedit.Name == "popMemberNo") { pop_KeyDown(popMemberNo, new KeyEventArgs(Keys.F4)); } }
/// <summary> /// 팝업컨테이터 에티트에서의 키다운 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param> private void pop_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.F4) { return; } PopupContainerEdit popedit = (PopupContainerEdit)sender; Ctl.Control.frmLoading f = new Ctl.Control.frmLoading("검색중 입니다."); try { ///TODO:[가입금등록]팝업컨테이터 에티트에서의 키다운 string strInput = popedit.EditValue.ToString().Trim(); f.Show(); Application.DoEvents(); //레코드를 가져온다. DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter); //회원번호 if (popedit.Name == "popMemberNo") { dtParm.Rows.Add(new object[] { "V_BIZ_CODE", Parm.CurrentUserInformation.BizInfo.BizCode }); dtParm.Rows.Add(new object[] { "V_MEMBER_NO", strInput }); dtParm.Rows.Add(new object[] { "V_FAMILY_SEQ", "" }); DataSet ds = DataLayer.ExecuteSpDataset("PKG_COMM.PR_11", dtParm, DataLayer.MessageEncoding.Default); if (ds.Tables[0].Rows.Count <= 0) { this.popMemberNo.EditValue = "입력하세요"; this.popMemberNo.SelectAll(); } Cls.Common.uPopupContainer.DataBinding(this.popMemberNo, ds.Tables[0]); this.popMemberNo.SelectAll(); } } catch (Exception ex) { if (f.IsHandleCreated) { f.Close(); } Basic.ShowMessage(3, ex.Message); } finally { if (f.IsHandleCreated) { f.Close(); } } }
public void LoadUserData() { if (this.PopupContainerProperties != null && this.PopupContainerProperties.ShowPopupCloseButton) { this.PopupContainerProperties.ShowPopupCloseButton = false; } if (_isInitName) { if (selection.Count > 0 && this.popupContainerView.FocusedRowHandle >= 0) { _initRowHandle = this.popupContainerView.FocusedRowHandle; this.popupContainerView.MakeRowVisible(_initRowHandle); } return; } PopupContainerEdit edit = this.Tag as PopupContainerEdit; if (edit == null) { return; } var selectedValue = edit.EditValue; if (selectedValue == null) { return; } if (_context.BindingSource.List.Count == 0) { return; } Guid userId; if (!Guid.TryParse(selectedValue.ToString(), out userId)) { return; } var selectedEntityList = _context.BindingSource.List.AsQueryable().Where("" + LayOutEntityKey + " = @0", userId).ToArrayList(); if (selectedEntityList == null || selectedEntityList.Count <= 0) { return; } _initRowHandle = _context.BindingSource.List.IndexOf(selectedEntityList[0]); SelectRow(_initRowHandle, true); edit.Refresh(); _isInitName = true; }
/// <summary> /// 处理文本框(不直接用MenoEdit而使用这种方式主要是为了节约界面空间) /// </summary> /// <param name="p_popContainerEdit"></param> public PopContainerUtil(PopupContainerEdit p_popContainerEdit) { InitializeComponent(); m_popContainerEdit2 = p_popContainerEdit; m_popContainerEdit2.MouseClick += new MouseEventHandler( delegate(object sender, MouseEventArgs e) { memoEdit1.Text = m_popContainerEdit2.Text; } ); p_popContainerEdit.Properties.PopupControl = popMenoEidt; popMenoEidt.Width = m_popContainerEdit2.Width; }
/// <summary> /// 팝업그리드 필터 클리어 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void pop_Control(object sender, EventArgs e) { try { ///TODO:[가입금등록]팝업그리드 필터 클리어 PopupContainerEdit popedit = (PopupContainerEdit)sender; ((GridView)((DevExpress.XtraGrid.GridControl)popedit.Properties.PopupControl.Controls[0]).MainView).ClearColumnsFilter(); } catch (Exception ex) { Basic.ShowMessage(3, ex.Message); } }
private void OnDetailsEditQueryPopup(object sender, CancelEventArgs e) { PopupContainerEdit edit = (PopupContainerEdit)sender; if ((bool)gridView1.GetFocusedRowCellValue(colUseGrid)) { edit.Properties.PopupControl.Controls.Add(gridEditor); edit.Properties.PopupControl.Size = GridEditorSize; } else { edit.Properties.PopupControl.Controls.Add(simpleEditor); edit.Properties.PopupControl.Size = SimpleEditorSize; } }
public static void AddDetailButton <TDetailView>(this PopupContainerEdit edit, Func <Guid, Type, String, bool> fuc, string entityName) where TDetailView : AbstractDetailView { edit.Properties.Buttons.Add(new EditorButton()); edit.ButtonClick += (sender, e) => { if (edit.EditValue == null || e.Button.Kind != ButtonPredefines.Ellipsis || edit.EditValue == DBNull.Value) { return; } var entityId = (Guid)edit.EditValue; fuc(entityId, typeof(TDetailView), entityName); }; }
public BasePanelPopupHelper(PopupContainerEdit popupEdit) { Init(); m_popupEdit = popupEdit; popupEdit.Properties.PropertiesChanged += Popup_Property_Changed; popupEdit.Properties.CloseOnOuterMouseClick = false; //Properties.CloseOnLostFocus = False popupEdit.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; popupEdit.Properties.ReadOnly = true; popupEdit.Properties.ShowPopupCloseButton = false; popupEdit.Properties.AutoHeight = false; popupEdit.QueryPopUp += OnQueryPopUp; popupEdit.QueryCloseUp += OnQueryCloseUp; popupEdit.CloseUp += OnCloseUp; popupEdit.QueryDisplayText += OnQueryDisplayText; }
private void OnCalculateToolTip(object sender, ToolTipControllerCalcSizeEventArgs e) { if (e.SelectedControl is PopupContainerEdit) { PopupContainerEdit popup = (PopupContainerEdit)e.SelectedControl; if (popup == this) { if (EditValue != null) { e.Size = new Size(75, 20); } else { e.ShowInfo.Show = false; } } } }
private IDisposable KeepPopup() { //Clicking a dialog closes the popup form. //Therefore, I show it again afterwards. PopupContainerEdit ownerEdit = null; var ppc = this.Parent as PopupContainerControl; if (ppc != null) { ownerEdit = ppc.OwnerEdit; //After the popup closes, OwnerEdit is null. } return(new Disposable(delegate { if (ownerEdit != null && !ownerEdit.IsPopupOpen) { ownerEdit.ShowPopup(); } })); }
private void UpdateSelection(PopupContainerEdit edit, GridView view) { view.BeginSelection(); view.ClearSelection(); if (edit != null) { if (edit.EditValue != null) { edit.Focus(); List <int> selection = GetSelection(edit.EditValue.ToString().Split(new string[] { ", " }, StringSplitOptions.None), "Name", view); foreach (int rowHandle in selection) { view.SelectRow(rowHandle); } } } view.EndSelection(); }
void OnPopup(object sender, EventArgs e) { DetailGrid.BeginUpdate(); try { DetailGrid.DataSource = null; DetailGrid.DataSource = GetDetailData(); } finally { DetailGrid.EndUpdate(); } PopupContainerEdit edit = sender as PopupContainerEdit; if (edit.Properties.PopupControl.Parent == null) { edit.Properties.PopupControl.Parent = edit.FindForm(); } DetailGrid.ForceInitialize(); edit.Properties.PopupFormSize = CalcDetailViewSize(); }
public static void AddDetailButton(this PopupContainerEdit edit, string entityName) { edit.Properties.Buttons.Add(new EditorButton()); edit.ButtonClick += (sender, e) => { if (edit.EditValue == null || e.Button.Kind != ButtonPredefines.Ellipsis || edit.EditValue == DBNull.Value) { return; } var entityId = (Guid)edit.EditValue; var parameters = new ActionParameters(entityName, entityId, Workspaces.ViewShowType.Show) { { "WorkingMode", EntityDetailWorkingMode.View } }; App.Instance.Invoke(entityName, "Detail", parameters); }; }
public static List <Guid> GetSelection(this PopupContainerEdit edit) { PopupContainerControlExtention sample = edit.Properties.PopupControl as PopupContainerControlExtention; List <Guid> result = new List <Guid>(); if (sample == null) { return(result); } if (sample.Selection.Count <= 0) { return(result); } for (int rIndex = 0; rIndex < sample.Selection.Count; rIndex++) { var selectItem = sample.Selection[rIndex]; var selectValue = selectItem.GetType().GetProperty(sample.LayOutEntityKey).GetValue(selectItem, null); result.Add((Guid)selectValue); } return(result); }
/// <summary> ///팝업컨테이터 에디트에서의 키업 /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Forms.KeyEventArgs"/> instance containing the event data.</param> private void pop_KeyUp(object sender, KeyEventArgs e) { try { ///TODO:[가입금등록]팝업컨테이너 에디트에서의 키업 if (e.KeyCode == Keys.Enter) { return; } PopupContainerEdit popedit = (PopupContainerEdit)sender; //회원번호 if (popedit.Name == "popMemberNo" && popedit.EditValue.ToString() == "") { this.popMemberNo.EditValue = "입력하세요"; this.txtMemberNo.Text = ""; this.popMemberNo.SelectAll(); } } catch (Exception ex) { Basic.ShowMessage(3, ex.Message); } }
private void OnRowLabelEditPopup(object sender, EventArgs e) { CurrentPopup = (PopupContainerEdit)sender; DataRowView drv = (DataRowView)gridShelvesView.GetFocusedRow(); CShelfRowCol.LoadRowsForShelf(Convert.ToInt32(drv["ID"])); gridShelfRows.DataSource = CShelfRowCol.DefaultView; }
void RepositoryItemSelectDMGridTemplate_Popup(object sender, EventArgs e) { containerEdit = (PopupContainerEdit)sender; dmGridTemplate1.setPopupControl(containerEdit); dmGridTemplate1.setSelectedID(selectId); }
void RepositoryItemSelectDMGridTemplate_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (!isSetValue) { containerEdit = (PopupContainerEdit)sender; dmGridTemplate1.Grid.ActiveFilterString = "[" + FilterField + "]" + " Like " + "'%" + containerEdit.Text + "%'"; containerEdit.ShowPopup(); containerEdit.Focus(); isActive = true; } }
void RepositoryItemSelectDMGridTemplate_Popup(object sender, EventArgs e) { containerEdit = (PopupContainerEdit)sender; _DMGridCore.setPopupControl(containerEdit); try { DataRow row = null; if(this.mainGridView.GetFocusedRow()!=null) row = ((DataRowView)this.mainGridView.GetFocusedRow()).Row; if (row != null) { long ret = HelpNumber.ParseInt64(row[columnField]); if (ret < 0) ret = -1; selectId = ret; _DMGridCore.setSelectedID(selectId); } else { selectId = -1; _DMGridCore.setSelectedID(selectId); } _DMGridCore._DMCore.Grid.BestFitColumns(); } catch { selectId = -1; _DMGridCore.setSelectedID(selectId); } }
void RepositoryItemSelectDMGridTemplate_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (!isSetValue) { containerEdit = (PopupContainerEdit)sender; object prevalue = null; plGroupCatNew1.TreeList_1.OptionsBehavior.EnableFiltering = true; plGroupCatNew1.TreeList_1.OptionsBehavior.AutoSelectAllInEditor = false; plGroupCatNew1.TreeList_1.FilterConditions[plGroupCatNew1.TreeList_1.FilterConditions.Count - 1].Value1 = prevalue; plGroupCatNew1.TreeList_1.FilterConditions[plGroupCatNew1.TreeList_1.FilterConditions.Count - 1].Visible = true; plGroupCatNew1.TreeList_1.FilterConditions[plGroupCatNew1.TreeList_1.FilterConditions.Count - 1].Value1 = containerEdit.Text; plGroupCatNew1.TreeList_1.FilterConditions[plGroupCatNew1.TreeList_1.FilterConditions.Count - 1].Visible = false; prevalue = containerEdit.Text; containerEdit.ShowPopup(); containerEdit.Focus(); isActive = true; } }
private void popctarget_QueryPopUp(object sender, CancelEventArgs e) { this.Cur_popc = sender as PopupContainerEdit; this.Cur_popc.Properties.PopupControl = this.pop_ctrl_combox; this.LoadPopCtrl(); }
/* private Dictionary<string, string> GetPrint() { var dic = new Dictionary<string, string>(); // FWDBService db = HelpDB.getDBService(); // DbCommand cmd = db.GetSQLStringCommand(string.Format(@"SELECT LIST(BM_ID) // FROM BIEN_MUC WHERE MA_BANG = '{0}' AND IS_DELETE='N'", ChuongTrinh.MA_BANG)); // object ids = db.ExecuteScalar(cmd); // string bmids = ""; // if (ids != null && !(ids is DBNull)) // bmids = ids.ToString(); // else return dic; // if (bmids.Split(',').Length > 10) // { // HelpMsgBox.ShowNotificationMessage("Chỉ hỗ trợ in nhãn tối đa là 10 biên mục trên một mã băng!"); // return dic; // } // else dic.Add(ChuongTrinh.MA_BANG, bmids); return dic; } */ private void InitControl() { BtnExport = new SimpleButton(); BtnPrint = new SimpleButton(); FormClosing += delegate(object sender, FormClosingEventArgs e) { if (_isAdd == false) GetData(); if (_noConfirm == false && (_isAdd == true || (_isAdd == false && _chuongTrinh.Compare(_rootChuongTrinh) == false)) && btnSave.Visible) { var value = AppCtrl.ShowConfirmMessgaeBeforeClose(); if (value == DialogResult.Cancel) { e.Cancel = true; return; } if (value == DialogResult.Yes) { if (Save() == false) e.Cancel = true; } } }; HelpPhieu.InitDropDownButton(NghiepVu, InPhieu, null, ctMnuNghiepVu, ctMnuInPhieu, null); AppCtrl.InitAutocompleteCategory(Category); AppCtrl.SetMaskEditKHPL(KyHieuPhanLoai); AppCtrl.SetMaskRating(Rating); AppCtrl.SetMaskNam(NamSanXuat); AppCtrl.InitAutocompleteNoiDung(NoiDung); AppCtrl.InitAutocompleteTenGoc(TenGoc); AppCtrl.InitAutocompletePlDrama(PhanLoaiDrama); AppCtrl.InitAutocompleteDVHauKy(DonViHauKy); DMTietMuc.InitCtrl(TietMuc, _isAdd == null); DMNuocSanXuat.InitCtrl(QuocGia, _isAdd); DMDoiTuongKG.InitCtrl(DoiTuongKhanGia, _isAdd); DMDonViCungCap.InitCtrl(DonViCungCap, _isAdd == null); DMDonViSoHuu.InitCtrl(DonViSoHuu, _isAdd == null); DMHangSanXuat.InitCtrl(HangSanXuat, _isAdd == null); DMTuKhoa.InitCtrl(TuKhoaSelect, _isAdd); DMTinhTrangBang.InitCtrl(TinhTrangBang, _isAdd == null); DMDaoDien.InitCtrl(DaoDien, _isAdd); DMDienVien.InitCtrl(DienVien, _isAdd); DMDaiTruyenHinh.InitCtrl(KenhHanCheBan, _isAdd); DMBanQuyenThuoc.InitCtrl(BanQuyenThuoc, _isAdd == null); DMRanking.InitCtrl(Ranking, _isAdd == null); _tietMucEdit = TietMuc.popupContainerEdit1; ClassName._Init(CHUONG_TRINH.TABLE_NAME, CHUONG_TRINH.CLASS, "IS_DELETE='N' or IS_DELETE IS NULL"); NguonTrading._Init(CHUONG_TRINH.TABLE_NAME, CHUONG_TRINH.NGUON_TRADING, "IS_DELETE='N' or IS_DELETE IS NULL"); DMDaiTruyenHinh.InitCtrl(ChanelRight, _isAdd, false); Period._Init(CHUONG_TRINH.TABLE_NAME, CHUONG_TRINH.PERIOD); InitTab(); }
private void InitControl() { HelpControlExt.AutoSetTabIndex(this); this.FormClosing += delegate(object sender, FormClosingEventArgs e) { if (NoConfirm == false && (IsAdd == true || IsAdd == false) && btnSave.Visible) { if (PLMessageBox.ShowConfirmMessage("Bạn có muốn lưu không?") == DialogResult.Yes) { if (Save() == false) e.Cancel = true; } } }; HelpPhieu.InitDropDownButton(NghiepVu, InPhieu, null, ctMnuNghiepVu, ctMnuInPhieu, null); AppCtrl.SetMaskEditKHPL(KyHieuPhanLoai); AppCtrl.SetMaskKeNganTang(Ke, Ngan, Tang); AppCtrl.SetMaskSoBang(SoBang); AppCtrl.SetMaskRating(Rating); AppCtrl.SetMaskNam(NamSanXuat); BanQuyen.Properties.Items.AddRange(new object[] { "Bản quyền", "Expired", "Other" });//Không được sửa thứ tự này AppCtrl.InitNoiDungAutocomplete(NoiDung); DMTietMuc.InitCtrl(TietMuc, IsAdd == null); DMLoaiBang.InitCtrl(LoaiBang, IsAdd == null); DMThongSoLoaiBang.InitCtrl(ThongSoLoaiBang, IsAdd == null); DMNuocSanXuat.InitCtrl(QuocGia, IsAdd); DMHardDisks.InitCtrl(SODKHD, IsAdd); DMDoiTuongKG.InitCtrl(DoiTuongKhanGia, IsAdd); DMDonViCungCap.InitCtrl(DonViCungCap, IsAdd == null); DMDonViSoHuu.InitCtrl(DonViSoHuu, IsAdd == null); DMTuKhoa.InitCtrl(TuKhoaSelect, IsAdd); if (TietMuc.Controls["popupContainerEdit1"] != null && TietMuc.Controls["popupContainerEdit1"] is PopupContainerEdit) { TietMuc_Edit = (PopupContainerEdit)TietMuc.Controls["popupContainerEdit1"]; } }
void Properties_EditValueChanged(object sender, EventArgs e) { PopupContainerEdit edit = sender as PopupContainerEdit; UpdateSelection(edit, popupGridView2); }
private void BindPalletLocationForEdit(object sender, EventArgs e) { // Keep the reference of the current popup control so that the cancel logic works just fine. CurrentPopup = (PopupContainerEdit)sender; //Get the selected row DataRow dr = detailView.GetFocusedDataRow(); int palletLocationID = Convert.ToInt32(dr["PalletLocationID"]); // Enable and disable optional fields String SType = dr["STI"].ToString(); if (SType == "") { SType = dr["ShelfStorageType"].ToString(); } cmbFixedPrefered.Enabled = true; if (SType == StorageType.BulkStore) { //lstPreferedItems.Visible = true; //lblPreferredItem.Visible = true; //cmbFixedPrefered.Enabled = false; lblFixedPickItem.Visible = false; cmbFixedPrefered.Visible = false; } else if (SType == StorageType.PickFace) { lblFixedPickItem.Text = "Pick Item"; lstPreferedItems.Visible = false; lblPreferredItem.Visible = false; cmbFixedPrefered.Properties.DataSource = Item.GetItems(StorageType.BulkStore); PickFace pf = new PickFace(); pf.LoadByPalletLocation(palletLocationID); if (pf.RowCount >0 && !pf.IsColumnNull("DesignatedItem")) { cmbFixedPrefered.EditValue = pf.DesignatedItem; } else { cmbFixedPrefered.EditValue = null; } lblFixedPickItem.Visible = true; cmbFixedPrefered.Visible = true; } else { cmbFixedPrefered.Properties.DataSource = Item.GetItems(dr["STI"].ToString()); BLL.ItemPrefferedLocation ipl = new ItemPrefferedLocation(); ipl.LoadByRackID( palletLocationID ); if (ipl.RowCount > 0) { cmbFixedPrefered.EditValue = ipl.ItemID; } else { cmbFixedPrefered.EditValue = null; } lblFixedPickItem.Text = "Fixed Item"; lblFixedPickItem.Visible = true; cmbFixedPrefered.Visible = true; lstPreferedItems.Visible = false; lblPreferredItem.Visible = false; } // Bind the available variables txtPalletLocationLabel.Text = dr["Label"].ToString(); chkEnabled.Checked = Convert.ToBoolean(dr["IsEnabled"]); }
void ri_Popup(object sender, EventArgs e) { PopupContainerEdit edit = sender as PopupContainerEdit; UpdateSelection(edit, popupGridView1); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.cboSelectedNodeText = new DevExpress.XtraEditors.ImageComboBoxEdit(); this.popupContainer = new DevExpress.XtraEditors.PopupContainerControl(); this.tagTree = new Prometheus.Controls.TagArchiveTree(); this.popupContainerEdit1 = new DevExpress.XtraEditors.PopupContainerEdit(); ((System.ComponentModel.ISupportInitialize)(this.cboSelectedNodeText.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.popupContainer)).BeginInit(); this.popupContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.popupContainerEdit1.Properties)).BeginInit(); this.SuspendLayout(); // // cboSelectedNodeText // this.cboSelectedNodeText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.cboSelectedNodeText.EditValue = ""; this.cboSelectedNodeText.Location = new System.Drawing.Point(0, 0); this.cboSelectedNodeText.Name = "cboSelectedNodeText"; // // cboSelectedNodeText.Properties // this.cboSelectedNodeText.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.cboSelectedNodeText.Properties.ReadOnly = true; this.cboSelectedNodeText.Properties.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.Never; this.cboSelectedNodeText.Size = new System.Drawing.Size(336, 20); this.cboSelectedNodeText.TabIndex = 0; this.cboSelectedNodeText.ButtonPressed += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.cboSelectedNodeText_ButtonPressed); // // popupContainer // this.popupContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.popupContainer.Appearance.BackColor = System.Drawing.SystemColors.Control; this.popupContainer.Appearance.Options.UseBackColor = true; this.popupContainer.Controls.Add(this.tagTree); this.popupContainer.Location = new System.Drawing.Point(0, 24); this.popupContainer.Name = "popupContainer"; this.popupContainer.Size = new System.Drawing.Size(328, 216); this.popupContainer.TabIndex = 1; // // tagTree // this.tagTree.ActiveTagSource = Prometheus.Controls.FileSource.TagLibrary; this.tagTree.Dock = System.Windows.Forms.DockStyle.Fill; this.tagTree.HotTracking = true; this.tagTree.Location = new System.Drawing.Point(0, 0); this.tagTree.MasterArchive = null; this.tagTree.Name = "tagTree"; this.tagTree.PopupMenu = null; this.tagTree.ShowFiles = false; this.tagTree.Size = new System.Drawing.Size(328, 216); this.tagTree.TabIndex = 0; this.tagTree.TagLibrary = null; this.tagTree.NodeSelected += new System.Windows.Forms.TreeViewEventHandler(this.tagTree_NodeSelected); // // popupContainerEdit1 // this.popupContainerEdit1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.popupContainerEdit1.EditValue = ""; this.popupContainerEdit1.Location = new System.Drawing.Point(0, 0); this.popupContainerEdit1.Name = "popupContainerEdit1"; // // popupContainerEdit1.Properties // this.popupContainerEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); this.popupContainerEdit1.Properties.PopupControl = this.popupContainer; this.popupContainerEdit1.Properties.ShowPopupCloseButton = false; this.popupContainerEdit1.Size = new System.Drawing.Size(336, 20); this.popupContainerEdit1.TabIndex = 2; // // TreeViewComboBox // this.Controls.Add(this.popupContainer); this.Controls.Add(this.cboSelectedNodeText); this.Controls.Add(this.popupContainerEdit1); this.Name = "TreeViewComboBox"; this.Size = new System.Drawing.Size(336, 248); ((System.ComponentModel.ISupportInitialize)(this.cboSelectedNodeText.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.popupContainer)).EndInit(); this.popupContainer.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.popupContainerEdit1.Properties)).EndInit(); this.ResumeLayout(false); }
public CustomPopupContainerForm(PopupContainerEdit ownerEdit) : base(ownerEdit) { }
//Dùng khi control nhúng vào PopUp public void setPopupControl(PopupContainerEdit popupConEdit) { this.popupContainer = popupConEdit; }
void RepositoryItemSelectDMGridTemplate_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (!isSetValue) { containerEdit = (PopupContainerEdit)sender; if (FilterField != null) { switch (_filterType) { case _FilterType.START_WITH: _DMGridCore.Grid.ActiveFilterString = "[" + FilterField + "]" + " Like " + "'" + containerEdit.Text + "%'"; break; case _FilterType.CONTAINS: _DMGridCore.Grid.ActiveFilterString = "[" + FilterField + "]" + " Like " + "'%" + containerEdit.Text + "%'"; break; } } containerEdit.ShowPopup(); containerEdit.Focus(); isActive = true; } }
public QuickHidePopupForm(PopupContainerEdit ownerEdit) : base(ownerEdit) { CreateChekedListBox(); }