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; }