示例#1
0
        private void Adminka_Load(object sender, EventArgs e)
        {
            _settingsService = new SettingsService();
            _settingsService.Activate(this);

            _settingsEntity = _settingsService.GetSettings();

            //Выставить значения
            pbLogo.SizeMode = PictureBoxSizeMode.StretchImage;
            pbLogo.Image    = _settingsEntity.PhotoLogo;

            pbProgramBackground.SizeMode = PictureBoxSizeMode.StretchImage;
            pbProgramBackground.Image    = _settingsEntity.ProgramBackground;

            if (this._settingsEntity.PaperType != PaperTypeEnume.Motovay)
            {
                this.rbtGlanec.Checked = true;
            }
            else
            {
                this.rbtMotovay.Checked = true;
            }

            if (_settingsEntity.PhotoBackground == null)//Если у нас не выбрана текстура, то выставить цвет
            {
                pbPhotoColor.BackColor = _settingsEntity.BackgroundPhotoColor;
            }
            else
            {
                pbPhotoColor.Image    = _settingsEntity.PhotoBackground;
                pbPhotoColor.SizeMode = PictureBoxSizeMode.StretchImage;
            }

            lblPageValue.Text = _settingsEntity.PagePrinted.ToString();
        }