public Add_Child_Page ( Item_Aggregation_Child_Visibility_Enum Browse_Type, string Browse_Code, string StaticHtmlSource, string Text ) : |
||
Browse_Type | Item_Aggregation_Child_Visibility_Enum | Flag indicates if this is a BROWSE or INFO object |
Browse_Code | string | SubMode indicator for this object |
StaticHtmlSource | string | Any static HTML source to be used for display |
Text | string | Text to display for this browse |
Результат |
public Complete_Item_Aggregation_Child_Page Add_Child_Page(Item_Aggregation_Child_Visibility_Enum Browse_Type, string Browse_Code, string StaticHtmlSource, string Text)
{
// Create the new Browse_Info object
Complete_Item_Aggregation_Child_Page childPage = new Complete_Item_Aggregation_Child_Page(Browse_Type, Item_Aggregation_Child_Source_Data_Enum.Database_Table, Browse_Code, StaticHtmlSource, Text);
if (Child_Pages == null)
Child_Pages = new List<Complete_Item_Aggregation_Child_Page>();
// Add this to the Hash table
Child_Pages.Add(childPage);
childPagesHash[Browse_Code.ToUpper()] = childPage;
return childPage;
}
Complete_Item_Aggregation::Add_Child_Page ( |
/// <summary> Checks the appropriate design folders to add any existing browse or info pages to the item aggregation </summary> /// <param name="ThisObject"> Item aggregation object to add the browse and info pages to</param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering</param> /// <remarks>This method is only called if the item aggregation does not have an existing XML configuration file.</remarks> protected static void Add_Browse_Files(Complete_Item_Aggregation ThisObject, Custom_Tracer Tracer) { // Collect the list of items in the browse folder if (Directory.Exists(Engine_ApplicationCache_Gateway.Settings.Servers.Base_Design_Location + ThisObject.ObjDirectory + "html/browse")) { string[] files = Directory.GetFiles(Engine_ApplicationCache_Gateway.Settings.Servers.Base_Design_Location + ThisObject.ObjDirectory + "html/browse", "*.htm*"); foreach (string thisFile in files) { // Get the new browse info object Complete_Item_Aggregation_Child_Page newBrowse = Get_Item_Aggregation_Browse_Info(thisFile, Item_Aggregation_Child_Visibility_Enum.Main_Menu, Tracer); if (newBrowse != null) { ThisObject.Add_Child_Page(newBrowse); } } } // Collect the list of items in the info folder if (Directory.Exists(Engine_ApplicationCache_Gateway.Settings.Servers.Base_Design_Location + ThisObject.ObjDirectory + "html/info")) { string[] files = Directory.GetFiles(Engine_ApplicationCache_Gateway.Settings.Servers.Base_Design_Location + ThisObject.ObjDirectory + "html/info", "*.htm*"); foreach (string thisFile in files) { // Get the title for this file // Get the new browse info object Complete_Item_Aggregation_Child_Page newInfo = Get_Item_Aggregation_Browse_Info(thisFile, Item_Aggregation_Child_Visibility_Enum.None, Tracer); if (newInfo != null) { ThisObject.Add_Child_Page(newInfo); } } } }