Beispiel #1
0
        const int TitleBarHeight = 20;         // height for title bar if it appeared

        public FilterDialog()
        {
            InitializeComponent();

            Instance           = this;
            HeightBelowDivider = Height - Divider.Top;
        }
Beispiel #2
0
        /// <summary>
        /// Invoke the editor
        /// </summary>
        /// <param name="qc">QueryColumn to edit</param>
        /// <returns></returns>

        public static void Edit(
            GridColumn gc)
        {
            FilterDialog fltr;

            if (Prototype == null)
            {
                Prototype = new FilterDialog();
            }

            fltr = new FilterDialog();

            fltr.CallingActiveForm = SessionManager.ActiveForm;

            GridView view = gc.View as GridView;

            fltr.Grid           = view.GridControl as MoleculeGridControl;
            fltr.ColInfo        = fltr.Grid.GetColumnInfo(gc);
            fltr.InitialQcState = fltr.ColInfo.Qc.Clone();

            fltr.ConfigureDialog();

            if (!fltr.Qm.DataTableManager.FiltersEnabled)
            {
                fltr.Qm.QueryResultsControl.UpdateFiltering(fltr.ColInfo);
            }

            if (fltr.ColInfo.Mc.DataType == MetaColumnType.Structure)             // make modal for structure
            {
                fltr.ShowDialog(fltr.CallingActiveForm);
            }

            else             // non-modal for others
            {
                fltr.Show(fltr.CallingActiveForm);
                fltr.SetFocusToActiveFilter();
            }

            return;
        }