Esempio n. 1
0
        public override string UpdateSettings()
        {
            var obj = new TextBoxParameterSettings();

            obj.Default = txtDefault.Text;
            obj.Rows    = StringHelpers.DefaultInt32FromString(txtRows.Text, 1);
            obj.Columns = StringHelpers.DefaultInt32FromString(txtColumns.Text, 0);

            return(Serialization.SerializeObject(obj, typeof(TextBoxParameterSettings)));
        }
Esempio n. 2
0
        public override void LoadSettings(string settings)
        {
            var obj = new TextBoxParameterSettings();

            if (settings != null)
            {
                obj = (TextBoxParameterSettings)(Serialization.DeserializeObject(settings, typeof(TextBoxParameterSettings)));
            }

            txtDefault.Text = obj.Default;
            txtRows.Text    = obj.Rows.ToString();
            txtColumns.Text = obj.Columns.ToString();
        }