Esempio n. 1
0
 void cobValues_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cobValues.SelectedIndex != -1)
     {
         string s = cobValues.SelectedValue.ToString();
         EdtHelper.InsertChr(tbxCon, s.Trim(), 0);
     }
 }
Esempio n. 2
0
 private void cobNames_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cobNames.SelectedIndex != -1)
     {
         EdtHelper.InsertChr(tbxCon, "entity." + cobNames.Text.Trim(), 0);
         Feng.Windows.Utils.ControlDataLoad.InitDataControl(cobValues as INameValueMappingBindingControl, m_cobs[cobNames.Text]);
     }
     else
     {
         cobValues.Items.Clear();
     }
 }
Esempio n. 3
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (lstVew.SelectedItems.Count < 1)
            {
                return;
            }
            DialogResult rsp;
            string       msg = "确定删除该项?";

            rsp = MessageBox.Show(msg, "删除",
                                  MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (rsp == DialogResult.Yes)
            {
                EdtHelper.DeleteItem(lstVew);
            }
        }
Esempio n. 4
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(tbxCon.Text.Trim()))
     {
         if (index == -1)
         {
             EdtHelper.AddItems(lstVew, tbxCon, tbxRef);
         }
         else
         {
             EdtHelper.EditItem(lstVew, index, tbxCon.Text.Trim(), tbxRef.Text.Trim());
             index = -1;
         }
     }
     EdtHelper.TextBoxRefresh(tbxCon, tbxRef);
     tbxCon.Focus();
 }
Esempio n. 5
0
        protected void Btn_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            switch (btn.Text)
            {
            case "and":
                EdtHelper.InsertChr(tbxCon, " and ", 0);
                break;

            case "or":
                EdtHelper.InsertChr(tbxCon, " or ", 0);
                break;

            case "not":
                EdtHelper.InsertChr(tbxCon, " not ", 0);
                break;

            case "( )":
                EdtHelper.InsertChr(tbxCon, " ()", 1);
                break;

            case "' '":
                EdtHelper.InsertChr(tbxCon, " \'\'", 1);
                break;

            case "==":
                EdtHelper.InsertChr(tbxCon, " == ", 0);
                break;

            case ">":
                EdtHelper.InsertChr(tbxCon, " > ", 0);
                break;

            case "<":
                EdtHelper.InsertChr(tbxCon, " < ", 0);
                break;

            default:
                break;
            }
        }
Esempio n. 6
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     EdtHelper.SetHeader(lstVew);
 }
Esempio n. 7
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     EdtHelper.TextBoxRefresh(tbxCon, tbxRef);
     cobNames.SelectedIndex = -1;
 }
Esempio n. 8
0
 public IList <string> GetResult()
 {
     return(EdtHelper.GenResult(lstVew));
 }
Esempio n. 9
0
 private void btnAdd_Click_1(object sender, EventArgs e)
 {
     EdtHelper.TextBoxRefresh(tbxCon, tbxRef);
     tbxCon.Focus();
 }
Esempio n. 10
0
 private void btnMoveDown_Click(object sender, EventArgs e)
 {
     EdtHelper.MoveDown(lstVew);
     lstVew.Focus();
 }