private void UnlockFile() { try { string FileSecureAssembly = ConfigurationSettings.AppSettings["FileSecure"]; ISecureFile SecureFile = new InstantiateElement().CreateNewInstance(FileSecureAssembly) as ISecureFile; SecureFile.UnlockFile(EntityName, UnlockDest, UnlockPassword); IProcess ProcessObject = new InstantiateElement().CreateNewInstance(ConfigurationSettings.AppSettings["ProcessNamespace"], UnlockDest) as IProcess; ProcessObject.RunProcess(); } catch (Exception UnlockException) { new RemoveTemporaryFiles().Remove(); MessageBox.Show(EntType.ToString() + " unlocking failed as a result of the following exception : " + UnlockException.Message, EntType.ToString() + " unlocking failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.Invoke(Quit); }
private void emailLabel_Click(object sender, EventArgs e) { IProcess SendMail = new InstantiateElement().CreateNewInstance(ConfigurationSettings.AppSettings["ProcessNamespace"], "mailto:[email protected]") as IProcess; SendMail.RunProcess(); }