private void bShaderFlags_Click(object sender, EventArgs e) { // read current shader flags from code UInt32 flags = 0; Match m = Regex.Match(rtbTechnique.Text, @".*int[ \t]*mgeflags[ \t]*=[ \t]*[0-9]*.*", RegexOptions.IgnoreCase); // RegexOptions.Singleline | if (m.Success) { try { flags = Convert.ToUInt32(Regex.Replace(m.ToString(), @".*int[ \t]*mgeflags[ \t]*=[ \t]*([0-9]*).*", @"$1", RegexOptions.IgnoreCase)); } catch { MessageBox.Show(strings["CannotReadFlags"], Statics.strings["Error"]); return; } } ShaderFlagsEd shfled = new ShaderFlagsEd(); shfled.setCheckboxes(flags); shfled.parent = this; shfled.ShowDialog(); shfled.Dispose(); }
private void bShaderFlags_Click(object sender, EventArgs e) { //read current shader flags from code UInt32 flags = 0; Match m = Regex.Match(rtbTechnique.Text, @".*int[ \t]*mgeflags[ \t]*=[ \t]*[0-9]*.*", RegexOptions.IgnoreCase);//RegexOptions.Singleline | if (m.Success) { try { flags = Convert.ToUInt32(Regex.Replace(m.ToString(), @".*int[ \t]*mgeflags[ \t]*=[ \t]*([0-9]*).*", @"$1", RegexOptions.IgnoreCase)); } catch { MessageBox.Show(strings["CannotReadFlags"], Statics.strings["Error"]); return; } } ShaderFlagsEd shfled = new ShaderFlagsEd(); shfled.setCheckboxes(flags); shfled.parent = this; shfled.ShowDialog(); shfled.Dispose(); }