Exemple #1
0
        /// <summary>
        /// </summary>
        private void OnSyncFrequencyChanged()
        {
            if (SyncProfile != null && SyncProfile.SyncSettings.SyncFrequency != null &&
                SyncFrequency == SyncProfile.SyncSettings.SyncFrequency.Name)
            {
                switch (SyncFrequency)
                {
                case "Interval":
                    SyncFrequencyViewModel
                        = new IntervalSyncViewModel(SyncProfile.SyncSettings.SyncFrequency as IntervalSyncFrequency);
                    break;

                case "Daily":
                    SyncFrequencyViewModel
                        = new DailySyncViewModel(SyncProfile.SyncSettings.SyncFrequency as DailySyncFrequency);
                    break;

                case "Weekly":
                    SyncFrequencyViewModel
                        = new WeeklySyncViewModel(SyncProfile.SyncSettings.SyncFrequency as WeeklySyncFrequency);
                    break;
                }
            }
            else
            {
                switch (SyncFrequency)
                {
                case "Interval":
                    SyncFrequencyViewModel = new IntervalSyncViewModel();
                    break;

                case "Daily":
                    SyncFrequencyViewModel = new DailySyncViewModel();
                    break;

                case "Weekly":
                    SyncFrequencyViewModel = new WeeklySyncViewModel();
                    break;
                }
            }
        }
 /// <summary>
 /// </summary>
 private void OnSyncFrequencyChanged()
 {
     if (SyncProfile != null && SyncProfile.SyncSettings.SyncFrequency != null &&
         SyncFrequency == SyncProfile.SyncSettings.SyncFrequency.Name)
     {
         switch (SyncFrequency)
         {
             case "Interval":
                 SyncFrequencyViewModel
                     = new IntervalSyncViewModel(SyncProfile.SyncSettings.SyncFrequency as IntervalSyncFrequency);
                 break;
             case "Daily":
                 SyncFrequencyViewModel
                     = new DailySyncViewModel(SyncProfile.SyncSettings.SyncFrequency as DailySyncFrequency);
                 break;
             case "Weekly":
                 SyncFrequencyViewModel
                     = new WeeklySyncViewModel(SyncProfile.SyncSettings.SyncFrequency as WeeklySyncFrequency);
                 break;
         }
     }
     else
     {
         switch (SyncFrequency)
         {
             case "Interval":
                 SyncFrequencyViewModel = new IntervalSyncViewModel();
                 break;
             case "Daily":
                 SyncFrequencyViewModel = new DailySyncViewModel();
                 break;
             case "Weekly":
                 SyncFrequencyViewModel = new WeeklySyncViewModel();
                 break;
         }
     }
 }