Example #1
0
 void cobValues_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cobValues.SelectedIndex != -1)
     {
         string s = cobValues.SelectedValue.ToString();
         EdtHelper.InsertChr(tbxCon, s.Trim(), 0);
     }
 }
Example #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();
     }
 }
Example #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);
            }
        }
Example #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();
 }
Example #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;
            }
        }
Example #6
0
 private void Form1_Shown(object sender, EventArgs e)
 {
     EdtHelper.SetHeader(lstVew);
 }
Example #7
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     EdtHelper.TextBoxRefresh(tbxCon, tbxRef);
     cobNames.SelectedIndex = -1;
 }
Example #8
0
 public IList <string> GetResult()
 {
     return(EdtHelper.GenResult(lstVew));
 }
Example #9
0
 private void btnAdd_Click_1(object sender, EventArgs e)
 {
     EdtHelper.TextBoxRefresh(tbxCon, tbxRef);
     tbxCon.Focus();
 }
Example #10
0
 private void btnMoveDown_Click(object sender, EventArgs e)
 {
     EdtHelper.MoveDown(lstVew);
     lstVew.Focus();
 }