private void Button_Update_Click(object sender, EventArgs e)
        {
            Hide();
            var modUpdate = new ModUpdater.ModUpdate()
            {
                Name = Title
            };

            modUpdate.Files.Add(new ModUpdater.ModUpdateFile()
            {
                URL = URL, FileName = new Uri(URL).Segments.Last()
            });

            new UpdateModForm(null, modUpdate).ShowDialog();
            Close();
        }
Example #2
0
 // Constructors
 public UpdateModForm(Mod mod, ModUpdater.ModUpdate update)
 {
     InitializeComponent();
     _Mod      = mod;
     ModUpdate = update;
     if (mod == null)
     {
         Text                   = "Downloading " + update.Name;
         UpdateLabel.Text       = "Downloading " + update.Name;
         UpdateLabel.Location   = new Point(Size.Width / 2 - UpdateLabel.Size.Width / 2, UpdateLabel.Location.Y);
         DownloadLabel.Text     = "Starting Download...";
         DownloadLabel.Location = new Point(Size.Width / 2 - DownloadLabel.Size.Width / 2, DownloadLabel.Location.Y);
     }
     else
     {
         Text                   = "Updating " + update.Name;
         UpdateLabel.Text       = "Updating " + update.Name;
         UpdateLabel.Location   = new Point(Size.Width / 2 - UpdateLabel.Size.Width / 2, UpdateLabel.Location.Y);
         DownloadLabel.Text     = "Starting Download...";
         DownloadLabel.Location = new Point(Size.Width / 2 - DownloadLabel.Size.Width / 2, DownloadLabel.Location.Y);
     }
 }