<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

using KSP;
using UnityEngine;
using KSPPluginFramework;

namespace KSPAlternateResourcePanel
{
    internal class Settings : ConfigNodeStorage
    {
        internal Settings(String FilePath) : base(FilePath) {
            Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            //on each start set the attention flag to the property - should be on each program start
            VersionAttentionFlag = VersionAvailable;

            OnEncodeToConfigNode();
        }

        [Persistent]
        internal Vector3 vectButtonPos = new Vector3(Screen.width - 405, 0,0 );

        //[Persistent]
        internal Boolean ToggleOn = false;
        [Persistent] internal Boolean DisableHover = false;
        [Persistent] internal Boolean LockLocation= true;
        internal Rect WindowPosition = new Rect(Screen.width - 298, 40, 299, 20);
        [Persistent] private RectStorage WindowPositionStored = new RectStorage();
        [Persistent] internal Boolean WindowPosUpdatedv24=false;
        [Persistent] internal Boolean ButtonPosUpdatedv24=false;

        [Persistent] internal Int32 SpacerPadding = 0;
        [Persistent] internal Boolean HideEmptyResources = false;
        [Persistent] internal Boolean HideFullResources = false;
        [Persistent] internal Int32 HideAfter = 2;

        [Persistent] internal Boolean ShowRates = true;
        [Persistent] internal Boolean ShowRatesForParts = true;
        [Persistent] internal RateDisplayEnum RateDisplayType = RateDisplayEnum.Default;
        /// <summary><commit_msg>Fixed persistence of Toggle State (Fixes #43)<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

using KSP;
using UnityEngine;
using KSPPluginFramework;

namespace KSPAlternateResourcePanel
{
    internal class Settings : ConfigNodeStorage
    {
        internal Settings(String FilePath) : base(FilePath) {
            Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            //on each start set the attention flag to the property - should be on each program start
            VersionAttentionFlag = VersionAvailable;

            OnEncodeToConfigNode();
        }

        [Persistent]
        internal Vector3 vectButtonPos = new Vector3(Screen.width - 405, 0,0 );

        [Persistent] internal Boolean ToggleOn = false;
        [Persistent] internal Boolean DisableHover = false;
        [Persistent] internal Boolean LockLocation= true;
        internal Rect WindowPosition = new Rect(Screen.width - 298, 40, 299, 20);
        [Persistent] private RectStorage WindowPositionStored = new RectStorage();
        [Persistent] internal Boolean WindowPosUpdatedv24=false;
        [Persistent] internal Boolean ButtonPosUpdatedv24=false;

        [Persistent] internal Int32 SpacerPadding = 0;
        [Persistent] internal Boolean HideEmptyResources = false;
        [Persistent] internal Boolean HideFullResources = false;
        [Persistent] internal Int32 HideAfter = 2;

        [Persistent] internal Boolean ShowRates = true;
        [Persistent] internal Boolean ShowRatesForParts = true;
        [Persistent] internal RateDisplayEnum RateDisplayType = RateDisplayEnum.Default;
        /// <summary>
{'fraction_non_alphanumeric': 0.07593856655290103, 'fraction_numerical': 0.015927189988623434, 'mean_word_length': 3.368944099378882, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2743787', 'n_tokens_mistral': 922, 'n_tokens_neox': 864, 'n_words': 267}