本文整理汇总了C#中Util.IsAppSelectedForTesting方法的典型用法代码示例。如果您正苦于以下问题:C# Util.IsAppSelectedForTesting方法的具体用法?C# Util.IsAppSelectedForTesting怎么用?C# Util.IsAppSelectedForTesting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.IsAppSelectedForTesting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
Init init = new Init();
try
{
if (util.CheckSessionTimeout(State,Response,"Default.aspx")) return;
if ( HttpRuntime.Cache["TechSupportEmail"] != null)
{
util.AddEmailToButton(SupportButton, HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
}
util.UpdateSessionLog(State, "post", "TabDesignWeb");
ClearMessages();
if (!IsPostBack)
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
State["SelectedAppType"] = Constants.HYBRID_APP_TYPE;
UserLabel.Text = State["Username"].ToString();
if (CurrentApp.Items.Count == 0 || CurrentApp.SelectedValue.Contains("->") ||
State["SelectedApp"] == null)
{
init.InitAppsList(State, CurrentApp);
}
State["SelectedAppType"] = Constants.HYBRID_APP_TYPE;
AppType.Text = Constants.HYBRID_APP_TYPE;
State["UrlAccountIdentifier"] = util.GetUrlAccountIdentifier(State);
UrlAccountIdentifier.Text = State["UrlAccountIdentifier"].ToString();
if (State["SelectedApp"] == null || !util.DoesAppExist(State) || CurrentApp.SelectedIndex == 0)
{
InitCurrentApp("->");
State["SelectedDeviceType"] = Constants.IPHONE;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
else if (State["SelectedApp"] != null)
{
InitCurrentApp(State["SelectedApp"].ToString());
if (util.IsAppSelectedForTesting(State))
AppSelectedForTest.Visible = true;
else
AppSelectedForTest.Visible = false;
}
}
DeletePage.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this page?');");
if (State["ResetConfigApps"] != null)
{
State["SelectedApp"] = null;
init.InitAppsList(State, CurrentApp);
State["ResetConfigApps"] = null;
}
State["WebServiceValidated"] = null;
if (State["SelectedDeviceType"] == null)
{
State["SelectedDeviceType"] = Constants.IPHONE;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
SetAllAppNames();
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例2: InitCurrentApp
public void InitCurrentApp(string app)
{
try
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
CurrentApp.SelectedValue = app;
Util util = new Util();
if (app.Contains("->"))
{
ResetAppStateVariables();
DesignMessage.Text = "Select an App or Click the New App Icon";
State["SelectedDeviceType"] = Constants.IPHONE;
//State["SelectedDeviceView"] = Constants.IPHONE;
SetViewForDevice();
HideAppControls();
AppName.Text = "";
return;
}
State["SelectedApp"] = app;
if (util.IsAppSelectedForTesting(State))
AppSelectedForTest.Visible = true;
else
AppSelectedForTest.Visible = false;
AppName.Text = app;
State["SelectedAppType"] = util.GetAppType(State);
switch (State["SelectedAppType"].ToString())
{
case Constants.NATIVE_APP_TYPE:
Response.Redirect("TabDesignNative.aspx", false);
break;
case Constants.WEB_APP_TYPE:
Response.Redirect("TabDesignWeb.aspx", false);
break;
case Constants.HYBRID_APP_TYPE:
break;
}
XmlUtil x_util = new XmlUtil();
util.GetStagingAppXml(State, app);
//State["SelectedDeviceView"] =
State["SelectedDeviceType"] = x_util.GetAppDeviceType(State);
if (State["SelectedDeviceType"] == null)
{
//State["SelectedDeviceView"] =
State["SelectedDeviceType"] = Constants.IPHONE;
}
if (State["SelectedDeviceType"].ToString() == Constants.IPAD ||
State["SelectedDeviceType"].ToString() == Constants.ANDROID_TABLET)
{
State["BackgroundColor"] = x_util.GetBackgroundColor(State);
}
DeviceType.Text = State["SelectedDeviceType"].ToString();
SetViewForDevice();
InitAppPages();
DesignMessage.Text = "";
string html = x_util.GetFirstAppPage(State);
State["PageHtml"] = html;
DefaultButtonImage.Text = util.GetDefaultButton(State);
AppPages.SelectedValue = State["SelectedAppPage"].ToString();
ShowAppControls();
}
catch (Exception ex)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}