本文整理汇总了C#中UrlString类的典型用法代码示例。如果您正苦于以下问题:C# UrlString类的具体用法?C# UrlString怎么用?C# UrlString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UrlString类属于命名空间,在下文中一共展示了UrlString类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Execute
/// <summary>
/// Add a new Content Editor Tab to Content Editor so that users can search for hidden content
/// </summary>
/// <param name="context">Context of Call</param>
public override void Execute(CommandContext context)
{
Assert.ArgumentNotNull(context, "context");
if (context.Items.Length == 1)
{
var itemId = context.Parameters[0];
if (WebUtil.GetFormValue("scEditorTabs").Contains("contenteditor:launchtab") && WebUtil.GetFormValue("scEditorTabs").Contains(itemId))
{
SheerResponse.Eval("scContent.onEditorTabClick(null, null, '" + itemId + "')");
}
else
{
var urlString = new UrlString("/sitecore/shell/sitecore/content/Applications/Content%20Editor.aspx");
urlString.Add(Util.Constants.OpenItemEditorQueryStringKeyName, itemId);
TrackOpenTab(context);
context.Items[0].Uri.AddToUrlString(urlString);
UIUtil.AddContentDatabaseParameter(urlString);
urlString.Add(Util.Constants.ModeQueryStringKeyName, "preview");
urlString.Add(Util.Constants.RibbonQueryStringKeyName, "{D3A2D76F-02E6-49DE-BE90-D23C9771DC8D}");
var language = context.Parameters["la"].IsNull() ? Sitecore.Context.Language.CultureInfo.TwoLetterISOLanguageName : context.Parameters["la"];
urlString.Add("la", language);
AddLatestVersionToUrlString(urlString, itemId, language);
SheerResponse.Eval(new ShowEditorTab { Command = "contenteditor:launchtab", Header = Translate.Text(Context.ContentDatabase.GetItem(itemId).Name), Icon = Images.GetThemedImageSource("Applications/16x16/text_view.png"), Url = urlString.ToString(), Id = itemId, Closeable = true, Activate = Util.Constants.SettingsItem.Fields[Util.Constants.OpenSearchResult].Value == "New Tab Not Selected" ? false : true }.ToString());
}
}
}
开发者ID:katebutenko,项目名称:Sitecore-Item-Buckets,代码行数:30,代码来源:AddTab.cs
示例2: Edit
public void Edit(ClientPipelineArgs args)
{
if (args.IsPostBack)
{
if (!args.HasResult)
return;
Value = args.Result;
SetModified();
SheerResponse.Refresh(this);
}
else
{
Assert.IsNotNull(DialogUrl, "Dialog URL");
var urlString = new UrlString(UIUtil.GetUri(DialogUrl));
var itemUri = new ItemUri(ItemId, Sitecore.Configuration.Factory.GetDatabase("master"));
var fieldItem = Sitecore.Context.ContentDatabase.GetItem(FieldId);
urlString["itemUri"] = itemUri.ToString();
urlString["fieldName"] = fieldItem.Name;
Sitecore.Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "650px", "700px", string.Empty, true);
args.WaitForPostBack();
}
}
开发者ID:degdigital,项目名称:DEG.SC.HoursOfOperation,代码行数:28,代码来源:HoursOfOperationControl.cs
示例3: Execute
/// <summary>
/// Add a new Content Editor Tab to Content Editor so that users can search for hidden content
/// </summary>
/// <param name="context">Context of Call</param>
public override void Execute(CommandContext context)
{
Assert.ArgumentNotNull(context, "context");
if (context.Items.Length == 1)
{
string s = context.Parameters[0];
if (s.IsGuid())
{
if (WebUtil.GetFormValue("scEditorTabs").Contains("contenteditor:launchtab") && WebUtil.GetFormValue("scEditorTabs").Contains(s))
{
SheerResponse.Eval("scContent.onEditorTabClick(null, null, '" + s + "')");
}
else
{
UrlString urlString = new UrlString(Util.Constants.ContentEditorRawUrlAddress);
urlString.Add(Util.Constants.OpenItemEditorQueryStringKeyName, s);
TrackOpenTab(context);
context.Items[0].Uri.AddToUrlString(urlString);
UIUtil.AddContentDatabaseParameter(urlString);
urlString.Add(Util.Constants.ModeQueryStringKeyName, "preview");
urlString.Add("il", "0");
urlString.Add(Util.Constants.RibbonQueryStringKeyName, "{D3A2D76F-02E6-49DE-BE90-D23C9771DC8D}");
string str3 = context.Parameters["la"] ?? Context.Language.CultureInfo.TwoLetterISOLanguageName;
urlString.Add("la", str3);
AddLatestVersionToUrlString(urlString, s, str3);
SheerResponse.Eval(new ShowEditorTab { Command = "contenteditor:launchtab", Header = Translate.Text(Context.ContentDatabase.GetItem(s).Name), Icon = Images.GetThemedImageSource("Applications/16x16/text_view.png"), Url = urlString.ToString(), Id = s, Closeable = true, Activate = Util.Constants.SettingsItem[Util.Constants.OpenSearchResult] != "New Tab Not Selected" }.ToString());
}
}
}
}
开发者ID:katebutenko,项目名称:Sitecore-Item-Buckets-6.6-NET4,代码行数:34,代码来源:AddTab.cs
示例4: ProcessRecord
protected override void ProcessRecord()
{
LogErrors(() =>
{
string response = null;
if (!string.IsNullOrEmpty(Url))
{
response = JobContext.ShowModalDialog(Url, WidthString, HeightString);
}
else if (!string.IsNullOrEmpty(Control))
{
UrlString url = new UrlString(UIUtil.GetUri("control:" + Control));
url["te"] = Title ?? "Sitecore";
if (Parameters != null)
{
foreach (string key in Parameters.Keys)
{
url.Add(key, WebUtil.SafeEncode(Parameters[key].ToString()));
}
}
var message = new ShowModalDialogPsMessage(url.ToString(), WidthString, HeightString, HandleParameters);
PutMessage(message);
response = (string)GetSheerResult(message);
}
WriteObject(response);
});
}
开发者ID:ostat,项目名称:Console,代码行数:30,代码来源:ShowModalDialogCommand.cs
示例5: Execute
public override void Execute(CommandContext context)
{
SheerResponse.DisableOutput();
var subMenu = new ContextMenu();
var menuItems = new List<Control>();
var menuItemId = "iseSettingsDropdown"; //context.Parameters["Id"];
if (string.IsNullOrEmpty(menuItemId))
{
// a bit of a hacky way to determine the caller so we can display the menu
// in proximity to the triggering control
var parameters = new UrlString("?" + Context.Items["SC_FORM"]);
menuItemId = parameters.Parameters["__EVENTTARGET"];
}
var menuRootItem =
Factory.GetDatabase("core")
.GetItem("/sitecore/content/Applications/PowerShell/PowerShellIse/Menus/Settings");
GetMenuItems(menuItems, menuRootItem);
foreach (var item in menuItems)
{
var menuItem = item as MenuItem;
if (menuItem != null)
{
var subItem = subMenu.Add(menuItem.ID, menuItem.Header, menuItem.Icon, menuItem.Hotkey,
menuItem.Click,
menuItem.Checked, menuItem.Radiogroup, menuItem.Type);
subItem.Disabled = menuItem.Disabled;
}
}
SheerResponse.EnableOutput();
subMenu.Visible = true;
SheerResponse.ShowContextMenu(menuItemId, "down", subMenu);
}
开发者ID:GuitarRich,项目名称:Console,代码行数:35,代码来源:EditIseSettingsCombo.cs
示例6: Run
protected void Run(ClientPipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
string dbName = args.Parameters["databasename"];
string id = args.Parameters["id"];
string lang = args.Parameters["language"];
string ver = args.Parameters["version"];
Database database = Factory.GetDatabase(dbName);
Assert.IsNotNull(database, dbName);
Item obj = database.Items[id, Language.Parse(lang), Version.Parse(ver)];
if (obj == null)
{
SheerResponse.Alert("Item not found.");
}
else
{
if (!SheerResponse.CheckModified())
return;
if (args.IsPostBack)
{
return;
}
UrlString urlString = new UrlString(UIUtil.GetUri("control:SchedulePublish"));
urlString.Append("id", obj.ID.ToString());
urlString.Append("unpublish", args.Parameters["unpublish"]);
SheerResponse.ShowModalDialog(urlString.ToString(), "600", "600", string.Empty, true);
args.WaitForPostBack();
}
}
开发者ID:maxslabyak,项目名称:SCScheduledPublishing,代码行数:33,代码来源:OpenScheduledPublishDialog.cs
示例7: GetDialogUrl
protected virtual UrlString GetDialogUrl(string value)
{
var uri = UIUtil.GetUri("control:Sitecore.Shell.Applications.Dialogs.DateTimeSelectors.DateTimeSelectorEx");
var url = new UrlString(uri);
url["value"] = value;
return url;
}
开发者ID:JRondeau16,项目名称:sitecore-clientextensions,代码行数:7,代码来源:DateTimeMacroEx.cs
示例8: Process
/// <summary>
/// rewrite CDN urls from /path/to/file!cf!a=1!b=2.ext to original form /path/to/file.ext?a=1&b=2
/// </summary>
/// <param name="args"></param>
public override void Process(PreprocessRequestArgs args)
{
Assert.ArgumentNotNull(args, "args");
// rehydrate original url
string fullPath = Sitecore.Context.RawUrl;
var url = new UrlString(fullPath);
// if this item is a minifiable css or js
// rewrite for ~/minify handler
if (CDNSettings.Enabled &&
CDNSettings.MinifyEnabled &&
url["min"] == "1" &&
!url.Path.StartsWith(Settings.Media.DefaultMediaPrefix) &&
(url.Path.EndsWith(".css") || url.Path.EndsWith(".js")))
{
args.Context.Items["MinifyPath"] = fullPath; // set this for the Minifier handler
args.Context.RewritePath("/~/minify" + url.Path, string.Empty, url.Query); // rewrite with ~/minify to trigger custom handler
}
// NOTE: DOREL CHANGE: Commented to make WCF services (*.svc) workable
// else
// {
// args.Context.RewritePath(url.Path, string.Empty, url.Query); // rewrite proper url
// }
}
开发者ID:vlukanin,项目名称:SitecoreCDN,代码行数:30,代码来源:CDNInterceptPipeline.cs
示例9: Process
public void Process(WorkflowPipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
var processorItem = args.ProcessorItem;
if (processorItem == null)
{
return;
}
var actionItem = processorItem.InnerItem;
var dataItem = args.DataItem;
if (string.IsNullOrEmpty(actionItem[ScriptItemFieldNames.Script]))
{
return;
}
var scriptItem = actionItem.Database.GetItem(new ID(actionItem[ScriptItemFieldNames.Script]));
if (RulesUtils.EvaluateRules(actionItem[ScriptItemFieldNames.EnableRule], dataItem) &&
RulesUtils.EvaluateRules(scriptItem[ScriptItemFieldNames.EnableRule], dataItem))
{
var str = new UrlString(UIUtil.GetUri("control:PowerShellRunner"));
str.Append("id", dataItem.ID.ToString());
str.Append("db", dataItem.Database.Name);
str.Append("lang", dataItem.Language.Name);
str.Append("ver", dataItem.Version.Number.ToString(CultureInfo.InvariantCulture));
str.Append("scriptId", scriptItem.ID.ToString());
str.Append("scriptDb", scriptItem.Database.Name);
Context.ClientPage.ClientResponse.Broadcast(
SheerResponse.ShowModalDialog(str.ToString(), "400", "220", "PowerShell Script Results", false),
"Shell");
}
}
开发者ID:sobek85,项目名称:Console,代码行数:34,代码来源:ScriptAction.cs
示例10: GetMediaUrl
/// <summary>
/// If CDN is enabled for this request, replace the outgoing media url with the cdn version
/// </summary>
/// <param name="item"></param>
/// <param name="options"></param>
/// <returns></returns>
public override string GetMediaUrl(Sitecore.Data.Items.MediaItem item, MediaUrlOptions options)
{
string hostname = CDNManager.GetCDNHostName();
string url = base.GetMediaUrl(item, options);
bool shouldReplace = !string.IsNullOrEmpty(hostname) && // cdnHostname exists for site
Sitecore.Context.PageMode.IsNormal; // PageMode is normal
bool dontReplace = !CDNManager.IsMediaPubliclyAccessible(item) || // media is publicly accessible
CDNManager.IsMediaAnalyticsTracked(item); // media is analytics tracked
CDNUrlState contextState = CDNUrlSwitcher.CurrentValue;
if (contextState == CDNUrlState.Enabled)
{
shouldReplace = true;
}
else if (contextState == CDNUrlState.Disabled)
{
UrlString url2 = new UrlString(url);
url2[CDNManager.StopToken] = "1";
url = url2.ToString();
shouldReplace = false;
}
if (shouldReplace && !dontReplace) // media not DMS tracked
{
return CDNManager.ReplaceMediaUrl(url, hostname);
}
else
{
return url;
}
}
开发者ID:carriercomm,项目名称:SitecoreCDN,代码行数:41,代码来源:CDNMediaProvider.cs
示例11: Run
protected virtual void Run(ClientPipelineArgs args)
{
string databaseName = args.Parameters["databasename"];
string id = args.Parameters["id"];
Database database = Factory.GetDatabase(databaseName);
Assert.IsNotNull(database, typeof (Database), "Database \"" + database + "\" not found.", new object[0]);
Item item = database.Items[id];
if (item != null)
{
if (item.Fields[FieldIDs.LayoutField] != null && item.Fields[FieldIDs.LayoutField].Value != string.Empty)
{
if (!args.IsPostBack)
{
UrlString url = new UrlString(UIUtil.GetUri("control:Calendar.ConfigureControls"));
url.Append("id", item.ID.ToString());
url.Append("db", item.Database.Name);
Windows.RunApplication("Calendar ConfigureControls", url.GetUrl());
}
}
else
{
Context.ClientPage.ClientResponse.Alert(ResourceManager.Localize("ITEM_HAS_NO_LAYOUT"));
}
}
else
{
SheerResponse.Alert("Item not found.", new string[0]);
}
}
开发者ID:Refactored,项目名称:SitecoreCalendarModule,代码行数:32,代码来源:Open.cs
示例12: Execute
/// <summary>
/// Macro main entry method
/// </summary>
/// <param name="element">
/// The element.
/// </param>
/// <param name="name">
/// The name.
/// </param>
/// <param name="parameters">
/// The parameters.
/// </param>
/// <param name="value">
/// The value.
/// </param>
public void Execute(XElement element, string name, UrlString parameters, string value)
{
Assert.ArgumentNotNull(element, "element");
Assert.ArgumentNotNull(name, "name");
Assert.ArgumentNotNull(parameters, "parameters");
Assert.ArgumentNotNull(value, "value");
SelectAccountOptions options = SelectAccountOptions.Parse();
string securityType = parameters["type"];
if (!string.IsNullOrEmpty(securityType))
{
if (securityType.Equals("role", StringComparison.InvariantCultureIgnoreCase))
{
options.ExcludeUsers = true;
}
else if (securityType.Equals("user", StringComparison.InvariantCultureIgnoreCase))
{
options.ExcludeRoles = true;
}
}
string multipleSelection = parameters["multiselect"];
if (!string.IsNullOrEmpty(multipleSelection))
{
options.Multiple = multipleSelection.Equals("true", StringComparison.InvariantCultureIgnoreCase);
}
SheerResponse.ShowModalDialog(options.ToUrlString().ToString(), true);
}
开发者ID:blacktambourine,项目名称:DynamicWorkflows,代码行数:44,代码来源:SecurityAccountMacro.cs
示例13: Execute
public override void Execute(CommandContext context)
{
string scriptId = context.Parameters["script"];
string scriptDb = context.Parameters["scriptDb"];
Item scriptItem = Factory.GetDatabase(scriptDb).GetItem(new ID(scriptId));
string showResults = scriptItem[ScriptItemFieldNames.ShowResults];
string itemId = string.Empty;
string itemDb = string.Empty;
if (context.Items.Length > 0)
{
itemId = context.Items[0].ID.ToString();
itemDb = context.Items[0].Database.Name;
}
var str = new UrlString(UIUtil.GetUri("control:PowerShellRunner"));
str.Append("id", itemId);
str.Append("db", itemDb);
str.Append("scriptId", scriptId);
str.Append("scriptDb", scriptDb);
str.Append("autoClose", showResults);
Context.ClientPage.ClientResponse.Broadcast(
SheerResponse.ShowModalDialog(str.ToString(), "400", "220", "PowerShell Script Results", false),
"Shell");
}
开发者ID:scjunkie,项目名称:Console,代码行数:26,代码来源:ExecutePowerShellScript.cs
示例14: SelectFields
public void SelectFields(ClientPipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
if (!args.IsPostBack)
{
UrlString urlString = new UrlString(UIUtil.GetUri("control:TreeListExEditor"));
UrlHandle urlHandle = new UrlHandle();
urlHandle["title"] = PullUpFieldsSettings.SelectFieldsDialogTitle;
urlHandle["text"] = PullUpFieldsSettings.SelectFieldsDialogText;
urlHandle["source"] = GetSelectFieldsDialogSource(args);
urlHandle.Add(urlString);
SheerResponse.ShowModalDialog
(
urlString.ToString(),
PullUpFieldsSettings.SelectFieldsDialogWidth,
PullUpFieldsSettings.SelectFieldsDialogHeight,
string.Empty,
true
);
args.WaitForPostBack();
}
else if (args.HasResult)
{
args.Parameters["fieldIds"] = args.Result;
args.IsPostBack = false;
}
else
{
CancelOperation(args);
}
}
开发者ID:scjunkie,项目名称:Sitecore.PullUpFields,代码行数:31,代码来源:PullUpFieldsIntoBaseTemplate.cs
示例15: Execute
/// <summary>
/// Add a new Content Editor Tab to Content Editor so that users can search for hidden content
/// </summary>
/// <param name="context">Context of Call</param>
public override void Execute(CommandContext context)
{
Assert.ArgumentNotNull(context, "context");
if (context.Items.Length == 1)
{
var itemId = context.Parameters[0];
//if (WebUtil.GetFormValue("scEditorTabs").Contains("contenteditor:launchtab") && WebUtil.GetFormValue("scEditorTabs").Contains(itemId))
//{
// SheerResponse.Eval("scContent.onEditorTabClick(null, null, '" + itemId + "')");
//}
//else
//{
var urlString = new UrlString("/sitecore%20modules/Shell/Sitecore/ItemBuckets/ShowResult.aspx");
urlString.Add(Util.Constants.OpenItemEditorQueryStringKeyName, itemId);
context.Items[0].Uri.AddToUrlString(urlString);
UIUtil.AddContentDatabaseParameter(urlString);
urlString.Add(Util.Constants.ModeQueryStringKeyName, "preview");
urlString.Add(Util.Constants.RibbonQueryStringKeyName, "{D3A2D76F-02E6-49DE-BE90-D23C9771DC8D}");
var language = context.Parameters["la"].IsNull() ? Sitecore.Context.Language.CultureInfo.TwoLetterISOLanguageName : context.Parameters["la"];
urlString.Add("la", language);
//SheerResponse.Eval(new ShowEditorTab { Command = "contenteditor:launchtab", Header = "Another Search", Icon = Images.GetThemedImageSource("Applications/16x16/text_view.png"), Url = urlString.ToString(), Id = Id, Closeable = true, Activate = true }.ToString());
SheerResponse.Eval(new ShowEditorTab { Command = "contenteditor:launchblanktab", Header = "Search " + DateTime.Now.ToLongTimeString(), Icon = Images.GetThemedImageSource("Applications/16x16/text_view.png"), Url = urlString.ToString(), Id = new Random().Next(0, 99999999).ToString(), Closeable = true, Activate = true }.ToString());
// }
}
}
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:33,代码来源:AddBlankSearch.cs
示例16: RunEditForm
/// <summary>
/// This method runs the rotating image modal
/// </summary>
/// <param name="args"></param>
public void RunEditForm(ClientPipelineArgs args)
{
if (!args.IsPostBack)
{
//get url for field type selector modal
UrlString ustr = new UrlString(UIUtil.GetUri("control:FieldSuiteEditForm"));
ustr.Parameters.Add(args.Parameters);
//open field type selector
Sitecore.Context.ClientPage.ClientResponse.ShowModalDialog(ustr.ToString(), "712", "485", "", true);
//wait for response
args.WaitForPostBack();
}
else
{
string itemId = args.Parameters["id"];
if(!string.IsNullOrEmpty(itemId) && Sitecore.Context.ContentDatabase != null)
{
Item item = Sitecore.Context.ContentDatabase.GetItem(itemId);
if(item.IsNotNull())
{
UnlockItem(item);
//send command to update list update's field gutter
if (args.Parameters["fieldid"] != null && !string.IsNullOrEmpty(args.Parameters["fieldid"]))
{
string fieldGutterHtml = GetFieldGutterHtml(new FieldGutterArgs(item, args.Parameters["fieldid"]));
SheerResponse.Eval("FieldSuite.Fields.UpdateItemFieldGutter(\"" + args.Parameters["fieldid"] + "\",\"" + HttpUtility.HtmlEncode(fieldGutterHtml) + "\",\"" + item.ID + "\")");
}
}
}
}
}
开发者ID:erzr,项目名称:SitecoreFieldSuite,代码行数:38,代码来源:EditItem.cs
示例17: Process
public virtual void Process(RenderingPropertiesFieldEditorArgs args)
{
Assert.ArgumentNotNull(args, "args");
Assert.ArgumentNotNull(args.StandardValuesItem, "args.StandardValuesItem");
Assert.ArgumentNotNullOrEmpty(args.Handle, "args.Handle");
Assert.ArgumentNotNull(args.RenderingDefinition, "args.RenderingDefinition");
var renderingDef = args.RenderingDefinition;
var fieldCol = args.StandardValuesItem.Fields;
var parameters = new UrlString();
var options = RenderingParametersFieldEditorOptions.Parse(args.Handle);
//
//save the parameters that have already been set
if (! string.IsNullOrEmpty(args.RenderingDefinition.Parameters))
{
var currentParams = new UrlString(args.RenderingDefinition.Parameters);
foreach (var key in currentParams.Parameters.AllKeys)
{
var name = key;
var value = currentParams[key];
SetValue(renderingDef, parameters, name, value);
}
}
foreach (var field in options.Fields)
{
SetValue(renderingDef, parameters, fieldCol[field.FieldID].Name, field.Value);
}
args.RenderingDefinition.Parameters = parameters.ToString();
}
开发者ID:JRondeau16,项目名称:sitecore-clientextensions,代码行数:32,代码来源:SetValues.cs
示例18: Execute
/// <summary>
/// Executes the command in the specified context.
/// </summary>
/// <param name="context">The context.</param>
public override void Execute(CommandContext context)
{
// updated to publish the site configuration nodes. flushing will be handled by publish end events
UrlString str = new UrlString(UIUtil.GetUri("control:MultisitesManager.FlushSites"));
SheerResponse.ShowModalDialog(str.ToString());
}
开发者ID:TommyCTantrum,项目名称:MultipleSitesManager,代码行数:11,代码来源:FlushCommand.cs
示例19: Execute
public override void Execute(CommandContext context)
{
var urlString = new UrlString(UIUtil.GetUri("control:PowerShellExternalView"));
var keys = context.Parameters.AllKeys;
using (var session = ScriptSessionManager.GetSession(string.Empty, ApplicationNames.Default, false))
{
session.ExecuteScriptPart("");
foreach (var key in keys)
{
var param =
context.Parameters[key]
.Replace("{spe}", GetType().Assembly.GetName().Version.ToString())
.Replace("{ps}", ScriptSession.PsVersion.Major + "." + ScriptSession.PsVersion.Minor)
.Replace("{sc}",
SitecoreVersion.Current.Major + "." +
SitecoreVersion.Current.Minor);
urlString.Add(key, param);
}
}
var width = keys.Contains("spe_w", StringComparer.OrdinalIgnoreCase)
? context.Parameters["spe_w"]
: keys.Contains("width", StringComparer.OrdinalIgnoreCase) ? context.Parameters["width"] : "800";
var height = keys.Contains("spe_h", StringComparer.OrdinalIgnoreCase)
? context.Parameters["spe_h"]
: keys.Contains("height", StringComparer.OrdinalIgnoreCase) ? context.Parameters["height"] : "800";
SheerResponse.ShowModalDialog(urlString.ToString(), width, height);
}
开发者ID:GuitarRich,项目名称:Console,代码行数:32,代码来源:ShowExternalPage.cs
示例20: Run
public void Run(ClientPipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
string controlId = args.Parameters["controlid"];
if (args.IsPostBack)
{
if (!args.HasResult) return;
SheerResponse.SetAttribute("scHtmlValue", "value", YouTubeVideoField.FormatValueForPageEditorDisplay(args.Result));
SheerResponse.SetAttribute("scPlainValue", "value", args.Result);
SheerResponse.Eval("scSetHtmlValue('" + controlId + "', false, true)");
}
else
{
var urlString = new UrlString(UIUtil.GetUri(DialogUrl));
urlString["val"] = args.Parameters.Get("fieldValue");
Context.ClientPage.ClientResponse.ShowModalDialog(urlString.ToString(), "650px", "700px", string.Empty, true);
args.WaitForPostBack();
}
}
开发者ID:jammykam,项目名称:BrainJocks.YouTubeVideoField,代码行数:25,代码来源:EditYouTubeVideoField.cs
注:本文中的UrlString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论