Пример #1
0
 private void olvTableResults_CellEditFinishing(object sender, BrightIdeasSoftware.CellEditEventArgs e)
 {
     if (e.Column.IsEditable)
     {
         if (!e.Cancel)
         {
             TableResultMap tableResultMap = (TableResultMap)e.RowObject;
             if (e.Column == olvColumnTableResultColumnName)
             {
                 tableResultMap.ColumnName = e.NewValue.ToString();
             }
             if (e.Column == olvColumnTableResultStateVariable)
             {
                 tableResultMap.StateVariable = e.GetEditControl <ComboBox>().Text;
             }
             if (e.Column == olvColumnTableResultXMLOutputMode)
             {
                 tableResultMap.XMLFieldOutputMode = (XMLFieldOutputMode)e.GetEditControl <ComboBox>().SelectedItem;
             }
             if (e.Column == olvColumnTableResultPersistenceMode)
             {
                 tableResultMap.PersistenceMode = e.GetEditControl <CheckBox>().Checked ? PersistenceMode.Persisted : PersistenceMode.None;
             }
             zRefreshTableResult(tableResultMap);
             e.Cancel = true;
         }
         else if (m_AddTableResultMode)
         {
             m_TableResultMapping.RemoveAt(e.ListViewItem.Index);
             zRefreshTableResults();
         }
         m_AddTableResultMode = false;
     }
 }
Пример #2
0
 private void olvInputParameters_CellEditFinishing(object sender, BrightIdeasSoftware.CellEditEventArgs e)
 {
     if (e.Column.IsEditable)
     {
         if (!e.Cancel)
         {
             InputParameterMap parameterMap = (InputParameterMap)e.RowObject;
             if (e.Column == olvColumnInputParameterName)
             {
                 parameterMap.ParameterName = e.NewValue.ToString();
             }
             if (e.Column == olvColumnInputParameterValue)
             {
                 OLVOutputValueEditor olvOutputValueEditor = e.GetEditControl <OLVOutputValueEditor>();
                 parameterMap.ParameterValue = olvOutputValueEditor.Value;
                 parameterMap.TrimVariableValueWhitespace = olvOutputValueEditor.TrimVariableValueWhitespace;
             }
             if (e.Column == olvColumnInputParameterTrim)
             {
                 parameterMap.TrimVariableValueWhitespace = (bool)e.NewValue;
             }
             zRefreshInputParameter(parameterMap);
             e.Cancel = true;
         }
         else if (m_AddParameterMode)
         {
             m_InputParameterMapping.RemoveAt(e.ListViewItem.Index);
             zRefreshInputParameters();
         }
         m_AddParameterMode = false;
     }
 }
Пример #3
0
 private void olvOutputParameters_CellEditFinishing(object sender, BrightIdeasSoftware.CellEditEventArgs e)
 {
     if (e.Column.IsEditable)
     {
         if (!e.Cancel)
         {
             OutputParameterMap parameterMap = (OutputParameterMap)e.RowObject;
             if (e.Column == olvColumnOutputParameterType)
             {
                 parameterMap.ParameterType = (OutputParameterType)e.GetEditControl <ComboBox>().SelectedItem;
                 if (parameterMap.ParameterType == OutputParameterType.Return)
                 {
                     parameterMap.ParameterName = null;
                 }
             }
             if (e.Column == olvColumnOutputParameterName)
             {
                 parameterMap.ParameterName = e.NewValue.ToString();
             }
             if (e.Column == olvColumnOutputParameterStateVariable)
             {
                 parameterMap.StateVariable = e.GetEditControl <ComboBox>().Text;
             }
             if (e.Column == olvColumnOutputParameterXMLOutputMode)
             {
                 parameterMap.XMLFieldOutputMode = (XMLFieldOutputMode)e.GetEditControl <ComboBox>().SelectedItem;
             }
             if (e.Column == olvColumnOutputParameterPersistenceMode)
             {
                 parameterMap.PersistenceMode = e.GetEditControl <CheckBox>().Checked ? PersistenceMode.Persisted : PersistenceMode.None;
             }
             zRefreshOutputParameter(parameterMap);
             e.Cancel = true;
         }
         else if (m_AddParameterMode)
         {
             m_OutputParameterMapping.RemoveAt(e.ListViewItem.Index);
             zRefreshOutputParameters();
         }
         m_AddParameterMode = false;
     }
 }