12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Optimizer
- {
- public partial class UpdateForm : Form
- {
- public UpdateForm(string message, bool newUpdate, string changelog, string latestVersion)
- {
- InitializeComponent();
- Options.ApplyTheme(this);
- txtMessage.Text = message;
- if (newUpdate)
- {
- this.Size = new Size(600, 545);
- btnOK.Text = Options.TranslationList["btnYes"].ToString();
- btnNo.Text = Options.TranslationList["btnNo"].ToString();
- btnNo.Visible = true;
- txtChanges.Text = Options.TranslationList["btnChangelog"].ToString();
- txtVersions.Text = $"{Program.GetCurrentVersionTostring()} → {latestVersion}";
- txtVersions.Visible = true;
- btnOK.DialogResult = DialogResult.Yes;
- btnNo.DialogResult = DialogResult.No;
- txtInfo.Text = changelog;
- txtInfo.Visible = true;
- txtChanges.Visible = true;
- }
- else
- {
- this.Size = new Size(600, 188);
- btnOK.Text = Options.TranslationList["btnAbout"].ToString();
- btnNo.Visible = false;
- txtVersions.Visible = false;
- btnOK.DialogResult = DialogResult.OK;
- txtInfo.Visible = false;
- txtChanges.Visible = false;
- }
- }
- private void UpdateForm_Load(object sender, EventArgs e)
- {
- }
- }
- }
|