public MainForm(BambiDesktopSettings settings) { InitializeComponent(); if (settings == null) { throw new NullReferenceException(string.Format( "{0} may not be null when constructing a {1}.", typeof(BambiDesktopSettings).Name, typeof(MainForm).Name)); } _settings = settings; _thumbnailCallback = new Image.GetThumbnailImageAbort(delegate() { return(false); }); }
static void Main() { Application.ThreadException += Application_ThreadException; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); GOC.Instance.ShowMessageBoxOnException = true; if (!File.Exists(new BambiDesktopSettings().FilePath)) { GetDefaultSettings().SaveToFile(); } BambiDesktopSettings settings = GOC.Instance.GetSettings <BambiDesktopSettings>(true, true); _mainForm = new MainForm(settings); Application.Run(_mainForm); }