public static void CloneValues(this GUISettings sets, GUISettings other) {
		sets.doubleClickSelectsWord = other.doubleClickSelectsWord;
		sets.tripleClickSelectsLine = other.tripleClickSelectsLine;
		sets.cursorColor = other.cursorColor;
		sets.cursorFlashSpeed = other.cursorFlashSpeed;
		sets.selectionColor = other.selectionColor;
	}
Exemple #2
0
        // This method must be called in lock(this) scope.
        private Starter CreateStarter(bool resuming)
        {
            Starter starter = null;

            // prepare arguments
            GUISettings guiSettings = this.Settings.GUI;
            int         tryCount    = guiSettings.ResumeTryCount;
            int         delay       = guiSettings.ResumeDelay;

            if (resuming == false)
            {
                if (tryCount == 0)
                {
                    // try at least one time
                    tryCount = 1;
                }
                // delay is needed only for resuming
                delay = 0;
            }

            // create a starter if necessary
            if (0 < tryCount)
            {
                starter = new Starter(this, resuming, tryCount, delay, guiSettings.ResumeInterval);
            }

            return(starter);
        }
Exemple #3
0
 public static void Assign(this GUISettings settings, GUISettings src)
 {
     settings.cursorFlashSpeed       = src.cursorFlashSpeed;
     settings.cursorColor            = src.cursorColor;
     settings.doubleClickSelectsWord = src.doubleClickSelectsWord;
     settings.selectionColor         = src.selectionColor;
     settings.tripleClickSelectsLine = src.tripleClickSelectsLine;
 }
	public static GUISettings Clone(this GUISettings sets) {
		GUISettings clone = new GUISettings();
		clone.doubleClickSelectsWord = sets.doubleClickSelectsWord;
		clone.tripleClickSelectsLine = sets.tripleClickSelectsLine;
		clone.cursorColor = sets.cursorColor;
		clone.cursorFlashSpeed = sets.cursorFlashSpeed;
		clone.selectionColor = sets.selectionColor;
		return clone;
	}
        public AppSettings()
        {
            Location = FileLocations.ForAllUsers;

            AppGUISettings = new GUISettings();
            AppRSSSetings  = new RSSSettings(Location);


            AppOutlookSettings = new OutlookSettings(false, false);
            AppOutlookSettings.IntervalMinutes = 2;
        }
Exemple #6
0
        public static bool CompareTo(this GUISettings self, GUISettings otherSettings, List <string> diffs = null)
        {
            if (!CompareTo(self.cursorColor, otherSettings.cursorColor))
            {
                if (diffs == null)
                {
                    return(false);
                }
                diffs.Add("settings[cursorColor]");
            }

            if (!CompareTo(self.selectionColor, otherSettings.selectionColor))
            {
                if (diffs == null)
                {
                    return(false);
                }
                diffs.Add("settings[selectionColor]");
            }

            if (!CompareTo(self.cursorFlashSpeed, otherSettings.cursorFlashSpeed))
            {
                if (diffs == null)
                {
                    return(false);
                }
                diffs.Add("settings[cursorFlashSpeed]");
            }

            if (self.doubleClickSelectsWord != otherSettings.doubleClickSelectsWord)
            {
                if (diffs == null)
                {
                    return(false);
                }
                diffs.Add("settings[doubleClickSelectsWord]");
            }

            if (self.tripleClickSelectsLine != otherSettings.tripleClickSelectsLine)
            {
                if (diffs == null)
                {
                    return(false);
                }
                diffs.Add("settings[tripleClickSelectsLine]");
            }

            return(diffs == null || diffs.Count == 0);
        }
Exemple #7
0
        public static void AddSettings(StyleSheetBuilderHelper helper, GUISettings settings)
        {
            // Settings
            helper.BeginRule("GUISkin.settings - GUISettings");
            using (helper.builder.BeginComplexSelector(0))
            {
                helper.builder.AddSimpleSelector(new[] { StyleSelectorPart.CreateClass(ConverterUtils.k_GUISettingsSelector.Replace(".", "")) }, StyleSelectorRelationship.None);
            }

            helper.AddProperty(ConverterUtils.k_SelectionColor, settings.selectionColor, "GUISettings.selectionColor");
            helper.AddProperty(ConverterUtils.k_CursorColor, settings.cursorColor, "GUISettings.cursorColor");
            helper.AddProperty(ConverterUtils.k_CursorFlashSpeed, settings.cursorFlashSpeed, "GUISettings.cursorFlashSpeed");
            helper.AddProperty(ConverterUtils.k_DoubleClickSelectsWord, settings.doubleClickSelectsWord, "GUISettings.doubleClickSelectsWord");
            helper.AddProperty(ConverterUtils.k_TripleClickSelectsLine, settings.tripleClickSelectsLine, "GUISettings.tripleClickSelectsLine");

            helper.EndRule();
        }
Exemple #8
0
 static void CopyGUISkin(GUISkin src, out GUISkin dst)
 {
     dst = (GUISkin)ScriptableObject.CreateInstance(typeof(GUISkin));
     foreach (PropertyInfo propertyInfo in typeof(GUISkin).GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance))
     {
         if (propertyInfo.PropertyType == typeof(GUISettings))
         {
             GUISettings settings = (GUISettings)propertyInfo.GetValue(src, null);
             dst.settings.cursorColor            = settings.cursorColor;
             dst.settings.cursorFlashSpeed       = settings.cursorFlashSpeed;
             dst.settings.doubleClickSelectsWord = settings.doubleClickSelectsWord;
             dst.settings.selectionColor         = settings.selectionColor;
             dst.settings.tripleClickSelectsLine = settings.tripleClickSelectsLine;
         }
         else
         {
             propertyInfo.SetValue(dst, propertyInfo.GetValue(src, null), null);
         }
     }
 }
Exemple #9
0
 private void SetItemsStype(GUISettings gUISettings)
 {
 }