Beispiel #1
0
        public static void RunEventScripts(GitModuleForm form, ScriptEvent scriptEvent)
        {
            foreach (ScriptInfo scriptInfo in GetScripts())
                if (scriptInfo.Enabled && scriptInfo.OnEvent == scriptEvent)
                {
                    if (scriptInfo.AskConfirmation)
                        if (MessageBox.Show(form, String.Format("Do you want to execute '{0}'?", scriptInfo.Name), "Script", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                            continue;

                    ScriptRunner.RunScript(form, form.Module, scriptInfo.Name, null);
                }
        }