Subversion Repositories Code-Repo

Compare Revisions

No changes between revisions

Ignore whitespace Rev 28 → Rev 29

/SWAT USB App/trunk/SWAT USB App/SettingsParser.cs
50,10 → 50,24
 
// Reads program settings
DebugText.appendText("Reading program settings");
softwareFormWidth = int.Parse(Settings.Element("Program").Element("SoftwareFormWidth").Value);
driverFormWidth = int.Parse(Settings.Element("Program").Element("DriverFormWidth").Value);
driverCheckForMatchingModel = bool.Parse(Settings.Element("Program").Element("CheckForMatchingModel").Value);
XElement temp = Settings.Element("Program").Element("SoftwareFormWidth");
if (temp == null)
DebugText.appendText("Setting SoftwareFormWidth not found. Using default value of 210");
else
softwareFormWidth = int.Parse(Settings.Element("Program").Element("SoftwareFormWidth").Value);
 
temp = Settings.Element("Program").Element("DriverFormWidth");
if (temp == null)
DebugText.appendText("Setting DriverFormWidth not found. Using default value of 180");
else
driverFormWidth = int.Parse(Settings.Element("Program").Element("DriverFormWidth").Value);
 
temp = Settings.Element("Program").Element("CheckForMatchingModel");
if (temp == null)
DebugText.appendText("Setting CheckForMatchingModel not found. Using default value of false");
else
driverCheckForMatchingModel = bool.Parse(Settings.Element("Program").Element("CheckForMatchingModel").Value);
 
// Reads the list of applications from the USBSettings.xml file into form_Software.softwareList
DebugText.appendText("Parsing list of applications");
foreach (XElement elem in Settings.Elements("Applications").Elements("Application"))
/SWAT USB App/trunk/SWAT USB App/bin/Debug/SWAT USB App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/bin/Debug/SWAT USB App.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/bin/Release/SWAT USB App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/bin/Release/SWAT USB App.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/form_Drivers.Designer.cs
83,7 → 83,7
this.MaximizeBox = false;
this.Name = "form_Drivers";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Drivers";
this.ResumeLayout(false);
 
/SWAT USB App/trunk/SWAT USB App/form_Drivers.cs
15,28 → 15,9
{
private static List<Process> toInstall = new List<Process>();
private static List<RadioButton> formRadioButton = new List<RadioButton>();
private static form_Drivers _driver_Form = null;
public static form_Drivers driver_Form_Instance
{
set
{
_driver_Form = value;
}
get
{
if (_driver_Form == null)
_driver_Form = new form_Drivers();
return _driver_Form;
}
}
public form_Drivers()
{
this.Load += new EventHandler(form_Drivers_Load);
InitializeComponent();
}
 
void form_Drivers_Load(object sender, EventArgs e)
{
InitializeComponent();
try
{
if (SettingsParser.DriversList.Count() == 0)
98,7 → 79,7
}
catch (Exception ex)
{
DebugText.appendText("Exception Thrown: " + e.ToString());
DebugText.appendText("Exception Thrown: " + ex.ToString());
MessageBox.Show(ex.ToString());
}
}
176,7 → 157,7
private void btn_Driver_Cancel_Click(object sender, EventArgs e)
{
DebugText.appendText("Closing driver form");
driver_Form_Instance.Close();
this.Close();
}
}
}
/SWAT USB App/trunk/SWAT USB App/form_Main_Menu.cs
32,11 → 32,13
}
private void btn_Main_Drivers_Click(object sender, EventArgs e)
{
form_Drivers.driver_Form_Instance.ShowDialog();
form_Drivers driverForm = new form_Drivers();
driverForm.ShowDialog();
}
private void btn_Main_Software_Click(object sender, EventArgs e)
{
form_Software.software_Form_Instance.ShowDialog();
form_Software softwareForm = new form_Software();
softwareForm.ShowDialog();
}
private void btn_Main_Exit_Click(object sender, EventArgs e)
{
51,15 → 53,17
{
case 'd':
case 'D':
form_Drivers.driver_Form_Instance.ShowDialog();
form_Drivers driverForm = new form_Drivers();
driverForm.ShowDialog();
break;
case 's':
case 'S':
form_Software.software_Form_Instance.ShowDialog();
form_Software softwareForm = new form_Software();
softwareForm.ShowDialog();
break;
case '?':
AboutBox newForm = new AboutBox();
newForm.ShowDialog();
AboutBox aboutForm = new AboutBox();
aboutForm.ShowDialog();
break;
}
}
/SWAT USB App/trunk/SWAT USB App/form_Software.Designer.cs
32,7 → 32,7
this.btn_Cancel = new System.Windows.Forms.Button();
this.btn_Ok = new System.Windows.Forms.Button();
this.groupBox_SoftwareList = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.btn_Reset = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btn_Cancel
69,17 → 69,17
this.groupBox_SoftwareList.TabStop = false;
this.groupBox_SoftwareList.Text = "Choose Software to Install";
//
// button1
// btn_Reset
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(12, 37);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 24);
this.button1.TabIndex = 2;
this.button1.Text = "Reset";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
this.btn_Reset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_Reset.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_Reset.Location = new System.Drawing.Point(12, 37);
this.btn_Reset.Name = "btn_Reset";
this.btn_Reset.Size = new System.Drawing.Size(56, 24);
this.btn_Reset.TabIndex = 2;
this.btn_Reset.Text = "Reset";
this.btn_Reset.UseVisualStyleBackColor = true;
this.btn_Reset.Click += new System.EventHandler(this.btn_Reset_Click);
//
// form_Software
//
88,7 → 88,7
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btn_Cancel;
this.ClientSize = new System.Drawing.Size(204, 73);
this.Controls.Add(this.button1);
this.Controls.Add(this.btn_Reset);
this.Controls.Add(this.btn_Ok);
this.Controls.Add(this.groupBox_SoftwareList);
this.Controls.Add(this.btn_Cancel);
97,7 → 97,7
this.MaximizeBox = false;
this.Name = "form_Software";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Software";
this.ResumeLayout(false);
 
108,6 → 108,6
private System.Windows.Forms.Button btn_Cancel;
private System.Windows.Forms.Button btn_Ok;
private System.Windows.Forms.GroupBox groupBox_SoftwareList;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btn_Reset;
}
}
/SWAT USB App/trunk/SWAT USB App/form_Software.cs
17,28 → 17,10
private static List<Process> toInstall = new List<Process>();
private static List<CheckBox> formCheckBoxes = new List<CheckBox>();
private static List<RadioButton> formRadioButton = new List<RadioButton>();
private static form_Software _software_Form = null;
public static form_Software software_Form_Instance
{
set
{
_software_Form = value;
}
get
{
if (_software_Form == null)
_software_Form = new form_Software();
return _software_Form;
}
}
public form_Software()
{
this.Load += new EventHandler(form_Software_Load);
// Draws the form with a checkbox for each software specified in the text file
InitializeComponent();
}
void form_Software_Load(object sender, EventArgs e)
{
try
{
if (SettingsParser.ApplicationsList.Count() == 0)
139,7 → 121,7
catch (Exception ex)
{
DebugText.appendText("Exception Thrown: " + ex.ToString());
MessageBox.Show(e.ToString());
MessageBox.Show(ex.ToString());
}
}
private void updateToInstallList()
237,9 → 219,9
private void btn_Cancel_Click(object sender, EventArgs e)
{
DebugText.appendText("Closing software form");
software_Form_Instance.Close();
this.Close();
}
private void button1_Click(object sender, EventArgs e)
private void btn_Reset_Click(object sender, EventArgs e)
{
for (int i = 0; i < formCheckBoxes.Count(); i++)
formCheckBoxes[i].Checked = false;
/SWAT USB App/trunk/SWAT USB App/obj/x86/Debug/SWAT USB App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/obj/x86/Debug/SWAT USB App.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/obj/x86/Release/SWAT USB App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App/obj/x86/Release/SWAT USB App.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT USB App/trunk/SWAT USB App.suo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream