SafeDispatch/SetupProj/SetupProj/EULA.cs
2024-02-22 18:43:59 +02:00

100 lines
3.4 KiB
C#

using SafeMobileLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
namespace SetupProj
{
public partial class EULA : Telerik.WinControls.UI.RadForm
{
public EULA()
{
InitializeComponent();
/*
object[] openProjects = (object[])applicationObject.ActiveSolutionProjects;
Project activeProject = (Project)openProjects[0];
string configurationName = activeProject.ConfigurationManager.ActiveConfiguration.ConfigurationName;
string platformName = activeProject.ConfigurationManager.ActiveConfiguration.PlatformName;
*/
String eulaPath = "";
switch (MainForm.radioType)
{
case RADIOTYPE.MOTO:
case RADIOTYPE.LISF:
{
eulaPath = Application.StartupPath.ToString() + "\\SAFEDISPATCH_EULA.htm";
break;
}
case RADIOTYPE.HYT:
{
eulaPath = Application.StartupPath.ToString() + "\\SAFESYT_EULA.htm";
break;
}
case RADIOTYPE.HARRIS:
{
eulaPath = Application.StartupPath.ToString() + "\\VISION_EULA.htm";
break;
}
case RADIOTYPE.ATLAS:
{
eulaPath = Application.StartupPath.ToString() + "\\ATLAS_EULA.htm";
break;
}
case RADIOTYPE.SIMOCO:
{
labelInstaller.Text = "Installer for Simoco Dispatch";
labelAgreement.Text = "Simoco Software License Agreement";
eulaPath = Application.StartupPath.ToString() + "\\SIMOCO_EULA.htm";
pbLogo.Image = SetupProj.Properties.Resources.simoco;
//this.Icon = SetupProj.Properties.Resources.simoco_dispatch_128;
}
break;
case RADIOTYPE.LINX:
case RADIOTYPE.LINXB:
{
labelInstaller.Text = "Installer for LINX Dispatch";
eulaPath = Application.StartupPath.ToString() + "\\LINXDISPATCH_EULA.htm";
break;
}
case RADIOTYPE.EXCERA:
{
labelInstaller.Text = "Installer for AXYS Dispatch";
eulaPath = Application.StartupPath.ToString() + "\\SAFEDISPATCH_EULA.htm";
break;
}
}
try
{
if(File.Exists(eulaPath))
webBrowser1.Navigate(eulaPath);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
private void btDeny_Click(object sender, EventArgs e)
{
Close();
}
private void btAccept_Click(object sender, EventArgs e)
{
MainForm test = new MainForm(this);
test.Show();
}
}
}