示例#1
0
        private void ICAppendStringBtn_Click(object sender, EventArgs e)
        {
            string value = ICValueTxt.Text;
            int    count = (int)ICCountTxt.Value;

            ICTanjiConstructer.BeginUpdate();
            for (int i = 0; i < count; i++)
            {
                ICTanjiConstructer.AppendChunk(value);
            }
            ICTanjiConstructer.EndUpdate();
        }
示例#2
0
        private void ICAppendBooleanBtn_Click(object sender, EventArgs e)
        {
            int  count = (int)ICCountTxt.Value;
            bool value = (!string.IsNullOrEmpty(ICValueTxt.Text) && (ICValueTxt.Text[0] == 't' || ICValueTxt.Text[0] == '1'));

            ICTanjiConstructer.BeginUpdate();
            for (int i = 0; i < count; i++)
            {
                ICTanjiConstructer.AppendChunk(value);
            }
            ICTanjiConstructer.EndUpdate();
        }
示例#3
0
        private void ICAppendIntegerBtn_Click(object sender, EventArgs e)
        {
            int value;
            int count = (int)ICCountTxt.Value;

            if (int.TryParse(ICValueTxt.Text, out value) || string.IsNullOrWhiteSpace(ICValueTxt.Text))
            {
                ICTanjiConstructer.BeginUpdate();
                for (int i = 0; i < count; i++)
                {
                    ICTanjiConstructer.AppendChunk(value);
                }
                ICTanjiConstructer.EndUpdate();
            }
            else
            {
                MessageBox.Show(NotInt32, TanjiError, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }