示例#1
0
 private void lClear_Click(object sender, EventArgs e)
 {
     if (this.SortsString.ContainsKey(this.btn.Column.Name))
     {
         this.SortsString.Remove(this.btn.Column.Name);
     }
     this.helper = new ZCGridSortHelper();
     this.SortThisColumn();
     this.Visible = false;
 }
示例#2
0
        internal void ResetShow(ZCGridColumnSortButton btn)
        {
            if (this.btn != null && this.btn.IsDisposed == false && this.btn.Equals(btn) == false)
            {
                this.btn.Checked = false;
            }

            this.btn         = btn;
            this.btn.Checked = true;

            this.cklList.Items.Clear();
            this.cklList.Items.Add("正在读取...");
            this.cklList.Enabled = false;
            this.checkListInitOk = false;
            this.helper          = this.btn.sortHelper;

            this.cbbFirstLogic.SelectedIndex = (int)helper.FirstKeyFilterType;
            this.txtFirstKey.Text            = helper.FirstKey;

            if (helper.KeyLinkType == ZCGridViewKeyLinkType.And)
            {
                this.rdoAnd.Checked = true;
            }
            else if (helper.KeyLinkType == ZCGridViewKeyLinkType.Or)
            {
                this.rdoOr.Checked = true;
            }
            else
            {
                this.rdoSingle.Checked = true;
            }

            this.cbbSecondLogic.SelectedIndex = (int)helper.SecondKeyFilterType;
            this.txtSecondKey.Text            = helper.SecondKey;

            this.bwReadList.RunWorkerAsync(this.btn.Column.Name);
            Application.DoEvents();

            this.Size = this.MinimumSize;
            Point p = this.dbgEq.PointToScreen(btn.Location);

            p.Y += btn.Height;

            this.Location = p;

            if (this.Right > Screen.PrimaryScreen.WorkingArea.Right)
            {
                this.Left = Screen.PrimaryScreen.WorkingArea.Right - this.Width;
            }
            if (this.Left < Screen.PrimaryScreen.WorkingArea.Left)
            {
                this.Left = Screen.PrimaryScreen.WorkingArea.Left;
            }
            if (this.Bottom > Screen.PrimaryScreen.WorkingArea.Bottom)
            {
                this.Top = Screen.PrimaryScreen.WorkingArea.Bottom - this.Height;
            }

            this.Show();
            this.cklList.Select();
        }