Example #1
0
 private void txtDtv_TextChanged(object sender, EventArgs e)
 {
     if (programGeneratedEvent > 0)
     {
         return;
     }
     programGeneratedEvent++;
     try
     {
         Reach dtv = txtDtv.Text;
         txtOptor.Text = dtv.before(1, " = ");
         writeToTable(txtOptor.Text, dtv.after(1, " = "));
         trm = new Trm(txtOptor.Text, txtOpnd1.Text, txtOpnd2.Text, txtOpnd3.Text, txtOpnd4.Text); //trm = new Trm(":dbg:" + txtOptor.Text, txtOpnd1.Text, txtOpnd2.Text, txtOpnd3.Text, txtOpnd4.Text);
         trm.Dtv.Set(txtOptor.Text, dtv.after(1, " = ").text);                                     //trm.Dtv.Set(":dbg:" + txtOptor.Text, dtv.after(1, " = ").text);
         try { txtVal4.Text = trm.val(); }
         catch { }
         txtOptr.Text          = trm.optr;
         txtDtv0.Text          = trm.dtv0;
         txtDtv1lR.Text        = trm.dtv1lR;
         txtDtv1mR.Text        = trm.dtv1mR;
         txtDtv1rR.Text        = trm.dtv1rR;
         txtDtv1lS.Text        = trm.dtv1lS;
         txtDtv1mS.Text        = trm.dtv1mS;
         txtDtv1rS.Text        = trm.dtv1rS;
         txtDtv2.Text          = trm.dtv2;
         chkRight2Left.Checked = !trm.left2right;
         chkRevert.Checked     = trm.revert;
         try
         {
             trm = new Trm(txtOptor.Text, txtOpnd1.Text, txtOpnd2.Text, txtOpnd3.Text);
             trm.Dtv.Set(txtOptor.Text, dtv.after(1, " = ").text); //trm.Dtv.Set(":dbg:" + txtOptor.Text, dtv.after(1, " = ").text);
             txtVal3.Text = trm.val();                             //txtVal3.Text = new Trm(":dbg:" + txtOptor.Text, txtOpnd1.Text, txtOpnd2.Text, txtOpnd3.Text).val();
             trm          = new Trm(txtOptor.Text, new object[] { txtOpnd1.Text, txtOpnd2.Text });
             trm.Dtv.Set(txtOptor.Text, dtv.after(1, " = ").text); //trm.Dtv.Set(":dbg:" + txtOptor.Text, dtv.after(1, " = ").text);
             txtVal2.Text = trm.val();                             //txtVal2.Text = new Trm(":dbg:" + txtOptor.Text, new object[] { txtOpnd1.Text, txtOpnd2.Text }).val();
             trm          = new Trm(txtOptor.Text, txtOpnd1.Text);
             trm.Dtv.Set(txtOptor.Text, dtv.after(1, " = ").text); //trm.Dtv.Set(":dbg:" + txtOptor.Text, dtv.after(1, " = ").text);
             txtVal1.Text = trm.val();                             //txtVal1.Text = new Trm(":dbg:" + txtOptor.Text, txtOpnd1.Text).val();
         }
         catch { }
     }
     finally { programGeneratedEvent--; }
 }
Example #2
0
 private void btnParseTrm_Click(object sender, EventArgs e)
 {
     try { trm = new Trm(txtNewTrm.Text); trm.Dtv.Set(txtOptor.Text, new Reach(txtDtv.Text).after(1, " = ").text); txtTrmVal.Text = trm.val(); } catch (Exception ex) { txtTrmVal.Text = "Parese Error: " + ex.Message; }
 }