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; }
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; }
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); } }
public static void Load() { instance = (LogoSettings)LoadSave.Load(logoSettingsPath, typeof(LogoSettings)); }