private void Initialize(string format, string formatParameters) { string str1 = SampleDataFormatHelper.NormalizeFormat(this.SampleType, format, false); if (str1 != this.Format) { this.SetConfigurationValue(ConfigurationPlaceholder.StringFormat, (object)str1); } string str2 = SampleDataFormatHelper.NormalizeFormatParameters(this.SampleType, formatParameters, false); if (str2 == this.FormatParameters || string.IsNullOrEmpty(str2)) { return; } string[] strArray = str2.Split(','); if (strArray.Length != 2) { return; } string s1 = strArray[0]; string s2 = strArray[1]; int result1; if (int.TryParse(s1, out result1)) { this.SetConfigurationValue(ConfigurationPlaceholder.RandomLatinWordCount, (object)result1); } int result2; if (int.TryParse(s2, out result2)) { this.SetConfigurationValue(ConfigurationPlaceholder.RandomLatinWordLength, (object)result2); } this.formatParameters = str2; }
public DataPanePopupCallback(DataSchemaItem dataSchemaItem) { DataSchemaNode parent = dataSchemaItem.DataSchemaNode.Parent; dataSchemaItem.DataSourceNode.DocumentNode.TypeResolver.GetType(parent.Type); this.property = DesignDataConfigurationButton.WritablePropertyFromSchemaItem(dataSchemaItem); this.designDataFile = DesignDataHelper.GetDesignDataFile(dataSchemaItem.DataSourceNode.DocumentNode); this.stringConfigurator = new SampleStringConfiguration(SampleDataFormatHelper.NormalizeFormat(SampleBasicType.String, (string)null, false), (string)null); }