// timer event void TimeOut(object sender, EventArgs e) { // Update time left in UI LapsedTime += Interval; TimeLeft.Text = "Continuing in: " + ((StartTime - LapsedTime) / 1000) + " seconds"; // if time is up close the dialog if (LapsedTime == StartTime) { _callBack.Function(false, false); this.Close(); } }
/* * Submit Button: * get field information and call the callback to save the data * close dialog when complete */ private void btnSubmit_Click(object sender, EventArgs e) { string name = PkgNameTxtBox.Text.Trim(); string path = FolderPathTxtBox.Text.Trim(); string install = InstallProgTxtBox.Text.Trim(); string uninstall = UninstallProgTxtBox.Text.Trim(); if (_callBack.Function(_oldPackageName, name, path, install, uninstall)) { this.Close(); } }