private DPE_ServerDefs.PublicationVariableDataType GetSelectedPublicationVariableDataType(string listElement) { string element = listElement; string[] keys = element.Split(new char[] { ',' }); string VariableName = keys[0]; string varTypeStr = keys[1]; varTypeStr = varTypeStr.TrimEnd(' '); varTypeStr = varTypeStr.TrimStart(' '); DPE_ServerDefs.PublicationVariableDataType varType = DPE_ServerDefs.Get_PublicationVariableDataType_FromString(varTypeStr); return(varType); }
private DPE_ServerDefs.PublicationVariableDataType GetSelectedPublicationVariableDataType() { if (this.lstPostedPublicationVariables.SelectedIndex >= 0) { string element = System.Convert.ToString(this.lstPostedPublicationVariables.SelectedItem); string[] keys = element.Split(new char[] { ',' }); string VariableName = keys[0]; string varTypeStr = keys[1]; varTypeStr = varTypeStr.TrimEnd(' '); varTypeStr = varTypeStr.TrimStart(' '); DPE_ServerDefs.PublicationVariableDataType varType = DPE_ServerDefs.Get_PublicationVariableDataType_FromString(varTypeStr); return(varType); } else { throw new Exception("No selected element"); } }