Exemple #1
0
        /// <summary>
        /// Called when the tool's <see cref="Mode"/> changes.
        /// </summary>
        protected virtual void OnModeChanged()
        {
            switch (_mode)
            {
            case TextCalloutMode.TextCallout:
                this.TooltipPrefix        = SR.TooltipTextCallout;
                this._commandCreationName = SR.CommandCreateTextCallout;
                this._iconSet             = _textCalloutIconSet;
                this._interactiveGraphicBuilderDelegate = CreateInteractiveTextCalloutBuilder;
                this._graphicDelegateCreatorDelegate    = CreateTextCalloutGraphic;
                break;

            case TextCalloutMode.TextArea:
                this.TooltipPrefix        = SR.TooltipTextArea;
                this._commandCreationName = SR.CommandCreateTextArea;
                this._iconSet             = _textAreaIconSet;
                this._interactiveGraphicBuilderDelegate = CreateInteractiveTextAreaBuilder;
                this._graphicDelegateCreatorDelegate    = CreateTextAreaGraphic;
                break;
            }
            _settings.TextCalloutMode = _mode.ToString();
            EventsHelper.Fire(ModeChanged, this, new EventArgs());
        }
		/// <summary>
		/// Called when the tool's <see cref="Mode"/> changes.
		/// </summary>
		protected virtual void OnModeChanged()
		{
			switch (_mode)
			{
				case TextCalloutMode.TextCallout:
					this.TooltipPrefix = SR.TooltipTextCallout;
					this._commandCreationName = SR.CommandCreateTextCallout;
					this._iconSet = _textCalloutIconSet;
					this._interactiveGraphicBuilderDelegate = CreateInteractiveTextCalloutBuilder;
					this._graphicDelegateCreatorDelegate = CreateTextCalloutGraphic;
					break;
				case TextCalloutMode.TextArea:
					this.TooltipPrefix = SR.TooltipTextArea;
					this._commandCreationName = SR.CommandCreateTextArea;
					this._iconSet = _textAreaIconSet;
					this._interactiveGraphicBuilderDelegate = CreateInteractiveTextAreaBuilder;
					this._graphicDelegateCreatorDelegate = CreateTextAreaGraphic;
					break;
			}
			_settings.TextCalloutMode = _mode.ToString();
			EventsHelper.Fire(ModeChanged, this, new EventArgs());
		}