produproperty.ViewModel.viewModel.Tianjia C# (CSharp) Method

Tianjia() public method

public Tianjia ( string str ) : void
str string
return void
        public void Tianjia(string str)
        {
            int n;
            n = Select;
            int i;
            for (i = 0; (n > 0) && (i < Text.Length); i++)
            {
                if (Text[i] != '\r') //&& text[i] != '\n')
                {
                    n--;
                }
            }
            Text = Text.Insert(i, str);
            str = str.Replace("\r", "");
            n = Select + str.Length;
            if (n > Text.Length)
            {
                n = Text.Length;
            }
            Selectchange(n, 0);

            //string t = text.Replace("\r\n", "\n");
            //t = t.Insert(select, str);
            //text = t.Replace("\n", "\r\n");
        }