Beispiel #1
0
 /// <summary>
 /// Save all options. (Persist between sessions.)
 /// </summary>
 public void Save(ProvideSavedSettings settingsProvider)
 {
     if (settingsProvider == null)
     {
         throw new InvalidOperationException("P4Options.Save called without a settings provider.");
     }
     Save(OptionName.SettingIds.UseP4Config, UseP4Config.ToString(), settingsProvider);
     Save(OptionName.SettingIds.Server, Server, settingsProvider);
     Save(OptionName.SettingIds.User, User, settingsProvider);
     Save(OptionName.SettingIds.Password, Password, settingsProvider);
     Save(OptionName.SettingIds.Workspace, Workspace, settingsProvider);
     Save(OptionName.SettingIds.LogLevel, LogLevel.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsCheckoutEnabled, IsCheckoutEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsAddEnabled, IsAddEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsRevertIfUnchangedEnabled, IsRevertIfUnchangedEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsRevertEnabled, IsRevertEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.PromptBeforeRevert, PromptBeforeRevert.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsGetLatestRevisionEnabled, IsGetLatestRevisionEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsViewRevisionHistoryEnabled, IsViewRevisionHistoryEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsViewDiffEnabled, IsViewDiffEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IsViewTimeLapseEnabled, IsViewTimeLapseEnabled.ToString(), settingsProvider);
     Save(OptionName.SettingIds.AutoCheckoutOnEdit, AutoCheckoutOnEdit.ToString(), settingsProvider);
     Save(OptionName.SettingIds.AutoCheckoutOnSave, AutoCheckoutOnSave.ToString(), settingsProvider);
     Save(OptionName.SettingIds.AutoAdd, AutoAdd.ToString(), settingsProvider);
     Save(OptionName.SettingIds.AutoDelete, AutoDelete.ToString(), settingsProvider);
     Save(OptionName.SettingIds.IgnoreFilesNotUnderP4Root2, IgnoreFilesNotUnderP4Root.ToString(), settingsProvider);
     Save(OptionName.SettingIds.Version180OrAfter, "true", settingsProvider);
 }
Beispiel #2
0
 private void autoDelete_Toggled(object sender, RoutedEventArgs e)
 {
     if (checkInit)
     {
         ToggleSwitch toggleSwitch = sender as ToggleSwitch;
         if (toggleSwitch != null)
         {
             if (toggleSwitch.IsOn == true)
             {
                 AutoDelete.AutoDeleteStatus = true;
                 AutoDelete.DeleteOutDatedAllEvents();
                 AutoDelete.WriteAutoDeleteData();
                 if (Tile.tileStatus)
                 {
                     Tile.UpdateTile();
                 }
             }
             else
             {
                 AutoDelete.AutoDeleteStatus = false;
                 AutoDelete.WriteAutoDeleteData();
             }
         }
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Durable.GetHashCode();
         hashCode = (hashCode * 397) ^ Exclusive.GetHashCode();
         hashCode = (hashCode * 397) ^ AutoDelete.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)ExchangeType;
         hashCode = (hashCode * 397) ^ (CustomExchangeType != null ? CustomExchangeType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Durable.GetHashCode();
         hashCode = (hashCode * 397) ^ AutoDelete.GetHashCode();
         return(hashCode);
     }
 }
Beispiel #5
0
        private void ReadAllEventsInfo()
        {
            ReadBasicEventsData();
            ReadLifeEventsData();
            ReadBirthdayEventsData();
            ReadLoveEventsData();
            ReadFestivalEventsData();
            ReadEntertainmentEventsData();
            ReadStudyEventsData();
            ReadWorkEventsData();
            ReadOtherEventsData();

            if (AutoDelete.AutoDeleteStatus)
            {
                AutoDelete.DeleteOutDatedAllEvents();
                AutoDelete.DeleteOutDatedCoverEvents();
            }
        }