Пример #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;
 }