public FilterAspectForBindingSource(IDataBindingSource ds, IEditorsHost eh, BarManager bm){
			_ds = ds;
			_barManager = bm;
			_popup = new PopupControlContainer();
			_fc = new FieldExpressionControl();
			_popup.Controls.Add(_fc);
			_fc.Dock = DockStyle.Fill;

			//weak event
			_fc.OnCancel += (s, e) =>
			{
				_popupCloseKind = PopupCloseKind.Cancel;
				_popup.HidePopup();
			};
			//weak event
			_fc.OnOk += (s, e) =>
			{
				_popupCloseKind = PopupCloseKind.Confirm;
				_popup.HidePopup();
			};

			_fc.filterEditorControl.FilterControl.BeforeShowValueEditor += showvalueEditor_handler;

			_popup.CloseUp += popup_CloseUp;
		}
        // we need lazy creation
        private void make_fc()
        {
            if (_fc != null)
            {
                return;
            }

            _fc = new FieldExpressionControl();
            _popup.Controls.Add(_fc);
            _fc.Dock = DockStyle.Fill;

            //weak event
            _fc.OnCancel += (s, e) =>
            {
                _popupCloseKind = PopupCloseKind.Cancel;
                _popup.HidePopup();
            };
            //weak event
            _fc.OnOk += (s, e) =>
            {
                _popupCloseKind = PopupCloseKind.Confirm;
                _popup.HidePopup();
            };

            _fc.filterEditorControl.FilterControl.BeforeShowValueEditor += showvalueEditor_handler;
        }
Beispiel #3
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            PopupControlContainer popup = ChargeDateSelectBtn.DropDownControl as PopupControlContainer;

            popup.HidePopup();

            DateEdit startDate  = popup.Controls.Find("startDate", true)[0] as DateEdit;
            DateEdit middleDate = popup.Controls.Find("middleDate", true)[0] as DateEdit;
            DateEdit lastDate   = popup.Controls.Find("lastDate", true)[0] as DateEdit;

            if (startDate.EditValue != null && startDate.EditValue != "" && middleDate.EditValue != null &&
                middleDate.EditValue != "" && lastDate.EditValue != null && lastDate.EditValue != "" &&
                startDate.DateTime <= middleDate.DateTime && middleDate.DateTime <= lastDate.DateTime)
            {
                var taskCharge = new TaskChargeFilter("获取自定义时段计费信息",
                                                      new ChargeFilterCondition(startDate.DateTime, middleDate.DateTime, lastDate.DateTime,
                                                                                _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);
                TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());
            }
            else
            {
                MessageBox.Show("计费时间设定错误");
            }
        }
Beispiel #4
0
 private void OnEnterColor(Color clr)
 {
     container.HidePopup();
     main.CurrentRichTextBox.SelectionColor = clr;
 }
Beispiel #5
0
 private void OnEnterColor(Color clr)
 {
     container.HidePopup();
     ResultColor = clr;
 }
Beispiel #6
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            PopupControlContainer popup = ChargeDateSelectBtn.DropDownControl as PopupControlContainer;

            popup.HidePopup();
        }