Exemplo n.º 1
0
        private void AMain_Load(object sender, EventArgs e)
        {
            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.Navigate(new Uri(Settings.P_BrowserAddress));
            }

            RepairOldFiles();

            Launch_pb.Enabled        = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;
            Version_label.Text       = string.Format("Build: {0}.{1}.{2}", Globals.ProductCodename, Globals.ProductVersion, Application.ProductVersion);

            if (Settings.P_ServerName != String.Empty)
            {
                Name_label.Visible = true;
                Name_label.Text    = Settings.P_ServerName;
            }

            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }
Exemplo n.º 2
0
        private void AMain_Load(object sender, EventArgs e)
        {
            var envir = CoreWebView2Environment.CreateAsync(null, Settings.ResourcePath).Result;

            Main_browser.EnsureCoreWebView2Async(envir);

            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.NavigationCompleted += Main_browser_NavigationCompleted;
                Main_browser.Source = new Uri(Settings.P_BrowserAddress);
            }

            RepairOldFiles();

            Launch_pb.Enabled        = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;
            Version_label.Text       = string.Format("Build: {0}.{1}.{2}", Globals.ProductCodename, Settings.UseTestConfig ? "Debug" : "Release", Application.ProductVersion);

            if (Settings.P_ServerName != String.Empty)
            {
                Name_label.Visible = true;
                Name_label.Text    = Settings.P_ServerName;
            }

            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }
Exemplo n.º 3
0
        private void AMain_Load(object sender, EventArgs e)
        {
            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.Navigate(new Uri(Settings.P_BrowserAddress));
            }

            if (File.Exists(Settings.P_Client + oldClientName))
            {
                File.Delete(Settings.P_Client + oldClientName);
            }

            if (!Directory.Exists(Settings.P_Client + "download"))
            {
                Directory.CreateDirectory(Settings.P_Client + "download");
            }
            lab_version.Text = "当前版本号:" + Settings.clientVersion;

            //Launch_pb.Enabled = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;

            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }
Exemplo n.º 4
0
        private void AMain_Load(object sender, EventArgs e)
        {
            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.Navigate(new Uri(Settings.P_BrowserAddress));
            }

            var files = Directory.GetFiles(Settings.P_Client).Where(x => Path.GetFileName(x).StartsWith("Old"));

            foreach (var oldFilename in files)
            {
                File.Delete(oldFilename);
            }

            Launch_pb.Enabled        = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;
            Version_label.Text       = string.Format("Build: {0}.{1}.{2}", Globals.ProductCodename, Globals.ProductVersion, Application.ProductVersion);

            if (Settings.P_ServerName != String.Empty)
            {
                Name_label.Visible = true;
                Name_label.Text    = Settings.P_ServerName;
            }

            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }
Exemplo n.º 5
0
        private void AMain_Load(object sender, EventArgs e)
        {
            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.Navigate(new Uri(Settings.P_BrowserAddress));
            }

            if (File.Exists(Settings.P_Client + oldClientName))
            {
                File.Delete(Settings.P_Client + oldClientName);
            }

            Launch_pb.Enabled        = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;
            Version_label.Text       = "Version " + Application.ProductVersion;

            if (Settings.P_ServerName != String.Empty)
            {
                Name_label.Visible = true;
                Name_label.Text    = Settings.P_ServerName;
            }
            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }
Exemplo n.º 6
0
        private void AMain_Load(object sender, EventArgs e)
        {
            if (Settings.P_BrowserAddress != "")
            {
                Main_browser.Navigate(new Uri(Settings.P_BrowserAddress));
            }

            if (File.Exists(Settings.P_Client + $"Old{System.AppDomain.CurrentDomain.FriendlyName}"))
            {
                File.Delete(Settings.P_Client + $"Old{System.AppDomain.CurrentDomain.FriendlyName}");
            }

            foreach (var file in dependantFiles)
            {
                if (File.Exists(Settings.P_Client + $"Old{file}"))
                {
                    File.Delete(Settings.P_Client + $"Old{file}");
                }
            }

            Launch_pb.Enabled        = false;
            ProgressCurrent_pb.Width = 5;
            TotalProg_pb.Width       = 5;
            Version_label.Text       = string.Format("Build: {0}.{1}.{2}", Globals.ProductCodename, Globals.ProductVersion, Application.ProductVersion);

            if (Settings.P_ServerName != String.Empty)
            {
                Name_label.Visible = true;
                Name_label.Text    = Settings.P_ServerName;
            }
            _workThread = new Thread(Start)
            {
                IsBackground = true
            };
            _workThread.Start();
        }