Mahdi72.TYUpdater 1.12.11

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Mahdi72.TYUpdater --version 1.12.11
NuGet\Install-Package Mahdi72.TYUpdater -Version 1.12.11
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mahdi72.TYUpdater" Version="1.12.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mahdi72.TYUpdater --version 1.12.11
#r "nuget: Mahdi72.TYUpdater, 1.12.11"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mahdi72.TYUpdater as a Cake Addin
#addin nuget:?package=Mahdi72.TYUpdater&version=1.12.11

// Install Mahdi72.TYUpdater as a Cake Tool
#tool nuget:?package=Mahdi72.TYUpdater&version=1.12.11

ابتدا کتابخانه را یوزینگ کنید

using TYUpdater;

یک شی از کلاس های کتابخانه ایجاد کنید

Updater m_Updater = null;
        UpdaterApp m_App = null;

متدهای زیر را اینتیالیز کنید

m_Updater = new Updater(null, string.Empty, "Windows");
            m_Updater.CheckCompletedDelegate += CheckCompleted;
            m_Updater.DownloadingDelegate += Download;
            m_Updater.DownloadCompletedDelegate += DownloadCompleted;

در رویداد چک کردن بروزرسانی کدهای زیر را قرار دهید

 m_Updater.Url = new Uri("http://url.com/updater.php");
            m_Updater.AppName = Application.ResourceAssembly.GetName().Name;
            m_Updater.AppCurrentVersion = "";
            m_Updater.Check();

            txtResult.Clear();
            txtResult.AppendText("Checking application version...\r\n");
           

سپس تابع زیر

private void CheckCompleted(UpdaterApp app)
        {
            m_App = app;
            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            Dispatcher.BeginInvoke(new Action(() =>
            {
                if (m_App != null) {
          txtOutput.AppendText(string.Format("Name: {0}\r\n", app.Name));
          txtOutput.AppendText(string.Format("Version: {0}\r\n", app.Version));
          txtOutput.AppendText(string.Format("File name: {0}\r\n", app.FileName));
          txtOutput.AppendText(string.Format("Released: {0}\r\n", app.ReleaseDate));
          txtOutput.AppendText(string.Format("Url: {0}\r\n", app.Url));
          txtOutput.AppendText("Changelog:\r\n");
          txtOutput.AppendText(string.Format("{0}\r\n", app.Changelog));
          txtOutput.AppendText("Message:\r\n");
          txtOutput.AppendText(string.Format("{0}\r\n", app.Message));
        } else {
          txtOutput.AppendText("Application not found\r\n");
        }
      }));
        }
}

private void btnDownload_Click(object sender, RoutedEventArgs e)
    {
      if (m_App != null) {
        m_Updater.Download(m_App.Url, string.Format("{0}\\{1}", System.IO.Path.GetTempPath(), m_App.FileName));
      }
    }

    private void Download(string filename, double percentage)
    {
      pgbProgress.Maximum = 100;
      pgbProgress.Value = percentage;
    }

    private void DownloadCompleted(string filename)
    {
      ProcessStartInfo psInfo = new ProcessStartInfo(filename);
      psInfo.UseShellExecute = true;
      Process process = Process.Start(psInfo);
      App.Current.Shutdown();
    }

کدهای سمت سرور را از اینجا دانلود کنید و در هاست خود اپلود کنید http://s8.picofile.com/file/8314345418/server.zip.html

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

First Release