本文整理汇总了C#中IEnvironmentModel.ShowWebPageDialog方法的典型用法代码示例。如果您正苦于以下问题:C# IEnvironmentModel.ShowWebPageDialog方法的具体用法?C# IEnvironmentModel.ShowWebPageDialog怎么用?C# IEnvironmentModel.ShowWebPageDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEnvironmentModel
的用法示例。
在下文中一共展示了IEnvironmentModel.ShowWebPageDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowSwitchDropDialog
public static Dev2DecisionCallbackHandler ShowSwitchDropDialog(IEnvironmentModel environment, string webModel)
{
const int DialogWidth = 752;
const int DialogHeight = 161;
var callBackHandler = new Dev2DecisionCallbackHandler { ModelData = webModel };
const string RelativeUriString = "switch/drop";
if(!IsTestMode)
{
environment.ShowWebPageDialog(SiteName, RelativeUriString, callBackHandler, DialogWidth, DialogHeight, "Switch Flow");
}
else
{
TestModeRelativeUri = RelativeUriString;
}
return callBackHandler;
}
示例2: ShowFileChooser
public static void ShowFileChooser(IEnvironmentModel environment, FileChooserMessage fileChooserMessage)
{
VerifyArgument.IsNotNull("environment", environment);
const string PageName = "dialogs/filechooser";
const double Width = 704;
const double Height = 517;
const string LeftTitle = "Choose File(s)";
var environmentConnection = environment.Connection;
if(environmentConnection != null)
{
string rightTitle = environment.Name + " (" + environmentConnection.AppServerUri + ")";
var pageHandler = new FileChooserCallbackHandler(fileChooserMessage);
var envirDisplayName = FullyEncodeServerDetails(environmentConnection);
var relativeUriString = string.Format("{0}?envir={1}", PageName, envirDisplayName);
if(!IsTestMode)
{
environment.ShowWebPageDialog(SiteName, relativeUriString, pageHandler, Width, Height, LeftTitle, rightTitle);
}
else
{
CallBackHandler = pageHandler;
TestModeRelativeUri = relativeUriString;
}
}
}
示例3: ShowDialog
//.........这里部分代码省略.........
{
leftTitle = "New Datbase Source";
}
break;
case ResourceType.PluginService:
pageName = "services/pluginservice";
pageHandler = new ServiceCallbackHandler();
width = ServiceDialogWidth;
height = ServiceDialogHeight;
break;
case ResourceType.PluginSource:
pageName = "sources/pluginsource";
srcId = resourceId;
pageHandler = new SourceCallbackHandler();
if(!String.IsNullOrEmpty(resourceId) && !String.IsNullOrEmpty(resourceName))
{
leftTitle = "Edit - " + resourceName;
}
else
{
leftTitle = "New Plugin Source";
}
width = 700;
height = 517;
break;
case ResourceType.EmailSource: // PBI 953 - 2013.05.16 - TWR - Added
pageName = "sources/emailsource";
srcId = resourceId;
pageHandler = new SourceCallbackHandler();
if(!String.IsNullOrEmpty(resourceId) && !String.IsNullOrEmpty(resourceName))
{
leftTitle = "Edit - " + resourceName;
}
else
{
leftTitle = "New Email Source";
}
width = 704;
height = 488;
break;
case ResourceType.WebSource: // PBI 5656 - 2013.05.20 - TWR - Added
pageName = "sources/websource";
srcId = resourceId;
pageHandler = new WebSourceCallbackHandler();
if(!String.IsNullOrEmpty(resourceId) && !String.IsNullOrEmpty(resourceName))
{
leftTitle = "Edit - " + resourceName;
}
else
{
leftTitle = "New Web Source";
}
width = 704;
height = 517;
break;
case ResourceType.WebService: // PBI 1220 - 2013.05.20 - TWR - Added
pageName = "services/webservice";
pageHandler = new ServiceCallbackHandler();
width = ServiceDialogWidth;
height = ServiceDialogHeight;
break;
default:
return false;
}
var envirDisplayName = FullyEncodeServerDetails(environment.Connection);
resourcePath = HttpUtility.UrlEncode(resourcePath);
string selectedPath = "";
if(cateogy != null)
{
selectedPath = cateogy.Equals("Unassigned") || string.IsNullOrEmpty(cateogy) ? "" : cateogy;
var lastIndexOf = selectedPath.LastIndexOf("\\", StringComparison.Ordinal);
if(lastIndexOf != -1)
{
selectedPath = selectedPath.Substring(0, lastIndexOf);
}
selectedPath = selectedPath.Replace("\\", "\\\\");
}
string relativeUriString = string.Format("{0}?wid={1}&rid={2}&envir={3}&path={4}&sourceID={5}&category={6}", pageName, workspaceId, resourceId, envirDisplayName, resourcePath, srcId, selectedPath);
if(!IsTestMode)
{
// this must be a property ;)
isSuccessful = environment.ShowWebPageDialog(SiteName, relativeUriString, pageHandler, width, height, leftTitle, rightTitle);
}
else
{
TestModeRelativeUri = relativeUriString;
}
}
return isSuccessful.HasValue && isSuccessful.Value;
}