Beispiel #1
0
        //private void LoadSpecialStops()
        //{
        //    var fwtc = new TransitStop() { ID = "FWTC", Position = new LatLon(47.31753, -122.30486), Path = "_vx_HlnniVF??LJ??MF??nIG??MK??LG?", Name = "Federal Way Transit Center", Children = new[] { "1_80439", "1_80431", "1_80438", "1_80432", "1_80437", "1_80433", "3_27814", "3_29410" } };
        //    Cache.Add(fwtc);
        //}

        private void SetMutallyExclusiveProperties(ManuallyDownloadArrivalsMode mode, bool value)
        {
            NonUISetProperties = true;
            try
            {
                if (value)
                {
                    switch (mode)
                    {
                    case ManuallyDownloadArrivalsMode.Always:
                        AutoDownloadArrivals           = false;
                        ManuallyDownloadArrivalsGroups = false;
                        ManuallyDownloadArrivalsAll    = true;
                        break;

                    case ManuallyDownloadArrivalsMode.Never:
                        AutoDownloadArrivals           = true;
                        ManuallyDownloadArrivalsGroups = false;
                        ManuallyDownloadArrivalsAll    = false;
                        break;

                    case ManuallyDownloadArrivalsMode.GroupsOnly:
                        AutoDownloadArrivals           = false;
                        ManuallyDownloadArrivalsGroups = true;
                        ManuallyDownloadArrivalsAll    = false;
                        break;
                    }
                }
                else
                {
                    switch (mode)
                    {
                    case ManuallyDownloadArrivalsMode.Always:
                        AutoDownloadArrivals           = false;
                        ManuallyDownloadArrivalsGroups = true;
                        ManuallyDownloadArrivalsAll    = false;
                        break;

                    case ManuallyDownloadArrivalsMode.Never:
                        AutoDownloadArrivals           = false;
                        ManuallyDownloadArrivalsGroups = true;
                        ManuallyDownloadArrivalsAll    = false;
                        break;

                    case ManuallyDownloadArrivalsMode.GroupsOnly:
                        AutoDownloadArrivals           = true;
                        ManuallyDownloadArrivalsGroups = false;
                        ManuallyDownloadArrivalsAll    = false;
                        break;
                    }
                }
            }
            finally
            {
                NonUISetProperties = false;
            }
        }
        //private void LoadSpecialStops()
        //{
        //    var fwtc = new TransitStop() { ID = "FWTC", Position = new LatLon(47.31753, -122.30486), Path = "_vx_HlnniVF??LJ??MF??nIG??MK??LG?", Name = "Federal Way Transit Center", Children = new[] { "1_80439", "1_80431", "1_80438", "1_80432", "1_80437", "1_80433", "3_27814", "3_29410" } };
        //    Cache.Add(fwtc);
        //}

        private void SetMutallyExclusiveProperties(ManuallyDownloadArrivalsMode mode, bool value)
        {
            NonUISetProperties = true;
            try
            {
                if (value)
                {
                    switch (mode)
                    {
                        case ManuallyDownloadArrivalsMode.Always:
                            AutoDownloadArrivals = false;
                            ManuallyDownloadArrivalsGroups = false;
                            ManuallyDownloadArrivalsAll = true;
                            break;
                        case ManuallyDownloadArrivalsMode.Never:
                            AutoDownloadArrivals = true;
                            ManuallyDownloadArrivalsGroups = false;
                            ManuallyDownloadArrivalsAll = false;
                            break;
                        case ManuallyDownloadArrivalsMode.GroupsOnly:
                            AutoDownloadArrivals = false;
                            ManuallyDownloadArrivalsGroups = true;
                            ManuallyDownloadArrivalsAll = false;
                            break;
                    }
                }
                else
                {
                    switch (mode)
                    {
                        case ManuallyDownloadArrivalsMode.Always:
                            AutoDownloadArrivals = false;
                            ManuallyDownloadArrivalsGroups = true;
                            ManuallyDownloadArrivalsAll = false;
                            break;
                        case ManuallyDownloadArrivalsMode.Never:
                            AutoDownloadArrivals = false;
                            ManuallyDownloadArrivalsGroups = true;
                            ManuallyDownloadArrivalsAll = false;
                            break;
                        case ManuallyDownloadArrivalsMode.GroupsOnly:
                            AutoDownloadArrivals = true;
                            ManuallyDownloadArrivalsGroups = false;
                            ManuallyDownloadArrivalsAll = false;
                            break;
                    }
                }
            }
            finally
            {
                NonUISetProperties = false;
            }
        }