Exemplo n.º 1
0
        private bool OnSave()
        {
            if (!string.IsNullOrEmpty(printerNameInput.Text))
            {
                activeName = printerNameInput.Text;

                if (this.activeMake == null || activeModel == null)
                {
                    return(false);
                }
                else
                {
                    ProfileManager.AcquireNewProfile(activeMake, activeModel, activeName);
                    return(true);
                }
            }
            else
            {
                this.printerNameError.TextColor = RGBA_Bytes.Red;
                this.printerNameError.Text      = "Printer name cannot be blank";
                this.printerNameError.Visible   = true;

                return(false);
            }
        }