Subversion Repositories Code-Repo

Compare Revisions

No changes between revisions

Ignore whitespace Rev 62 → Rev 63

/SWAT Office App/trunk/SWAT Office App/Add_Hidden_Account_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class AddHiddenAccount_Form
partial class Add_Hidden_Account_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddHiddenAccount_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Add_Hidden_Account_Form));
this.lbl_Add_Hidden_Account = new System.Windows.Forms.Label();
this.txt_AddHiddenAccount = new System.Windows.Forms.TextBox();
this.btn_Cancel = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Add_Hidden_Account_Form.cs
9,9 → 9,9
 
namespace SWAT_Office_App
{
public partial class AddHiddenAccount_Form : Form
public partial class Add_Hidden_Account_Form : Form
{
public AddHiddenAccount_Form()
public Add_Hidden_Account_Form()
{
InitializeComponent();
this.btn_Ok.Enabled = false;
/SWAT Office App/trunk/SWAT Office App/Add_System_Account_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class AddSystemAccount_Form
partial class Add_System_Account_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddSystemAccount_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Add_System_Account_Form));
this.lbl_Add_System_Account = new System.Windows.Forms.Label();
this.txt_AddSystemAccount = new System.Windows.Forms.TextBox();
this.btn_Cancel = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Add_System_Account_Form.cs
9,9 → 9,9
 
namespace SWAT_Office_App
{
public partial class AddSystemAccount_Form : Form
public partial class Add_System_Account_Form : Form
{
public AddSystemAccount_Form()
public Add_System_Account_Form()
{
InitializeComponent();
this.btn_Ok.Enabled = false;
/SWAT Office App/trunk/SWAT Office App/Add_User_Account_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class AddUserAccount_Form
partial class Add_User_Account_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddUserAccount_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Add_User_Account_Form));
this.btn_Add = new System.Windows.Forms.Button();
this.btn_Cancel = new System.Windows.Forms.Button();
this.txt_Password = new System.Windows.Forms.TextBox();
/SWAT Office App/trunk/SWAT Office App/Add_User_Account_Form.cs
9,19 → 9,19
 
namespace SWAT_Office_App
{
public partial class AddUserAccount_Form : Form
public partial class Add_User_Account_Form : Form
{
private static AddUserAccount_Form AddUserAccount_Instance = null;
private static Add_User_Account_Form _Add_User_Account_Instance = null;
// Modified singleton instance
public static AddUserAccount_Form Add_User_Account_Instance
public static Add_User_Account_Form Add_User_Account_Instance
{
get
{
AddUserAccount_Instance = new AddUserAccount_Form();
return AddUserAccount_Instance;
_Add_User_Account_Instance = new Add_User_Account_Form();
return _Add_User_Account_Instance;
}
}
public AddUserAccount_Form()
public Add_User_Account_Form()
{
InitializeComponent();
 
66,12 → 66,12
}
private void btn_Add_Click(object sender, EventArgs e)
{
if (ManageUserAccounts.AddUser(txt_Username.Text, txt_Password.Text))
if (Manage_User_Accounts.AddUser(txt_Username.Text, txt_Password.Text))
{
if (this.chk_Share.Checked == true)
if (!ManageUserAccounts.CreateShareFolder(txt_Username.Text))
if (!Manage_User_Accounts.CreateShareFolder(txt_Username.Text))
{
DebugText.appendText("Error occured while creating shared folder");
Debug.appendText("Error occured while creating shared folder");
MessageBox.Show("Error occured when creating shared folder", "Error");
}
this.Close();
78,7 → 78,7
}
else
{
DebugText.appendText("Error occured while creating new user account");
Debug.appendText("Error occured while creating new user account");
MessageBox.Show("Error occured when creating new user account","Error");
resetForm();
}
/SWAT Office App/trunk/SWAT Office App/Delete_User_Verify_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class DeleteUserVerify_Form
partial class Delete_User_Verify_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeleteUserVerify_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Delete_User_Verify_Form));
this.lbl_Prompt1 = new System.Windows.Forms.Label();
this.txt_Password = new System.Windows.Forms.TextBox();
this.btn_Cancel = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Delete_User_Verify_Form.cs
9,10 → 9,10
 
namespace SWAT_Office_App
{
public partial class DeleteUserVerify_Form : Form
public partial class Delete_User_Verify_Form : Form
{
private List<string> selectedUsers = new List<string>();
public DeleteUserVerify_Form(List<string> users)
public Delete_User_Verify_Form(List<string> users)
{
selectedUsers = users;
InitializeComponent();
40,9 → 40,9
}
}
if (error == false)
if (!ManageUserAccounts.DeleteUser(selectedUsers))
if (!Manage_User_Accounts.DeleteUser(selectedUsers))
{
DebugText.appendText("Error occured when trying to delete user");
Debug.appendText("Error occured when trying to delete user");
MessageBox.Show("Error occured when trying to delete user", "Error");
}
this.Close();
/SWAT Office App/trunk/SWAT Office App/DriveLogger_Form.cs
224,7 → 224,7
switch (e.KeyCode)
{
case Keys.OemQuestion:
AboutBox window = new AboutBox();
About_Box_Form window = new About_Box_Form();
window.ShowDialog();
break;
case Keys.F5:
/SWAT Office App/trunk/SWAT Office App/Main_Menu_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class Menu_Main
partial class Menu_Main_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Menu_Main));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Menu_Main_Form));
this.groupBox_Menu1 = new System.Windows.Forms.GroupBox();
this.btn_DriveLogger = new System.Windows.Forms.Button();
this.btn_Settings = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Main_Menu_Form.cs
9,13 → 9,13
 
namespace SWAT_Office_App
{
public partial class Menu_Main : Form
public partial class Menu_Main_Form : Form
{
public Menu_Main()
public Menu_Main_Form()
{
DebugText.startNewSession();
Debug.startNewSession();
Settings_Form.ImportSettings();
StatLogging.ImportSettings();
Stat_Logging.ImportSettings();
InitializeComponent();
this.KeyPress += new KeyPressEventHandler(Menu_Main_KeyPress);
this.FormClosing += new FormClosingEventHandler(Menu_Main_FormClosing);
23,7 → 23,7
 
void Menu_Main_FormClosing(object sender, FormClosingEventArgs e)
{
StatLogging.ExportSettings();
Stat_Logging.ExportSettings();
}
void Menu_Main_KeyPress(object sender, KeyPressEventArgs e)
{
31,7 → 31,7
switch (e.KeyChar)
{
case '1': // Manage User Accounts and Shares
ManageUserAccounts_Form user_Mgmt = new ManageUserAccounts_Form();
Manage_User_Accounts_Form user_Mgmt = new Manage_User_Accounts_Form();
user_Mgmt.ShowDialog();
break;
case '2': // DriveLogger
38,7 → 38,7
// Check to make sure that an instance of DriveLogger isnt already running
if (!DriveLogger_Form.instanceAlreadyRunning)
{
DebugText.appendText("Starting instance of DriveLogger");
Debug.appendText("Starting instance of DriveLogger");
DriveLogger_Form driveForm = new DriveLogger_Form();
driveForm.Show();
}
51,7 → 51,7
// Check to make sure that another imaging thread isnt running
if (!Reimage_USB_Drives.threadsRunning)
{
DebugText.appendText("Starting reimaging of USB drives");
Debug.appendText("Starting reimaging of USB drives");
Reimage_USB_Drives.reimageUSBDrives();
}
else
59,11 → 59,11
"Please wait for transfer to finish before starting another");
break;
case '4': // Program Settings
SettingsVerify_Form settingsForm = new SettingsVerify_Form();
Settings_Verify_Form settingsForm = new Settings_Verify_Form();
settingsForm.ShowDialog();
break;
case '?': // About
AboutBox aboutForm = new AboutBox();
About_Box_Form aboutForm = new About_Box_Form();
aboutForm.ShowDialog();
break;
}
71,7 → 71,7
private void btn_Main_UserMgmt_Click(object sender, EventArgs e)
{
// Manage User Accounts and Shares
ManageUserAccounts_Form userMgmtForm = new ManageUserAccounts_Form();
Manage_User_Accounts_Form userMgmtForm = new Manage_User_Accounts_Form();
userMgmtForm.ShowDialog();
}
private void btn_DriveLogger_Click(object sender, EventArgs e)
79,7 → 79,7
// DriveLogger
if (!DriveLogger_Form.instanceAlreadyRunning)
{
DebugText.appendText("Starting instance of DriveLogger");
Debug.appendText("Starting instance of DriveLogger");
DriveLogger_Form driveForm = new DriveLogger_Form();
driveForm.Show();
}
91,7 → 91,7
// Reimage USB Drives
if (!Reimage_USB_Drives.threadsRunning)
{
DebugText.appendText("Starting reimaging of USB drives");
Debug.appendText("Starting reimaging of USB drives");
Reimage_USB_Drives.reimageUSBDrives();
}
else
101,7 → 101,7
private void btn_Main_Settings_Click(object sender, EventArgs e)
{
// Program Settings
SettingsVerify_Form settingsForm = new SettingsVerify_Form();
Settings_Verify_Form settingsForm = new Settings_Verify_Form();
settingsForm.ShowDialog();
}
}
/SWAT Office App/trunk/SWAT Office App/Manage_User_Accounts.cs
10,7 → 10,7
 
namespace SWAT_Office_App
{
class ManageUserAccounts
class Manage_User_Accounts
{
private static string studentGroupName = "StudentAccounts";
public static List<UserPrincipal> UserAccountsList = new List<UserPrincipal>();
56,8 → 56,8
studentGroup.Members.Add(newUser);
studentGroup.Save();
}
DebugText.appendText("Account " + username + " has been created");
StatLogging.AccountsCreated += 1;
Debug.appendText("Account " + username + " has been created");
Stat_Logging.AccountsCreated += 1;
return true;
}
else
69,7 → 69,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
100,7 → 100,7
Principal found = searcher.FindOne();
toDelete = (UserPrincipal)found;
toDelete.Delete();
DebugText.appendText("Account " + user + " has been deleted");
Debug.appendText("Account " + user + " has been deleted");
// Deletes share if selected
if (deleteShare)
if (!DeleteShareFolder(user))
111,7 → 111,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
134,7 → 134,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
160,10 → 160,10
dSecurity.AddAccessRule(new FileSystemAccessRule("\\" + username, FileSystemRights.FullControl, InheritanceFlags.ContainerInherit, PropagationFlags.None, AccessControlType.Allow));
dSecurity.AddAccessRule(new FileSystemAccessRule("\\" + username, FileSystemRights.FullControl, InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow));
Directory.CreateDirectory(Settings_Form.sharedFolderLocation + @"\" + username, dSecurity);
DebugText.appendText("Shared folder for " + username + " has been created");
Debug.appendText("Shared folder for " + username + " has been created");
if (SetSharePermissions(username))
{
StatLogging.SharesCreated += 1;
Stat_Logging.SharesCreated += 1;
return true;
}
else
172,7 → 172,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
186,13 → 186,13
if (!RemoveSharePermissions(username))
Success = false;
Directory.Delete(Settings_Form.sharedFolderLocation + @"\" + username, true);
DebugText.appendText("Shared folder for " + username + " has been deleted");
Debug.appendText("Shared folder for " + username + " has been deleted");
return Success;
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
218,7 → 218,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
254,7 → 254,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return 0;
}
272,13 → 272,13
user = (UserPrincipal)result;
user.SetPassword(password);
user.Save();
DebugText.appendText("Password for " + username + " has been changed");
Debug.appendText("Password for " + username + " has been changed");
return true;
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
309,7 → 309,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return true;
}
333,13 → 333,13
netProcess.Start();
netProcess.WaitForExit();
netProcess.Close();
DebugText.appendText("Share permissions for " + username + " has been set");
Debug.appendText("Share permissions for " + username + " has been set");
return true;
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
357,13 → 357,13
netProcess.Start();
netProcess.WaitForExit();
netProcess.Close();
DebugText.appendText("Share permissions for " + username + " has been removed");
Debug.appendText("Share permissions for " + username + " has been removed");
return true;
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
return false;
}
/SWAT Office App/trunk/SWAT Office App/Manage_User_Accounts_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class ManageUserAccounts_Form
partial class Manage_User_Accounts_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ManageUserAccounts_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Manage_User_Accounts_Form));
this.lst_UserAccounts = new System.Windows.Forms.ListView();
this.btn_Add = new System.Windows.Forms.Button();
this.btn_Delete = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Manage_User_Accounts_Form.cs
10,9 → 10,9
 
namespace SWAT_Office_App
{
public partial class ManageUserAccounts_Form : Form
public partial class Manage_User_Accounts_Form : Form
{
public ManageUserAccounts_Form()
public Manage_User_Accounts_Form()
{
InitializeComponent();
// Designate columns to include in listview for the Manage User Accounts Form
51,7 → 51,7
{
// Function for refreshing/painting the listbox
this.lst_UserAccounts.BeginUpdate();
ManageUserAccounts.QueryUserAccounts();
Manage_User_Accounts.QueryUserAccounts();
 
// Temporary entries in listview
//ListViewItem entry;
71,7 → 71,7
 
this.lst_UserAccounts.Items.Clear();
// Prevents system accounts from showing, depending on settings
foreach (UserPrincipal user in ManageUserAccounts.UserAccountsList)
foreach (UserPrincipal user in Manage_User_Accounts.UserAccountsList)
{
ListViewItem entry = new ListViewItem();
bool remove = false;
87,13 → 87,13
if (remove == false)
{
ListViewItem.ListViewSubItem s_share = new ListViewItem.ListViewSubItem();
if (ManageUserAccounts.QueryUserSharedFolderExist(user.Name))
if (Manage_User_Accounts.QueryUserSharedFolderExist(user.Name))
s_share.Text = "Yes";
else
s_share.Text = "No";
entry.SubItems.Add(s_share);
ListViewItem.ListViewSubItem s_size = new ListViewItem.ListViewSubItem();
long size = ManageUserAccounts.GetShareSize(user.Name);
long size = Manage_User_Accounts.GetShareSize(user.Name);
if ((size / 1073741824) > 0)
s_size.Text = (size / 1073741824).ToString() + " GB";
else
114,7 → 114,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
173,7 → 173,7
private void form_Activated(object sender, EventArgs e)
{
// Refreshes form on form activation
ManageUserAccounts.QueryUserAccounts();
Manage_User_Accounts.QueryUserAccounts();
PaintUserListbox();
}
private void btn_Exit_Click(object sender, EventArgs e)
186,18 → 186,18
}
private void btn_Add_Click(object sender, EventArgs e)
{
AddUserAccount_Form.Add_User_Account_Instance.ShowDialog();
Add_User_Account_Form.Add_User_Account_Instance.ShowDialog();
lst_ValidateAll();
}
private void btn_Delete_Click(object sender, EventArgs e)
{
if (!ManageUserAccounts.SessionsOpen())
if (!Manage_User_Accounts.SessionsOpen())
{
ListView.SelectedListViewItemCollection selectedItems = this.lst_UserAccounts.SelectedItems;
List<string> userList = new List<string>();
foreach (ListViewItem user in selectedItems)
userList.Add(user.Text);
DeleteUserVerify_Form newForm = new DeleteUserVerify_Form(userList);
Delete_User_Verify_Form newForm = new Delete_User_Verify_Form(userList);
newForm.ShowDialog();
}
else
208,7 → 208,7
private void btn_Pass_Click(object sender, EventArgs e)
{
ListView.SelectedListViewItemCollection selectedItems = this.lst_UserAccounts.SelectedItems;
ResetUserPassword_Form newForm = new ResetUserPassword_Form(selectedItems[0].Text);
Reset_User_Password_Form newForm = new Reset_User_Password_Form(selectedItems[0].Text);
newForm.ShowDialog();
 
PaintUserListbox();
217,7 → 217,7
private void btn_Share_Click(object sender, EventArgs e)
{
ListView.SelectedListViewItemCollection selectedItems = this.lst_UserAccounts.SelectedItems;
ToggleUserVerify_Form newForm = new ToggleUserVerify_Form(selectedItems[0].Text);
Toggle_User_Verify_Form newForm = new Toggle_User_Verify_Form(selectedItems[0].Text);
newForm.ShowDialog();
 
PaintUserListbox();
/SWAT Office App/trunk/SWAT Office App/Program.cs
15,7 → 15,7
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Menu_Main());
Application.Run(new Menu_Main_Form());
}
}
}
/SWAT Office App/trunk/SWAT Office App/Reimage_USB_Drive_Progress_Form.cs
55,7 → 55,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
74,7 → 74,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
/SWAT Office App/trunk/SWAT Office App/Reimage_USB_Drives.cs
76,7 → 76,7
bwThread.RunWorkerAsync();
progressForm = new Reimage_USB_Drive_Progress_Form();
progressForm.Show();
DebugText.appendText("Beginning the reimaging of USB Drives");
Debug.appendText("Beginning the reimaging of USB Drives");
}
}
else
92,7 → 92,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
217,7 → 217,7
catch (Exception ex)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(ex.ToString());
Debug.appendText(ex.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
274,7 → 274,7
{
threadsRunning = false;
endTime = DateTime.Now;
DebugText.appendText("Reimaging of USB Drives started at " + startTime.ToShortTimeString() + " and ended at " + endTime.ToShortTimeString());
Debug.appendText("Reimaging of USB Drives started at " + startTime.ToShortTimeString() + " and ended at " + endTime.ToShortTimeString());
MessageBox.Show("Operation was started at " + startTime.ToShortTimeString() + " and ended successfully at " + endTime.ToShortTimeString());
progressForm.closeForm();
}
284,7 → 284,7
if (e.Cancelled)
{
threadsRunning = false;
DebugText.appendText("USB reimaging operation has been cancelled");
Debug.appendText("USB reimaging operation has been cancelled");
MessageBox.Show("Operation was canceled");
progressForm.Close();
}
336,7 → 336,7
catch (Exception ex)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(ex.ToString());
Debug.appendText(ex.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
/SWAT Office App/trunk/SWAT Office App/Reset_User_Password_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class ResetUserPassword_Form
partial class Reset_User_Password_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResetUserPassword_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Reset_User_Password_Form));
this.lbl_Prompt1 = new System.Windows.Forms.Label();
this.txt_Password1 = new System.Windows.Forms.TextBox();
this.btn_Ok = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Reset_User_Password_Form.cs
9,10 → 9,10
 
namespace SWAT_Office_App
{
public partial class ResetUserPassword_Form : Form
public partial class Reset_User_Password_Form : Form
{
private string selectedUsername;
public ResetUserPassword_Form(string selectedUser)
public Reset_User_Password_Form(string selectedUser)
{
selectedUsername = selectedUser;
InitializeComponent();
48,9 → 48,9
}
private void btn_Ok_Click(object sender, EventArgs e)
{
if (!ManageUserAccounts.ChangeUserPassword(selectedUsername, txt_Password2.Text))
if (!Manage_User_Accounts.ChangeUserPassword(selectedUsername, txt_Password2.Text))
{
DebugText.appendText("Error occured while changing password");
Debug.appendText("Error occured while changing password");
MessageBox.Show("Error occured while changing password", "Error");
}
this.Close();
/SWAT Office App/trunk/SWAT Office App/SWAT Office App.csproj
49,7 → 49,7
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>application_osx_terminal.ico</ApplicationIcon>
<ApplicationIcon>Resources\application_osx_terminal.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
65,11 → 65,11
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AboutBox.cs">
<Compile Include="About_Box.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutBox.Designer.cs">
<DependentUpon>AboutBox.cs</DependentUpon>
<Compile Include="About_Box.Designer.cs">
<DependentUpon>About_Box.cs</DependentUpon>
</Compile>
<Compile Include="Add_Hidden_Account_Form.cs">
<SubType>Form</SubType>
89,7 → 89,7
<Compile Include="Add_User_Account_Form.Designer.cs">
<DependentUpon>Add_User_Account_Form.cs</DependentUpon>
</Compile>
<Compile Include="DebugText.cs" />
<Compile Include="Debug.cs" />
<Compile Include="Delete_User_Verify_Form.cs">
<SubType>Form</SubType>
</Compile>
148,7 → 148,7
<Compile Include="Settings_Verify_Form.designer.cs">
<DependentUpon>Settings_Verify_Form.cs</DependentUpon>
</Compile>
<Compile Include="StatLogging.cs" />
<Compile Include="Stat_Logging.cs" />
<Compile Include="Toggle_User_Verify_Form.cs">
<SubType>Form</SubType>
</Compile>
155,8 → 155,8
<Compile Include="Toggle_User_Verify_Form.designer.cs">
<DependentUpon>Toggle_User_Verify_Form.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
<EmbeddedResource Include="About_Box.resx">
<DependentUpon>About_Box.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Add_Hidden_Account_Form.resx">
<DependentUpon>Add_Hidden_Account_Form.cs</DependentUpon>
218,7 → 218,7
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="application_osx_terminal.ico" />
<Content Include="Resources\application_osx_terminal.ico" />
<None Include="Resources\Refresh.png" />
</ItemGroup>
<ItemGroup>
/SWAT Office App/trunk/SWAT Office App/Settings_Form.cs
107,12 → 107,12
sharedFolderLocation = Settings.Element("ProgramSettings").Element("SharedFolderLocation").Value;
usbMasterx32CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx32Location").Value;
usbMasterx64CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx64Location").Value;
DebugText.appendText("Settings from " + settingsLogLocation + " has been imported");
Debug.appendText("Settings from " + settingsLogLocation + " has been imported");
}
else
{
MessageBox.Show("No existing setting file detected. Using default settings");
DebugText.appendText("No existing setting file detected. Using default settings");
Debug.appendText("No existing setting file detected. Using default settings");
WriteDefaultConfigFile();
}
}
119,7 → 119,7
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
165,12 → 165,12
Settings.Element("ProgramSettings").SetElementValue("USBMasterCopyx64Location", usbMasterx64CopyLocation);
 
Settings.Save("Settings.xml");
DebugText.appendText("Settings has been exported to " + settingsLogLocation);
Debug.appendText("Settings has been exported to " + settingsLogLocation);
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
193,12 → 193,12
)
);
Settings.Save(settingsLogLocation);
DebugText.appendText("A default settings file has been created");
Debug.appendText("A default settings file has been created");
}
catch (Exception e)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(e.ToString());
Debug.appendText(e.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
238,13 → 238,13
catch (Exception ex)
{
//MessageBox.Show(e.ToString(), "Error");
DebugText.appendText(ex.ToString());
Debug.appendText(ex.ToString());
MessageBox.Show("An error has occured. Please notify a supervisor to debug.", "Error");
}
}
private void btn_SystemAdd_Click(object sender, EventArgs e)
{
AddSystemAccount_Form newForm = new AddSystemAccount_Form();
Add_System_Account_Form newForm = new Add_System_Account_Form();
newForm.ShowDialog();
PaintListBox();
}
255,7 → 255,7
}
private void btn_HiddenAdd_Click(object sender, EventArgs e)
{
AddHiddenAccount_Form newForm = new AddHiddenAccount_Form();
Add_Hidden_Account_Form newForm = new Add_Hidden_Account_Form();
newForm.ShowDialog();
PaintListBox();
}
/SWAT Office App/trunk/SWAT Office App/Settings_Verify_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class SettingsVerify_Form
partial class Settings_Verify_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsVerify_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings_Verify_Form));
this.lbl_Prompt1 = new System.Windows.Forms.Label();
this.txt_Password = new System.Windows.Forms.TextBox();
this.btn_Cancel = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Settings_Verify_Form.cs
9,9 → 9,9
 
namespace SWAT_Office_App
{
public partial class SettingsVerify_Form : Form
public partial class Settings_Verify_Form : Form
{
public SettingsVerify_Form()
public Settings_Verify_Form()
{
InitializeComponent();
this.txt_Password.Focus();
/SWAT Office App/trunk/SWAT Office App/Toggle_User_Verify_Form.Designer.cs
1,6 → 1,6
namespace SWAT_Office_App
{
partial class ToggleUserVerify_Form
partial class Toggle_User_Verify_Form
{
/// <summary>
/// Required designer variable.
28,7 → 28,7
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ToggleUserVerify_Form));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Toggle_User_Verify_Form));
this.lbl_Prompt1 = new System.Windows.Forms.Label();
this.txt_Password = new System.Windows.Forms.TextBox();
this.btn_Cancel = new System.Windows.Forms.Button();
/SWAT Office App/trunk/SWAT Office App/Toggle_User_Verify_Form.cs
9,10 → 9,10
 
namespace SWAT_Office_App
{
public partial class ToggleUserVerify_Form : Form
public partial class Toggle_User_Verify_Form : Form
{
private string selectedUser;
public ToggleUserVerify_Form(string user)
public Toggle_User_Verify_Form(string user)
{
selectedUser = user;
InitializeComponent();
26,9 → 26,9
TextBox tb = (TextBox)sender;
if (tb.Text == Settings_Form.globalAdminPassword)
{
if (!ManageUserAccounts.ToggleShare(selectedUser))
if (!Manage_User_Accounts.ToggleShare(selectedUser))
{
DebugText.appendText("Error in toggling share");
Debug.appendText("Error in toggling share");
MessageBox.Show("Error in toggling share", "Error");
}
this.Close();
/SWAT Office App/trunk/SWAT Office App/bin/Debug/DriveLogger Log.txt
1,2 → 1,4
-- New Session Started --
Initializing form details
-- New Session Started --
Initializing form details
/SWAT Office App/trunk/SWAT Office App/bin/Debug/SWAT Office App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT Office App/trunk/SWAT Office App/bin/Debug/StatusLog.txt
139,3 → 139,14
[Saturday, June 18, 2011 | 12:24:04 PM] -- Account E has been deleted
-- New Session --
-- New Session --
-- New Session --
[Saturday, August 06, 2011 | 3:20:42 PM] -- Settings from Settings.xml has been imported
[Saturday, August 06, 2011 | 3:20:42 PM] -- Stats from StatLog.xml has been imported
[Saturday, August 06, 2011 | 3:20:46 PM] -- Stats has been exported to StatLog.xml
-- New Session --
[Saturday, August 06, 2011 | 3:29:46 PM] -- Settings from Settings.xml has been imported
[Saturday, August 06, 2011 | 3:29:46 PM] -- Stats from StatLog.xml has been imported
[Saturday, August 06, 2011 | 3:29:53 PM] -- Settings from Settings.xml has been imported
[Saturday, August 06, 2011 | 3:29:55 PM] -- Starting reimaging of USB drives
[Saturday, August 06, 2011 | 3:29:57 PM] -- Starting instance of DriveLogger
[Saturday, August 06, 2011 | 3:29:59 PM] -- Stats has been exported to StatLog.xml
/SWAT Office App/trunk/SWAT Office App/bin/Release/SWAT Office App.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/SWAT Office App/trunk/SWAT Office App.suo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream