コード例 #1
0
 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); });
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: PaulKolozsvari/Bambi
        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);
        }