private void SetValueOCX(string str_funcname) { if (this.panel_value.Controls.Count == 0) { RuleComboPLM oplm = new RuleComboPLM(str_funcname) { Dock = DockStyle.Fill }; this.panel_value.Controls.Add(oplm); ArrayList list = new ArrayList { this._className, this._funcValue }; oplm.FunctionValue = this._funcValue.ToString(); oplm.SetInput(list); } else { ((RuleComboPLM)this.panel_value.Controls[0]).ReLoad(str_funcname); ArrayList list2 = new ArrayList { this._className, this._funcValue }; ((RuleComboPLM)this.panel_value.Controls[0]).FunctionValue = this._funcValue.ToString(); ((RuleComboPLM)this.panel_value.Controls[0]).SetInput(list2); } }
private void SetValueOCX(string str_funcname) { ArrayList list = new ArrayList(); if (this.panel_value.Controls.Count == 0) { RuleComboPLM oplm = new RuleComboPLM(str_funcname) { Dock = DockStyle.Fill }; this.panel_value.Controls.Add(oplm); if (this._attrValue != null) { list.Add(0); list.Add(this._attrValue); oplm.SetInput(list); } } else { ((RuleComboPLM)this.panel_value.Controls[0]).ReLoad(str_funcname); if (this._attrValue != null) { list.Add(0); list.Add(this._attrValue); ((RuleComboPLM)this.panel_value.Controls[0]).SetInput(list); } } }
public void LoadFunctionByItem(string className, bool isClass, Guid Oid, Guid ClassPosition, string attrName, OperatorType oper, object attrValue, int option) { if ((attrValue != null) && (attrValue.ToString().IndexOf("(") >= 2)) { this._isClsAttrSet = isClass; this._Oid = Oid; this._position = ClassPosition; this._attrValue = attrValue; this._operType = OperatorType.Function; if (!className.Equals(this._className)) { this._className = className; this.SetNameOcxLst(); this.SetOperatorOcxLst(); } for (int i = 0; i < this._attrList.Count; i++) { GenericAttribute attribute = (GenericAttribute)this._attrList[i]; if (attrName == attribute.Name) { this.cb_name.SelectedIndex = i; this._option = option; break; } } if (this._operList.Count != 0) { for (int j = 0; j < this._operList.Count; j++) { string str = this._operList[j] as string; if ((this._attrValue != null) && (this._attrValue != "")) { string str2 = this._attrValue.ToString().Substring(0, this._attrValue.ToString().IndexOf("(")); if (str == str2) { this.cb_operator.SelectedIndex = j; break; } } } if ((this.panel_value.Controls.Count != 0) && (this.panel_value.Controls[0] is RuleComboPLM)) { this.panel_value.Controls.Clear(); RuleComboPLM oplm = new RuleComboPLM(this._operList[this.cb_operator.SelectedIndex].ToString()); if (this._attrValue != null) { ArrayList list = new ArrayList { 0, this._attrValue }; oplm.SetInput(list); oplm.Dock = DockStyle.Fill; this.panel_value.Controls.Add(oplm); } } } } }