public void AttachEventHandlers(ModuleRegistry registry) { WebEvents wem = WebEvents.Instance; wem.OnLoadRequestedPath += new WebEvents.RequestedPathEventHandler(OnLoadRequestedPath); OnAdminRequest += new AdminRequestHandler(WebsiteAdmin_OnAdminRequest); }
public void AttachEventHandlers(ModuleRegistry registry) { AdminHandler.Instance.OnLoadAdminPage += new AdminHandler.AdminRequestHandler(AdminHandler_OnLoadAdminPage); WebEvents.AddFormProcessor(new WebEvents.FormPostAction(null, null, "page-edit-button", "Save Page", SavePage)); WebEvents.Instance.OnLoadRequestedPath += new WebEvents.RequestedPathEventHandler(WebEvents_OnLoadRequestedPath); AdminHandler.AddPagePreprocessor("PageEdit", PreEditPage); }
private static void Main() { if (!Program.AdminRelauncher()) { return; } string[] directories = Directory.GetDirectories(Application.StartupPath + "\\d2bs\\", "*bot"); if (directories.Length != 0) { Program.BOT_LIB = directories[0]; } else { int num1 = (int)MessageBox.Show("D2BS Folder is missing botting library! Add a botting lib!"); } Program.UPDATE = Update.CheckForUpdate(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); int num2 = (int)Kernel32.SetErrorMode(Kernel32.ErrorModes.SEM_NOGPFAULTERRORBOX); Program.GM = new Main(); Program.GM.LoadList(); try { Program.LoadProfile("\\data\\profile.json"); if (Settings.Default.Start_Server) { WebEvents.InitEvents(); if (Program.WC != null) { Program.WS = new WebServer(Application.StartupPath + Program.WC.path, Program.WC.ip, Program.WC.port); Program.WS.Start(); } } if (Program.IsValidURL("http://google-analytics.com")) { Program.GA = true; } Application.Run((Form)Program.GM); } catch (Exception ex) { Program.LogCrash(ex, "", true); Program.GM.Main_Close((object)null, (FormClosingEventArgs)null); Application.Exit(); } finally { if (Program.WC != null && Program.WS != null) { Program.WS.Stop(); } } }
public void AttachEventHandlers(ModuleRegistry registry) { getWebsiteName = GetDefaultWebsiteName; Core.Instance.OnInitialiseComplete += new EmptyHandler(LoadDefinitionFiles); WebEvents.Instance.OnBeginHttpRequest += new WebEvents.HttpApplicationCancellableEventHandler(WebEvents_OnBeginHttpRequest); WebEvents.Instance.OnLoadRequestedPath += new WebEvents.RequestedPathEventHandler(WebEvents_OnLoadRequestedPath); WebEvents.Instance.OnRequestedPathProcessed += new WebEvents.HttpApplicationEventHandler(WebEvents_OnRequestedPathProcessed); WebEvents.Instance.OnEndHttpRequest += new WebEvents.HttpApplicationEventHandler(WebEvents_OnEndHttpRequest); AddPagePreprocessor("Login", PreProcessLoginPage); AddPagePreprocessor("Logout", PreProcessLogout); WebEvents.AddFormProcessor(new WebEvents.FormPostAction("admin/login", null, null, null, ProcessLoginForm)); }
public void AttachEventHandlers(ModuleRegistry registry) { WebEvents w = (WebEvents)SystemCore.Instance["WebEvents"]; w.OnLoadRequestedPath += new WebEvents.RequestedPathEventHandler(OnLoadRequestedPath); }