/// <summary> /// Generates the rule from its XML representation. /// </summary> protected virtual void OnReadXml(XmlReader reader) { switch (reader.Name) { case "ErrorStyle": this.errorStyle = (Dt.Cells.Data.ErrorStyle)Serializer.DeserializeObj(typeof(Dt.Cells.Data.ErrorStyle), reader); return; case "IgnoreBlank": this.ignoreBlank = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader)); return; case "InCellDropdown": this.inCellDropdown = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader)); return; case "ShowInputMessage": this.showInputMessage = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader)); return; case "ShowErrorMessage": this.showErrorMessage = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader)); return; case "InputTitle": this.inputTitle = (string)(Serializer.DeserializeObj(typeof(string), reader) as string); return; case "ErrorTitle": this.errorTitle = (string)(Serializer.DeserializeObj(typeof(string), reader) as string); return; case "InputMessage": this.inputMessage = (string)(Serializer.DeserializeObj(typeof(string), reader) as string); return; case "ErrorMessage": this.errorMessage = (string)(Serializer.DeserializeObj(typeof(string), reader) as string); return; case "Operator": this.comparisonOperator = (Dt.Cells.Data.ComparisonOperator)Serializer.DeserializeObj(typeof(Dt.Cells.Data.ComparisonOperator), reader); return; case "Condition": this.condition = Serializer.DeserializeObj(null, reader) as ConditionBase; return; case "Type": this.type = (CriteriaType)Serializer.DeserializeObj(typeof(CriteriaType), reader); return; } }
void Init() { this.errorStyle = Dt.Cells.Data.ErrorStyle.Stop; this.ignoreBlank = true; this.inCellDropdown = true; this.showInputMessage = true; this.showErrorMessage = true; this.inputTitle = string.Empty; this.errorTitle = string.Empty; this.inputMessage = string.Empty; this.errorMessage = string.Empty; this.comparisonOperator = Dt.Cells.Data.ComparisonOperator.Between; }