public AboutForm() { InitializeComponent(); this.Text = "About " + Project.PROGRAM_NAME_HUMAN; versionLabel.Text = Project.PROGRAM_NAME_HUMAN + " version " + Project.PROGRAM_VERSION_HUMAN + " build " + Project.PROGRAM_VERSION_RELEASEDATE; this.gpsbabelLinkLabel.Text = Project.GPSBABEL_URL; creditsLabel.Text = "Included here is GPSBabel - a program by Robert Lipe\n\nPlease visit www.gpsbabel.org for more info."; Project.setDlgIcon(this); // try loading logo file: string logoFileName = Project.GetMiscPath("about.jpg"); try { if (!File.Exists(logoFileName)) { // load the file remotely, don't hold diagnostics if load fails: string url = Project.MISC_FOLDER_URL + "/about.jpg"; DloadProgressForm loaderForm = new DloadProgressForm(url, logoFileName, false, true); loaderForm.ShowDialog(); } logoPictureBox.Image = new Bitmap(logoFileName); } catch {} }
public DlgDisableProgram(int reason) { // // Required for Windows Form Designer support // InitializeComponent(); switch (reason) { case 0: // trial expired case 1: messageLabel.Text = "Program Expired. Please download new version at www." + Project.WEBSITE_NAME_HUMAN + "\n\n\n" + "Thank you for trying " + Project.PROGRAM_NAME_HUMAN + "."; break; case 2: messageLabel.Text = "You need to accept terms of End User License Agreement.\n\n\n" + "Thank you for trying " + Project.PROGRAM_NAME_HUMAN + "."; break; case 3: messageLabel.Text = "Error: Corrupted installation.\n\nPlease download new version at www." + Project.WEBSITE_NAME_HUMAN + "\n"; break; } Project.setDlgIcon(this); }
public DlgUpdate() { InitializeComponent(); Project.setDlgIcon(this); messageLabel.Text = "your version " + Project.PROGRAM_VERSION_RELEASEDATE + " is the same as the one posted on the web site.\r\n\r\nThere is no need to update the program."; }
public DlgEula() { InitializeComponent(); TextReader reader = null; string fileName = "LicenseBSD.txt"; string filePath = Project.GetMiscPath(fileName); try { if (File.Exists(fileName) && File.GetLastWriteTime(fileName).AddDays(Project.LICENSE_FILE_MAX_AGE_DAYS).CompareTo(DateTime.Now) > 0) { reader = new StreamReader(fileName); } else { // load the file remotely, don't hold diagnostics if load fails: string url = Project.MISC_FOLDER_URL + "/" + fileName; DloadProgressForm loaderForm = new DloadProgressForm(url, fileName, false, true); loaderForm.ShowDialog(); reader = new StreamReader(fileName); } } catch {} if (reader == null) { reader = new StringReader(eulaText); // in case everything else fails } string strEula; while ((strEula = reader.ReadLine()) != null) { eulaListBox.Items.Add(strEula); } Project.setDlgIcon(this); }
public DlgGreeting(string warning, string info) { // // Required for Windows Form Designer support // InitializeComponent(); headerLabel.Text = Project.PROGRAM_NAME_HUMAN + " " + Project.PROGRAM_VERSION_HUMAN; warningLabel.Text = warning; infoLabel.Text = info; if (info.StartsWith("Error")) { infoLabel.ForeColor = Color.Red; this.Text = Project.PROGRAM_NAME_HUMAN + " - Error"; } else { this.Text = Project.PROGRAM_NAME_HUMAN; } Project.setDlgIcon(this); }