本文整理汇总了C#中SobekCM.Library.Navigation.SobekCM_Navigation_Object.URL_Options方法的典型用法代码示例。如果您正苦于以下问题:C# SobekCM_Navigation_Object.URL_Options方法的具体用法?C# SobekCM_Navigation_Object.URL_Options怎么用?C# SobekCM_Navigation_Object.URL_Options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SobekCM.Library.Navigation.SobekCM_Navigation_Object
的用法示例。
在下文中一共展示了SobekCM_Navigation_Object.URL_Options方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get_Simple_Web_Content_Text
//.........这里部分代码省略.........
{
char_index++;
while ((file_end < 0) && (char_index < possible_file_name.Length))
{
if ((possible_file_name[char_index] == '"') || (possible_file_name[char_index] == ' ') || (possible_file_name[char_index] == '%'))
{
file_end = char_index;
}
else
{
char_index++;
}
}
}
// Get the filename
if ((file_start > 0) && (file_end > 0))
{
filename_to_include = possible_file_name.Substring(file_start, file_end - file_start);
}
}
// Remove the include and either place in the text from the indicated file,
// or just remove
if ((filename_to_include.Length > 0 ) && (File.Exists(SobekCM_Library_Settings.Base_Directory + "design\\webcontent\\" + filename_to_include)))
{
// Define the value for the include text
string include_text;
// Look in the cache for this
object returnValue = HttpContext.Current.Cache.Get("INCLUDE_" + filename_to_include );
if (returnValue != null)
{
include_text = returnValue.ToString();
}
else
{
try
{
// Pull from the file
StreamReader reader = new StreamReader(SobekCM_Library_Settings.Base_Directory + "design\\webcontent\\" + filename_to_include);
include_text = reader.ReadToEnd();
reader.Close();
// Store on the cache for two minutes, if no indication not to
if ( include_statement_upper.IndexOf("NOCACHE") < 0 )
HttpContext.Current.Cache.Insert("INCLUDE_" + filename_to_include, include_text, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(2));
}
catch(Exception)
{
include_text = "Unable to read the soruce file ( " + filename_to_include + " )";
}
}
// Replace the text with the include file
Simple_Web_Content.Static_Text = Simple_Web_Content.Static_Text.Replace(include_statement, include_text);
include_index = Simple_Web_Content.Static_Text.IndexOf("<%INCLUDE", include_index + include_text.Length - 1 );
}
else
{
// No suitable name was found, or it doesn't exist so just remove the INCLUDE completely
Simple_Web_Content.Static_Text = Simple_Web_Content.Static_Text.Replace(include_statement, "");
include_index = Simple_Web_Content.Static_Text.IndexOf("<%INCLUDE", include_index );
}
}
// Look for a site map
if (Simple_Web_Content.SiteMap.Length > 0)
{
// Look in the cache first
Site_Map = Cached_Data_Manager.Retrieve_Site_Map(Simple_Web_Content.SiteMap, Tracer);
// If this was NULL, pull it
if (Site_Map == null)
{
// Only continue if the file exists
if (File.Exists(SobekCM_Library_Settings.Base_Directory + "design\\webcontent\\" + Simple_Web_Content.SiteMap))
{
if (Tracer != null)
{
Tracer.Add_Trace("SobekCM_Assistant.Get_Simple_Web_Content_Text", "Reading site map file");
}
// Try to read this sitemap file
Site_Map = SobekCM_SiteMap_Reader.Read_SiteMap_File(SobekCM_Library_Settings.Base_Directory + "design\\webcontent\\" + Simple_Web_Content.SiteMap);
// If the sitemap file was succesfully read, cache it
if (Site_Map != null)
{
Cached_Data_Manager.Store_Site_Map(Site_Map, Simple_Web_Content.SiteMap, Tracer);
}
}
}
}
// Since this is not cached, we can apply the individual user settings to the static text which was read right here
Simple_Web_Content.Static_Text = Simple_Web_Content.Apply_Settings_To_Static_Text(Simple_Web_Content.Static_Text, null, Current_Mode.Skin, Current_Mode.Base_Skin, Current_Mode.Base_URL, Current_Mode.URL_Options(), Tracer);
return true;
}
示例2: Add_Banner
/// <summary> Adds the banner to the response stream from either the html web skin
/// or from the current item aggreagtion object, depending on flags in the web skin object </summary>
/// <param name="Output"> Stream to which to write the HTML for the banner </param>
/// <param name="Banner_Division_Name"> Name for the wrapper division around the banner </param>
/// <param name="Hierarchy_Object"> Current item aggregation object to display </param>
/// <param name="HTML_Skin"> HTML Web skin which controls the overall appearance of this digital library </param>
/// <param name="CurrentMode"> Mode / navigation information for the current request</param>
/// <remarks> This is called by several html subwriters that otherwise tell this class to suppress writing the banner </remarks>
public static void Add_Banner(TextWriter Output, string Banner_Division_Name, SobekCM_Navigation_Object CurrentMode, SobekCM_Skin_Object HTML_Skin, Item_Aggregation Hierarchy_Object)
{
Output.WriteLine("<!-- Write the main collection, interface, or institution banner -->");
if ((HTML_Skin != null) && (HTML_Skin.Override_Banner))
{
Output.WriteLine(HTML_Skin.Banner_HTML);
}
else
{
string url_options = CurrentMode.URL_Options();
if (url_options.Length > 0)
url_options = "?" + url_options;
if ((Hierarchy_Object != null) && (Hierarchy_Object.Code != "all"))
{
Output.WriteLine("<div id=\"sbkAhs_BannerDiv\"><a alt=\"" + Hierarchy_Object.ShortName + "\" href=\"" + CurrentMode.Base_URL + Hierarchy_Object.Code + url_options + "\"><img id=\"mainBanner\" src=\"" + CurrentMode.Base_URL + Hierarchy_Object.Banner_Image(CurrentMode.Language, HTML_Skin) + "\" alt=\"\" /></a></div>");
}
else
{
if ((Hierarchy_Object != null) && (Hierarchy_Object.Banner_Image(CurrentMode.Language, HTML_Skin).Length > 0))
{
Output.WriteLine("<div id=\"sbkAhs_BannerDiv\"><a href=\"" + CurrentMode.Base_URL + url_options + "\"><img id=\"mainBanner\" src=\"" + CurrentMode.Base_URL + Hierarchy_Object.Banner_Image(CurrentMode.Language, HTML_Skin) + "\" alt=\"\" /></a></div>");
}
else
{
string skin_url = CurrentMode.Base_Design_URL + "skins/" + CurrentMode.Skin + "/";
Output.WriteLine("<div id=\"sbkAhs_BannerDiv\"><a href=\"" + CurrentMode.Base_URL + url_options + "\"><img id=\"mainBanner\" src=\"" + skin_url + "default.jpg\" alt=\"\" /></a></div>");
}
}
}
Output.WriteLine();
}