コード例 #1
0
        private void LoadScript(string fileToLoad)
        {
            ScriptSave scriptSave = FileManager.XmlDeserialize <ScriptSave>(fileToLoad);

            this.SetFromScriptSave(scriptSave);

            Apply_Click(null, null);
        }
コード例 #2
0
        private ScriptSave CreateScriptSave()
        {
            ScriptSave toReturn = new ScriptSave();

            toReturn.ClassScope = this.ClassScopeTextBox.Text;
            toReturn.Initialize = this.InitializeTextBox.Text;
            toReturn.Update     = this.UpdateTextBox.Text;
            return(toReturn);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 private void SetFromScriptSave(ScriptSave scriptSave)
 {
     this.ClassScopeTextBox.Text = scriptSave.ClassScope;
     this.InitializeTextBox.Text = scriptSave.Initialize;
     this.UpdateTextBox.Text     = scriptSave.Update;
 }
コード例 #5
0
 private ScriptSave CreateScriptSave()
 {
     ScriptSave toReturn = new ScriptSave();
     toReturn.ClassScope = this.ClassScopeTextBox.Text;
     toReturn.Initialize = this.InitializeTextBox.Text;
     toReturn.Update = this.UpdateTextBox.Text;
     return toReturn;
 }
コード例 #6
0
 private void SetFromScriptSave(ScriptSave scriptSave)
 {
     this.ClassScopeTextBox.Text = scriptSave.ClassScope;
     this.InitializeTextBox.Text = scriptSave.Initialize;
     this.UpdateTextBox.Text = scriptSave.Update;
 }