Ejemplo n.º 1
0
        /// <summary> Stream to which to write the HTML for this subwriter  </summary>
        /// <param name="Output"> Response stream for the item viewer to write directly to </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("Feature_ItemViewer.Write_Main_Viewer_Section", "");
            }

            // Save the current viewer code
            string current_view_code = CurrentMode.ViewerCode;

            // Start the citation table
            Output.WriteLine("\t\t<!-- FEATURE VIEWER OUTPUT -->");
            Output.WriteLine("\t\t<td align=\"left\" height=\"40px\" ><span class=\"SobekViewerTitle\"><b>Index of Features</b></span></td></tr>");
            Output.WriteLine("\t\t<tr><td class=\"SobekDocumentDisplay\">");
            Output.WriteLine("\t\t\t<div class=\"SobekCitation\">");

            // Get the list of streets from the database
            Map_Features_DataSet features = SobekCM_Database.Get_All_Features_By_Item(CurrentItem.Web.ItemID, Tracer);

            Create_Feature_Index(Output, features);

            // Finish the citation table
            Output.WriteLine("\t\t\t</div>");
            Output.WriteLine("\t\t</td>");
            Output.WriteLine("\t\t<!-- END FEATURE VIEWER OUTPUT -->");

            // Restore the mode
            CurrentMode.ViewerCode = current_view_code;
        }
        /// <summary> Adds the main view section to the page turner </summary>
        /// <param name="placeHolder"> Main place holder ( &quot;mainPlaceHolder&quot; ) in the itemNavForm form into which the the bulk of the item viewer's output is displayed</param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        public override void Add_Main_Viewer_Section(PlaceHolder placeHolder, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("Feature_ItemViewer.Add_Main_Viewer_Section", "Adds one literal with all the html");
            }

            // Build the value
            StringBuilder builder = new StringBuilder(5000);

            // Save the current viewer code
            string current_view_code = CurrentMode.ViewerCode;

            // Start the citation table
            builder.AppendLine("\t\t<!-- FEATURE VIEWER OUTPUT -->");
            builder.AppendLine("\t\t<td align=\"left\" height=\"40px\" ><span class=\"SobekViewerTitle\"><b>Index of Features</b></span></td></tr>");
            builder.AppendLine("\t\t<tr><td class=\"SobekDocumentDisplay\">");
            builder.AppendLine("\t\t\t<div class=\"SobekCitation\">");

            // Get the list of streets from the database
            Map_Features_DataSet features = SobekCM_Database.Get_All_Features_By_Item(CurrentItem.Web.ItemID, Tracer);

            Create_Feature_Index(builder, features);

            // Finish the citation table
            builder.AppendLine("\t\t\t</div>");
            builder.AppendLine("\t\t</td>");
            builder.AppendLine("\t\t<!-- END FEATURE VIEWER OUTPUT -->");

            // Restore the mode
            CurrentMode.ViewerCode = current_view_code;

            // Add the HTML for the image
            Literal mainLiteral = new Literal {
                Text = builder.ToString()
            };

            placeHolder.Controls.Add(mainLiteral);
        }