コード例 #1
0
        public void UpdateControl()
        {
            LogoSettings.Load();
            if (LogoSettings.Instance == null || String.IsNullOrEmpty(LogoSettings.Instance.FileName))
            {
                pbLogo.Image = defaultLogo;
            }
            else
            {
                pbLogo.Image = ImageLoader.GetImageFromFile(Globals.SettingsResourceDir + LogoSettings.Instance.FileName, LogoSettings.Instance.Size.Width, LogoSettings.Instance.Size.Height);
            }

            this.Size = pbLogo.Image.Size;
        }
コード例 #2
0
        public void LoadControl()
        {
            loading = true;

            LogoSettings.Load();

            if (LogoSettings.Instance != null)
            {
                chkEnabled.Checked = LogoSettings.Instance.Enabled;
                nudWidth.Value     = LogoSettings.Instance.Size.Width;
                nudHeight.Value    = LogoSettings.Instance.Size.Height;
            }

            logoViewCtrl.UpdateControl();

            loading = false;
        }
コード例 #3
0
        private void SaveAndUpdate()
        {
            LogoSettings.Instance.Enabled = chkEnabled.Checked;
            LogoSettings.Instance.Size    = new Size(Convert.ToInt32(nudWidth.Value), Convert.ToInt32(nudHeight.Value));

            LogoSettings.Save();

            if (chkEnabled.Checked)
            {
                logoViewCtrl.UpdateControl();
            }
            else
            {
                logoViewCtrl.ShowNone();
            }

            if (LogoSettingsChanged != null)
            {
                LogoSettingsChanged(this, null);
            }
        }
コード例 #4
0
 public static void Load()
 {
     instance = (LogoSettings)LoadSave.Load(logoSettingsPath, typeof(LogoSettings));
 }