private void EditClick(object sender, System.EventArgs e) { var file = textBoxScript.Text; if (!EnsureFileExists(file)) { return; } using (new HourGlass()) { var editor = new ScriptedRenderChainScriptEditorDialog(); editor.LoadFile(file); editor.ShowDialog(this); } }
private void EditSelectedFile() { var file = Path.Combine(m_ShaderPath, (string)listBox.SelectedItem); if (!File.Exists(file)) { MessageBox.Show(this, string.Format("File not found '{0}'", file), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (new HourGlass()) { var editor = new ScriptedRenderChainScriptEditorDialog(); editor.LoadFile(file); editor.ShowDialog(this); } }