Exemplo n.º 1
0
		void MaskEdit_BeforeTextChanged (object sender, Android.Text.TextChangedEventArgs e)
		{
			if (this.Locked || this._FirstLoad == false || this.Properties == null)
				return;			

			var start = this.SelectionStart;
			var end = this.SelectionEnd;
			var holder = new TextHolder (e.Text.ToString (), this.SelectionStart, this.SelectionEnd);
			holder.RemovedBlockCount = end - start;
			if (holder.RemovedBlockCount > 0 && this.Delete == false)
			{
				// text block selected. needs to be removed before update
				holder.RemovedBlock = holder.Text.Substring(SelectionEnd);
			}
			// old text
			this.Tag = holder;
		}
Exemplo n.º 2
0
        void MaskEdit_BeforeTextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            if (this.Locked || this._FirstLoad == false || this.Properties == null)
            {
                return;
            }

            var start  = this.SelectionStart;
            var end    = this.SelectionEnd;
            var holder = new TextHolder(e.Text.ToString(), this.SelectionStart, this.SelectionEnd);

            holder.RemovedBlockCount = end - start;
            if (holder.RemovedBlockCount > 0 && this.Delete == false)
            {
                // text block selected. needs to be removed before update
                holder.RemovedBlock = holder.Text.Substring(SelectionEnd);
            }
            // old text
            this.Tag = holder;
        }