Esempio n. 1
0
        public SortInfoCollectionMsx GetValues()
        {
            SortInfoMsx si;

            SortInfoCollectionMsx sic = new SortInfoCollectionMsx();

            si = GetSortColumn(SortBySelector1, Ascending1);
            if (si != null)
            {
                sic.SortList.Add(si);
            }

            si = GetSortColumn(SortBySelector2, Ascending2);
            if (si != null)
            {
                sic.SortList.Add(si);
            }

            si = GetSortColumn(columnsSelector3, Ascending3);
            if (si != null)
            {
                sic.SortList.Add(si);
            }

            return(sic);
        }
Esempio n. 2
0
        void GetSortingProperties()
        {
            SortInfoCollectionMsx sic = SortingPropertiesPanel.GetValues();

            V.SortingByColumn = V.ThenBy1Column = V.ThenBy2Column = "";

            for (int i1 = 0; i1 < sic.SortList.Count; i1++)
            {
                SortInfoMsx  si  = sic.SortList[i1];
                string       col = si.DataColumnReference.Name;
                SortOrderMsx so  = si.SortOrder;

                if (i1 == 0)
                {
                    V.SortingByColumn = col;
                    V.SortingByType   = so;
                }

                else if (i1 == 1)
                {
                    V.ThenBy1Column = col;
                    V.ThenBy1Type   = so;
                }

                else if (i1 == 2)
                {
                    V.ThenBy2Column = col;
                    V.ThenBy2Type   = so;
                }
            }

            return;
        }
Esempio n. 3
0
        void AddSortInfo(
            SortInfoCollectionMsx sic,
            string col,
            SortOrderMsx sortType)
        {
            if (!Lex.IsDefined(col))
            {
                return;
            }
            SortInfoMsx si = new SortInfoMsx();

            si.DataColumnReferenceSerializedId = col;
            DataTableMsx dt = V.DataTable;

            if (dt == null)
            {
                dt = Api?.Document?.ActiveDataTableReference;
            }
            if (dt != null)
            {
                si.DataColumnReference = dt.GetColumnByName(col);
            }

            si.SortOrder = sortType;
            sic.SortList.Add(si);
            return;
        }
Esempio n. 4
0
        /// <summary>
        /// Convert individual view sort items to list
        /// </summary>
        /// <returns></returns>

        SortInfoCollectionMsx GetSortInfoCollection()
        {
            SortInfoCollectionMsx sic = new SortInfoCollectionMsx();

            AddSortInfo(sic, V.SortingByColumn, V.SortingByType);
            AddSortInfo(sic, V.ThenBy1Column, V.ThenBy1Type);
            AddSortInfo(sic, V.ThenBy2Column, V.ThenBy2Type);
            return(sic);
        }
Esempio n. 5
0
        /// <summary>
        /// Setup
        /// </summary>
        /// <param name="v"></param>

        public void Setup(
            SpotfireViewProps svp,
            SortInfoCollectionMsx sortInfo,
            EventHandler editValueChangedEventHandler = null)
        {
            InSetup              = true;
            SVP                  = svp;
            SortInfo             = sortInfo;
            ValueChangedCallback = editValueChangedEventHandler;

            SetupSortColumn(sortInfo.GetSortItem(0), SortBySelector1, Ascending1, Descending1, SortBySelector1_EditValueChanged);
            SetupSortColumn(sortInfo.GetSortItem(1), SortBySelector2, Ascending2, Descending2, SortBySelector2_EditValueChanged);
            SetupSortColumn(sortInfo.GetSortItem(2), columnsSelector3, Ascending3, Descending3, SortBySelector3_EditValueChanged);

            InSetup = false;

            return;
        }
Esempio n. 6
0
        /// <summary>
        /// Setup
        /// </summary>
        /// <param name="v"></param>

        public void Setup(
            SpotfireViewManager svm,
            SortInfoCollectionMsx sortInfo,
            EventHandler editValueChangedEventHandler = null)
        {
            InSetup  = true;
            SVM      = svm;
            SortInfo = sortInfo;
            CallerEditValueChangedHandler = editValueChangedEventHandler;

            SetupSortColumn(sortInfo.GetSortItem(0), SortBySelector1, Ascending1, Descending1, SortBySelector1_EditValueChanged);
            SetupSortColumn(sortInfo.GetSortItem(1), SortBySelector2, Ascending2, Descending2, SortBySelector2_EditValueChanged);
            SetupSortColumn(sortInfo.GetSortItem(2), SortBySelector3, Ascending3, Descending3, SortBySelector3_EditValueChanged);

            InSetup = false;

            return;
        }
Esempio n. 7
0
        void SetupSortingTab()
        {
            SortInfoCollectionMsx sic = GetSortInfoCollection();

            SortingPropertiesPanel.Setup(SVP, sic, EditValueChanged);
        }