Esempio n. 1
0
        protected sealed override bool saveData()
        {
            try
            {
                validateFields();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Data validation error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            mixer.StartUpdate();
            writeFields();
            mixer.EndUpdate();

            if (addingNew)
            {
                MixerDatabase.Instance.Add(mixer);
            }
            AddingNew = false;

            return(true);
        }