added tool tips to certain controls, and comments
This commit is contained in:
parent
386ebbae38
commit
cf657b0919
1 changed files with 16 additions and 4 deletions
|
@ -16,14 +16,27 @@ namespace Saviour_Backup_System
|
|||
public backupViewer() {
|
||||
InitializeComponent();
|
||||
}
|
||||
private void assignToolTips()
|
||||
{
|
||||
ToolTip tempTip = new ToolTip();
|
||||
tempTip.AutoPopDelay = 5000;
|
||||
tempTip.InitialDelay = 1000;
|
||||
tempTip.ReshowDelay = 500;
|
||||
tempTip.ShowAlways = true;
|
||||
|
||||
private void button1_Click(object sender, EventArgs e) {
|
||||
//huge list of tooltips to use!
|
||||
tempTip.SetToolTip(this.addBackup, "Add a Backup\nAdd a drive for backup.");
|
||||
tempTip.SetToolTip(this.deleteButton, "Delete Backup\nDelete the selected backup.");
|
||||
tempTip.SetToolTip(this.editButton, "Edit Backup\nEdit the selected backup record");
|
||||
tempTip.SetToolTip(this.refreshButton, "Refresh List\nRefresh the list of backups.");
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e) { //refresh button
|
||||
DataTable table = databaseTools.getAllDriveBackups();
|
||||
for (int i = 0; i > table.Rows.Count; i++) {
|
||||
table.Rows[i].SetField(1, tools.unixDateTime( (long)table.Rows[i][1] ).ToString()); //convert time to better format
|
||||
table.Rows[i].SetField(4, ((float)table.Rows[i][1] * 1024f * 1024f).ToString() + " MB"); //format to megabytes
|
||||
}
|
||||
|
||||
//modify column titles to make more user friendly than SQL headers
|
||||
table.Columns[0].ColumnName = "Backup Name";
|
||||
table.Columns[1].ColumnName = "Creation Date";
|
||||
table.Columns[2].ColumnName = "Backup Location";
|
||||
|
@ -34,12 +47,11 @@ namespace Saviour_Backup_System
|
|||
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e){ dataGridView.SelectAll(); }
|
||||
|
||||
public void passBack(string backupName, string BackupLocation, bool automatic, bool compression, int previousBackups)
|
||||
{
|
||||
databaseTools.updateDriveRecord(backupName, BackupLocation, automatic, compression, previousBackups, selectedDriveCreationDate);
|
||||
setup.ABW.Close();
|
||||
MessageBox.Show("Backup Record has been updated!", "Record Updated", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
|
|
Reference in a new issue