public async Task ModifySortWayAsync(string Path, SortTarget?SortTarget = null, SortDirection?SortDirection = null)
        {
            if (SortTarget == Class.SortTarget.OriginPath || SortTarget == Class.SortTarget.Path)
            {
                throw new NotSupportedException("SortTarget.Path and SortTarget.OriginPath is not allow in this method");
            }

            if (SortTarget.HasValue)
            {
                this.SortTarget = SortTarget.Value;
            }

            if (SortDirection.HasValue)
            {
                this.SortDirection = SortDirection.Value;
            }

            await SQLite.Current.SetPathConfiguration(new PathConfiguration(Path, this.SortTarget, this.SortDirection)).ConfigureAwait(true);

            SortIndicatorController.SetIndicatorStatus(this.SortTarget, this.SortDirection);
        }
示例#2
0
        public void ModifySortWay(SortTarget?SortTarget = null, SortDirection?SortDirection = null)
        {
            if (SortTarget == Class.SortTarget.OriginPath || SortTarget == Class.SortTarget.Path)
            {
                throw new NotSupportedException("SortTarget.Path and SortTarget.OriginPath is not allow in this method");
            }

            if (SortTarget.HasValue)
            {
                this.SortTarget = SortTarget.Value;
                ApplicationData.Current.LocalSettings.Values["CollectionSortTarget"] = Enum.GetName(typeof(SortTarget), SortTarget);
            }

            if (SortDirection.HasValue)
            {
                this.SortDirection = SortDirection.Value;
                ApplicationData.Current.LocalSettings.Values["CollectionSortDirection"] = Enum.GetName(typeof(SortDirection), SortDirection);
            }

            SortIndicatorController.SetIndicatorStatus(this.SortTarget, this.SortDirection);
        }