/// <summary> Writes final HTML after all the forms </summary> /// <param name="Output">Stream to directly write to</param> /// <param name="Tracer">Trace object keeps a list of each method executed and important milestones in rendering</param> public override void Write_Final_HTML(TextWriter Output, Custom_Tracer Tracer) { if (!Subwriter_Behaviors.Contains(HtmlSubwriter_Behaviors_Enum.MySobek_Subwriter_Mimic_Item_Subwriter)) { Output.WriteLine("<!-- Close the pagecontainer div -->"); Output.WriteLine("</div>"); Output.WriteLine(); } }
/// <summary> Writes the HTML generated by this my sobek html subwriter directly to the response stream </summary> /// <param name="Output"> Stream to which to write the HTML for this subwriter </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns> public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer) { Tracer.Add_Trace("MySobek_HtmlSubwriter.Write_HTML", "Rendering HTML"); if ((HttpContext.Current.Session["agreement_date"] == null) && (RequestSpecificValues.Current_Mode.My_Sobek_Type == My_Sobek_Type_Enum.New_Item) && ((RequestSpecificValues.Current_Mode.My_Sobek_SubMode.Length == 0) || (RequestSpecificValues.Current_Mode.My_Sobek_SubMode[0] != '1'))) { RequestSpecificValues.Current_Mode.My_Sobek_SubMode = "1"; } // A few cases skip the view selectors at the top entirely if (mySobekViewer.Standard_Navigation_Type == MySobek_Admin_Included_Navigation_Enum.Standard) { // Add the user-specific main menu MainMenus_Helper_HtmlSubWriter.Add_UserSpecific_Main_Menu(Output, RequestSpecificValues); // Start the page container Output.WriteLine("<div id=\"pagecontainer\">"); Output.WriteLine("<br />"); } else if (mySobekViewer.Standard_Navigation_Type == MySobek_Admin_Included_Navigation_Enum.LogOn) { // Add the item views Output.WriteLine("<!-- Add the main user-specific menu -->"); Output.WriteLine("<div id=\"sbkUsm_MenuBar\" class=\"sbkMenu_Bar\">"); Output.WriteLine("<ul class=\"sf-menu\">"); // Get ready to draw the tabs string sobek_home_text = RequestSpecificValues.Current_Mode.Instance_Abbreviation + " Home"; // Add the 'SOBEK HOME' first menu option and suboptions RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home; RequestSpecificValues.Current_Mode.Home_Type = Home_Type_Enum.List; Output.WriteLine("\t\t<li id=\"sbkUsm_Home\" class=\"sbkMenu_Home\"><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\" class=\"sbkMenu_NoPadding\"><img src=\"" + Static_Resources_Gateway.Home_Png + "\" /> <div class=\"sbkMenu_HomeText\">" + sobek_home_text + "</div></a></li>"); Output.WriteLine("\t</ul></div>"); Output.WriteLine("<!-- Initialize the main user menu -->"); Output.WriteLine("<script>"); Output.WriteLine(" jQuery(document).ready(function () {"); Output.WriteLine(" jQuery('ul.sf-menu').superfish();"); Output.WriteLine(" });"); Output.WriteLine("</script>"); Output.WriteLine(); // Restore the current view information type RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.My_Sobek; // Start the page container Output.WriteLine("<div id=\"pagecontainer\">"); Output.WriteLine("<br />"); } else if (!Subwriter_Behaviors.Contains(HtmlSubwriter_Behaviors_Enum.MySobek_Subwriter_Mimic_Item_Subwriter)) { // Start the page container Output.WriteLine("<div id=\"pagecontainer\">"); } // Add the text here mySobekViewer.Write_HTML(Output, Tracer); return(false); }