示例#1
0
        //Check if the load is finished
        private async void CheckIfLoaded(frmLoader loader)
        {
            await Task.Delay(1000);

            if (this.Visible)
            {
                if (loader.loaded)
                {
                    if (!IsOptionsSetup())
                    {
                        OpenOptions();
                        this.Hide();
                    }
                    else
                    {
                        FromLocationSync.Text = "Location 1: " + location1;
                        ToLocationSync.Text   = "Location 2: " + location2;
                    }
                    SyncProgress.Value   = 0;
                    FileLeftCounter.Text = templateCountLeftText;
                }
            }
            else
            {
                CheckIfLoaded(loader);
            }
        }
示例#2
0
        private void FrmSync_Shown(object sender, EventArgs e)
        {
            frmLoader loader = new frmLoader(this);

            loader.Show();
            this.Hide();
            CheckIfLoaded(loader);
            StopSync.Enabled = false;
        }