private void LoadScript(string fileToLoad) { ScriptSave scriptSave = FileManager.XmlDeserialize <ScriptSave>(fileToLoad); this.SetFromScriptSave(scriptSave); Apply_Click(null, null); }
private ScriptSave CreateScriptSave() { ScriptSave toReturn = new ScriptSave(); toReturn.ClassScope = this.ClassScopeTextBox.Text; toReturn.Initialize = this.InitializeTextBox.Text; toReturn.Update = this.UpdateTextBox.Text; return(toReturn); }
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); var result = sfd.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { string fileToSave = sfd.FileName; ScriptSave scriptSave = this.CreateScriptSave(); FileManager.XmlSerialize(scriptSave, fileToSave); } }
private void SetFromScriptSave(ScriptSave scriptSave) { this.ClassScopeTextBox.Text = scriptSave.ClassScope; this.InitializeTextBox.Text = scriptSave.Initialize; this.UpdateTextBox.Text = scriptSave.Update; }
private ScriptSave CreateScriptSave() { ScriptSave toReturn = new ScriptSave(); toReturn.ClassScope = this.ClassScopeTextBox.Text; toReturn.Initialize = this.InitializeTextBox.Text; toReturn.Update = this.UpdateTextBox.Text; return toReturn; }