public void InstallPlugin(string filepath)
        {
            try
            {
                string ErrorText = string.Empty;

                InstallUserControl pi = new InstallUserControl(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 user control: " + ex.Message);
            }
        }
        public void InstallPlugin(string filepath)
        {
            try
            {
                string ErrorText = string.Empty;

                InstallUserControl pi = new InstallUserControl(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 user control: " + ex.Message); }
        }