Ejemplo n.º 1
0
        private async Task InitializeApp()
        {
            SplashProgressLabel.Text = "";

            for (int i = 0; i <= 50; ++i)
            {
                Opacity = i * 0.02;
                await Task.Delay(10);
            }

            SplashProgressLabel.Text = "Initialize App";

            BasicInitialize();

            SplashProgressLabel.Text = "Checking App Version";

            await Task.Delay(500);

            if (await ETC.CheckAppVersion())
            {
                if (MessageBox.Show
                    (
                        "프로그램 업데이트가 있습니다. 업데이트를 진행하시겠습니까?",
                        "프로그램 업데이트 존재",
                        MessageBoxButtons.YesNo,
                        MessageBoxIcon.Question
                    ) == DialogResult.Yes)
                {
                    await ETC.UpdateProgram(SplashProgressLabel);
                }
            }

            SplashProgressLabel.Text = "Checking DB Version";

            await Task.Delay(500);

            if (await ETC.CheckDBVersion())
            {
                await ETC.UpdateDB(SplashProgressLabel);
            }

            await Task.Delay(500);

            SplashProgressLabel.Text = "Load DB";

            await ETC.LoadDB();

            await Task.Delay(500);

            SplashProgressLabel.Text = "Welcome to GFD-W";

            await Task.Delay(500);

            Main main = new Main();

            main.Show();

            Visible = false;
        }
Ejemplo n.º 2
0
        private async void UpdateCheckTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                if (await ETC.CheckAppVersion())
                {
                    StatusStrip_AppVerLabel.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
                }
                else
                {
                    StatusStrip_AppVerLabel.DisplayStyle = ToolStripItemDisplayStyle.Text;
                }

                if (await ETC.CheckDBVersion())
                {
                    StatusStrip_DBVerLabel.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
                }
                else
                {
                    StatusStrip_DBVerLabel.DisplayStyle = ToolStripItemDisplayStyle.Text;
                }

                if (await ETC.CheckOldGFDVersion())
                {
                    StatusStrip_OldGFDVerLabel.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText;
                }
                else
                {
                    StatusStrip_OldGFDVerLabel.DisplayStyle = ToolStripItemDisplayStyle.Text;
                }

                StatusStrip_DBVerLabel.Text     = $"DB Ver : {ETC.dbVer}";
                StatusStrip_OldGFDVerLabel.Text = $"GFDv1 Ver : {ETC.oldGFDVer}";
            }
            catch (Exception ex)
            {
                ETC.LogError(ex);
            }
        }