Example #1
0
        private void textBox2_DragDrop(object sender, DragEventArgs e)
        {
            parChoose par = e.Data.GetData(e.Data.GetFormats()[0]) as parChoose;

            if (mousestop - mousestart >= 0)
            {
                textBox2.Text = textBox2.Text.Remove(selectionStartIndex, selectionLength).Insert(selectionStartIndex, par.Key);
            }
            else
            {
                textBox2.Text = textBox2.Text.Remove(selectionStartIndex + selectionLength, selectionLength * -1).Insert(selectionStartIndex + selectionLength, par.Key);
            }
        }
Example #2
0
 private void loadParsetList(string configName)
 {
     try
     {
         List <parset> pars = setXml.getPars(configName);
         flowLayoutPanel_parset.Controls.Clear();
         foreach (parset parset in pars)
         {
             parChoose parchoose = new parChoose();
             parchoose.setValue(parset);
             flowLayoutPanel_parset.Controls.Add(parchoose);
         }
     }
     catch (Exception eg) {
         MessageBox.Show("请检查配置设置" + eg.Message);
     }
 }