Esempio n. 1
0
        public void AddInlineString(InlineString inlineString, InlineStringsPresenter inlineStringsPresenter)
        {
            InlineStringEditor freeEditor = this._inlineStringEditorsPool.FirstOrDefault(e => e.InlineString == null);

            if (freeEditor == null)
            {
                this._inlineStringEditorsPool.Add(new InlineStringEditor(inlineString, inlineStringsPresenter));
            }
            else
            {
                freeEditor.InlineString = inlineString;
            }
        }
Esempio n. 2
0
        public InlineStringEditor(InlineString inlineString, InlineStringsPresenter inlineStringsPresenter)
        {
            if (inlineStringsPresenter == null)
            {
                throw new NullReferenceException(nameof(inlineStringsPresenter));
            }

            if (inlineString == null)
            {
                throw new NullReferenceException(nameof(inlineString));
            }

            this._inlineStringsPresenter = inlineStringsPresenter;
            this._inlineString           = inlineString;

            this._newInlineStringAlias   = inlineString.Id;
            this._newInlineStringStrings = inlineString.Strings.ToArray();
        }