public static void GetSomeData()
        {
            switch (Type)
            {
            case UpdateType.GitHubReleases:
                using (var client = new System.Net.WebClient())
                {
                    client.Headers.Add("User-Agent", "https://github.com/ScriptedEngineer/AutoUpdater");
                    client.Encoding = Encoding.UTF8;
                    try {
                        SomeData    = client.DownloadString($"https://api.github.com/repos/{LinkOrToken}/releases");
                        DownloadURL = MyExtentions.RegexMatch(SomeData, @"""browser_download_url"":""([^""]*)""");
                    }
                    catch
                    {
                        RunApp();
                    }
                }
                break;

            case UpdateType.XMLServer:
                break;

            case UpdateType.WSXZApi:
                break;
            }
        }
        private void DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
        {
            Status.Content   = $"{ExtractUpdate}...";
            Procents.Content = 0.ToString("0.0%");
            Progress.Value   = 0;
            new Task(() =>
            {
                Thread.Sleep(400);
                using (MemoryStream Mem = new MemoryStream(e.Result))
                {
                    ZipArchive archive = new ZipArchive(Mem, ZipArchiveMode.Update);
                    //archive.ExtractToDirectory("./");
                    int counter = 0, max = archive.Entries.Count;
                    foreach (ZipArchiveEntry file in archive.Entries)
                    {
                        string completeFileName = System.IO.Path.Combine("./", file.FullName);
                        string directory        = System.IO.Path.GetDirectoryName(completeFileName);

                        if (!Directory.Exists(directory))
                        {
                            Directory.CreateDirectory(directory);
                        }
                        if (file.Name != "")
                        {
                            file.ExtractToFile(completeFileName, true);
                        }

                        counter++;
                        double procents = (double)counter / (double)max;
                        MyExtentions.AsyncWorker(() =>
                        {
                            Procents.Content = procents.ToString("0.0%");
                            Progress.Value   = procents * 100;
                        });
                    }
                }
                Thread.Sleep(200);
                MyExtentions.AsyncWorker(() =>
                {
                    Status.Content = "Updated";
                    MyStatic.RunApp(true);
                });
            }).Start();
        }
        public static bool CheckVersion(string ver, out string lastVersion)
        {
            if (string.IsNullOrEmpty(SomeData))
            {
                GetSomeData();
            }
            lastVersion = "";
            switch (Type)
            {
            case UpdateType.None: return(false);

            case UpdateType.GitHubReleases:
                lastVersion = MyExtentions.RegexMatch(SomeData, @"""tag_name"":""([^""]*)""");
                string[] VFc    = ver.Split('.');
                string[] VFl    = lastVersion.Split('.');
                bool     oldVer = false;
                for (int i = 0; i < VFc.Length; i++)
                {
                    if (VFc[i] != VFl[i])
                    {
                        int.TryParse(VFc[i], out int VFci);
                        int.TryParse(VFl[i], out int VFli);
                        if (VFli > VFci)
                        {
                            oldVer = true;
                        }
                    }
                }
                return(oldVer);

            case UpdateType.XMLServer:
                break;

            case UpdateType.WSXZApi:
                break;
            }
            return(false);
        }
        public static string GetUpdateLog(string version)
        {
            if (string.IsNullOrEmpty(SomeData))
            {
                GetSomeData();
            }
            switch (Type)
            {
            case UpdateType.GitHubReleases:
                string   updLog    = "";
                string[] gVersions = SomeData.Split(new string[] { @"},{""url"":" }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string gVer in gVersions)
                {
                    string vsi = MyExtentions.RegexMatch(gVer, @"""tag_name"":""([^""]*)""");
                    if (vsi == version)
                    {
                        break;
                    }
                    string[] Lines  = MyExtentions.RegexMatch(gVer, @"""body"":""([^""]*)""").Split(new string[] { "\\r\\n" }, StringSplitOptions.RemoveEmptyEntries);
                    bool     writes = true;
                    foreach (var Line in Lines)
                    {
                        if (Line.StartsWith("# "))
                        {
                            if (!string.IsNullOrEmpty(LogLanguage))
                            {
                                string[] lang = Line.Split(']');
                                if (lang[0] == "# [" + LogLanguage)
                                {
                                    writes = true;
                                }
                                else
                                {
                                    writes = false;
                                }
                                if (lang.Length == 1)
                                {
                                    writes = true;
                                }
                            }
                            if (writes)
                            {
                                updLog += "\r\n" + Line + "\r\n";
                            }
                        }
                        else
                        if (Line.StartsWith("### "))
                        {
                            //Ingore
                        }
                        else
                        {
                            if (writes)
                            {
                                updLog += Line + "\r\n";
                            }
                        }
                    }
                }
                return(updLog.Trim());

            case UpdateType.XMLServer:
                break;

            case UpdateType.WSXZApi:
                break;
            }
            return("");
        }