private void checkSettings() { string hint = ""; if (!Directory.Exists(Settings.Default.Folder)) { hint += "please provide a folder to cache data\r\n\r\n"; } if (string.IsNullOrWhiteSpace(Settings.Default.Token)) { hint += "please provide a token to access discogs api"; } if (!string.IsNullOrWhiteSpace(hint)) { hint += "\r\n\r\n(can be done in settings)"; this.panelView.Controls.Clear(); this.panelView.Controls.Add(new Label { Text = hint, AutoSize = true }); return; } MediaService.SetApplicationFolder(Settings.Default.Folder); DiscogsService.SetApplicationFolder(Settings.Default.Folder); DiscogsService.MaxItems = Settings.Default.MaxItems; DiscogsService.SetToken(Settings.Default.Token); this.panelView.Controls.Clear(); HomeViewControl viewMain = new HomeViewControl(); viewMain.TableFontSize = Settings.Default.TableFontSize; this.panelView.Controls.Add(viewMain); viewMain.Dock = DockStyle.Fill; }
public HomeView() { InitializeComponent(); _homecontrol = new HomeViewControl(); this.BindingContext = _homecontrol; }