コード例 #1
0
 public override void Stop()
 {
     _settings.LoginNameMarkupColors       = _loginNameMarkupColorsOriginalSettings;
     _settings.DefaultMarkupColor          = _defaultMarkupColor;
     _settings.UseRandomDefaultMarkupColor = _useRandomDefaultMarkupColor;
     UpdateDisplayedImages(null);
     _settings = null;
     base.Stop();
 }
コード例 #2
0
 /// <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();
 }
コード例 #3
0
        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;
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        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;
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        /// <summary>
        /// Called by the host when the application component is being terminated.
        /// </summary>
        public override void Stop()
        {
            _settings = null;

            base.Stop();
        }