public ConditionEvent conditionEventTransmissionFormat()
        {
            ConditionEvent ce = new ConditionEvent();

            ce.statement = ConvertToPostFix(this.statement);
            ce.type      = this.type;
            ce.gName     = this.gName;
            ce.GUIOType  = this.GUIOType;
            ce.property  = this.property;
            ce.value     = this.value;
            return(ce);
        }
Exemple #2
0
 private void buttonConfirm_Click(object sender, EventArgs e)
 {
     if (textBoxState.Text != "")
     {
         ConditionEvent ce = new ConditionEvent();
         ce.statement = textBoxState.Text;
         if (radioButtonChangeValue.Checked)
         {
             ce.type = "ChangeValue";
             if (comboBoxCVGVarName.SelectedItem != null)
             {
                 ce.gName = comboBoxCVGVarName.SelectedItem.ToString();
                 if (textBoxCVValue.Text != "")
                 {
                     ce.value    = textBoxCVValue.Text;
                     confirmFlag = true;
                 }
             }
         }
         else if (radioButtonIncreaseValue.Checked)
         {
             ce.type = "IncreaseValue";
             if (comboBoxIVGVarName.SelectedItem != null)
             {
                 ce.gName = comboBoxIVGVarName.SelectedItem.ToString();
                 if (textBoxIVValue.Text != "")
                 {
                     ce.value    = textBoxIVValue.Text;
                     confirmFlag = true;
                 }
             }
         }
         else if (radioButtonDecreaseValue.Checked)
         {
             ce.type = "DecreaseValue";
             if (comboBoxDVGVarName.SelectedItem != null)
             {
                 ce.gName = comboBoxDVGVarName.SelectedItem.ToString();
                 if (textBoxDVValue.Text != "")
                 {
                     ce.value    = textBoxDVValue.Text;
                     confirmFlag = true;
                 }
             }
         }
         else if (radioButtonChangeProperty.Checked)
         {
             ce.type = "ChangeProperty";
             if (comboBoxProperty.SelectedItem != null)
             {
                 foreach (HMIEditorPane pane in StaticMethods.hmIEditorPaneList)
                 {
                     foreach (GUIO guio in pane.GUIOList)
                     {
                         if (guio.name == comboBoxGUIOName.SelectedItem.ToString())
                         {
                             ce.GUIOType = guio.type;
                         }
                     }
                 }
                 ce.gName    = comboBoxGUIOName.SelectedItem.ToString();
                 ce.property = comboBoxProperty.SelectedItem.ToString();
                 if (textBoxCPValue.Text != "")
                 {
                     ce.value    = textBoxCPValue.Text;
                     confirmFlag = true;
                 }
             }
         }
         else if (radioButtonChangePage.Checked)
         {
             ce.type = "ChangePage";
             if (comboBoxPageName.SelectedItem != null)
             {
                 ce.gName    = comboBoxPageName.SelectedItem.ToString();
                 confirmFlag = true;
             }
         }
         if (confirmFlag)
         {
             StaticMethods.condtionEventList.Add(ce);
             this.Close();
         }
     }
     MessageBox.Show("유효한 값을 입력해주세요");
 }