public void InstallPlugin(string filepath) { try { string ErrorText = string.Empty; InstallPlugin pi = new InstallPlugin(filepath); pi.ShowDialog(); if (pi.install) { if (!InstallPlugin(filepath, ref ErrorText)) { MessageBox.Show("Package was not successfully installed."); } else if (!string.IsNullOrEmpty(ErrorText)) { MessageBox.Show("Package installed."); } else { MessageBox.Show("Package installed."); } } } catch (Exception ex) { MessageBox.Show("Error installing plugin: " + ex.Message); } }
public static void InstallPlugin(string filepath) { string ErrorText = string.Empty; InstallPlugin pi = new InstallPlugin(filepath); pi.ShowDialog(); if (pi.install) { if (!InstallPlugin(filepath, ref ErrorText)) { MessageBox.Show("Package was not successfully installed."); } else if (!string.IsNullOrEmpty(ErrorText)) { MessageBox.Show("Package installed."); } else { MessageBox.Show("Package installed."); } } }