Exemple #1
0
        public void Init()
        {
            ShowSplashWhile(() =>
            {
                AddControls();
                DoPostUpdateActions();
                InitData();
                InitControls();
                InitTrackForm();
                InitWindForm();
                InitOptionsForm();
                DownloadWindIfNeeded();
                DownloadTracksIfNeeded();
                PrepareForUserInteration();
            });

            if (failedToLoadNavDataAtStartUp)
            {
                if (AppSettings.NavDataLocation == AppOptions.Default.NavDataLocation)
                {
                    // User did not set the path.
                    // Maybe its the first time the app starts.
                    MsgBoxHelper.ShowDialog(
                        null,
                        "Please set the correct Nav Data location " +
                        "before using the application.",
                        MsgBoxIcon.Info,
                        "",
                        DefaultButton.Button1,
                        "OK");
                }
                else
                {
                    this.ShowWarning("Please set the correct Nav Data location.");
                }

                ShowOptionsForm(FormStartPosition.CenterScreen, true, true);
            }

            DoubleBufferUtil.SetDoubleBuffered(panel1);
        }