public override void Stop() { _settings.LoginNameMarkupColors = _loginNameMarkupColorsOriginalSettings; _settings.DefaultMarkupColor = _defaultMarkupColor; _settings.UseRandomDefaultMarkupColor = _useRandomDefaultMarkupColor; UpdateDisplayedImages(null); _settings = null; base.Stop(); }
/// <summary> /// Called by the host when the application component is being terminated. /// </summary> public override void Stop() { _settings.LoginNameMarkupColors = _loginNameMarkupColorsOriginalSettings; // this should reset dictionary to the last saved values _settings.DefaultMarkupColor = _defaultMarkupColor; _settings.UseRandomDefaultMarkupColor = _useRandomDefaultMarkupColor; UpdateDisplayedImages(null); _settings = null; base.Stop(); }
public override void Start() { base.Start(); _settings = AimSettings.Default; _sendNewXmlAnnotationsToGrid = _settings.SendNewXmlAnnotationsToGrid; _storeXmlAnnotationsLocally = _settings.StoreXmlAnnotationsLocally; _storeXmlInMyDocuments = _settings.StoreXmlInMyDocuments; _localAnnotationStoreFolder = _settings.LocalAnnotationsFolder; _requireUserInfo = _settings.RequireUserInfo; _requireMarkupInAnnotation = _settings.RequireMarkupInAnnotation; }
public override void Start() { base.Start(); _settings = AimSettings.Default; _defaultMarkupColor = _settings.DefaultMarkupColor; _loginNameMarkupColorsOriginalSettings = new XmlSerializableStringToColorDictionary(_settings.LoginNameMarkupColors); _useRandomDefaultMarkupColor = _settings.UseRandomDefaultMarkupColor; InitUserMarkupProperties(); _userMarkupPropertiesDictionary.ItemAdded += OnUserMarkupPropertiesChanged; _userMarkupPropertiesDictionary.ItemChanged += OnUserMarkupPropertiesChanged; _userMarkupPropertiesDictionary.ItemRemoved += OnUserMarkupPropertiesChanged; _settings.LoginNameMarkupColors = GetNewUserColorSettings(); }
public override void Start() { base.Start(); _settings = AimSettings.Default; _sendNewXmlAnnotationsToGrid = _settings.SendNewXmlAnnotationsToGrid; _storeXmlAnnotationsLocally = _settings.StoreXmlAnnotationsLocally; _storeXmlInMyDocuments = _settings.StoreXmlInMyDocuments; _localAnnotationStoreFolder = _settings.LocalAnnotationsFolder; _requireUserInfo = _settings.RequireUserInfo; _requireMarkupInAnnotation = _settings.RequireMarkupInAnnotation; _resetTemplateAfterAnnotationCreation = _settings.ResetTemplateAfterAnnotationCreation; _useCrosshairsInsteadOfArrowsForTextCallouts = _settings.UseCrosshairsForTextCallouts; _localTemplateStoreFolder = _settings.LocalTemplatesFolder; _alwaysPromptOnRestoringTemplateData = _settings.AlwaysPromptOnRestoringTemplateData; }
public override void Start() { base.Start(); // Preserve original values _settings = AimSettings.Default; _defaultMarkupColor = _settings.DefaultMarkupColor; _loginNameMarkupColorsOriginalSettings = new XmlSerializableStringToColorDictionary(_settings.LoginNameMarkupColors); _useRandomDefaultMarkupColor = _settings.UseRandomDefaultMarkupColor; InitUserMarkupProperties(); _userMarkupPropertiesDictionary.ItemAdded += OnUserMarkupPropertiesChanged; _userMarkupPropertiesDictionary.ItemChanged += OnUserMarkupPropertiesChanged; _userMarkupPropertiesDictionary.ItemRemoved += OnUserMarkupPropertiesChanged; // Update color values to include default colors for displayed images _settings.LoginNameMarkupColors = GetNewUserColorSettings(); }
public Color GetLoginNameMarkupColor(string loginName) { var markupColor = _settings.DefaultMarkupColor; loginName = (loginName ?? "").Trim().ToLower(); if (_userMarkupPropertiesDictionary.ContainsKey(loginName)) { markupColor = _userMarkupPropertiesDictionary[loginName].Color; } else { if (_settings.UseRandomDefaultMarkupColor) { markupColor = AimSettings.CreateColorFromStringHash(loginName); } } return(markupColor); }
/// <summary> /// Called by the host when the application component is being terminated. /// </summary> public override void Stop() { _settings = null; base.Stop(); }