本文整理汇总了C#中Util.GetDefaultButton方法的典型用法代码示例。如果您正苦于以下问题:C# Util.GetDefaultButton方法的具体用法?C# Util.GetDefaultButton怎么用?C# Util.GetDefaultButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.GetDefaultButton方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowPage
public void ShowPage(string page_name)
{
PageName.Text = page_name;
try
{
XmlUtil x_util = new XmlUtil();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (State["SelectedDeviceType"] == null /*|| State["SelectedDeviceView"] == null*/)
{
string device_type = x_util.GetAppDeviceType(State);
State["SelectedDeviceType"] = device_type;
// State["SelectedDeviceView"] = device_type;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
if (page_name != null)
{
string html = x_util.GetAppPage(State, page_name);
if (html.StartsWith("Error:"))
{
Message.Text = html;
return;
}
State["PageHtml"] = html;
Util util = new Util();
if (State["DoSavePage"] != null)
{
State["DoSavePage"] = null;
util.SavePageImage(State, page_name, html);
}
DefaultButtonImage.Text = util.GetDefaultButton(State);
}
else
{
State["PageHtml"] = "";
DefaultButtonImage.Text = ConfigurationManager.AppSettings["DefaultWebAppButtonImage"];
}
}
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;
}
}
示例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;
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:
break;
case Constants.HYBRID_APP_TYPE:
Response.Redirect("TabDesignHybrid.aspx", false);
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;
}
}
示例3: 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();
StartMessage.Style.Value = "";
State["SelectedDeviceType"] = Constants.IPHONE;
// State["SelectedDeviceView"] = Constants.IPHONE;
SetViewForDevice();
AppSelectedForTest.Visible = false;
HideAppControls();
return;
}
State["SelectedApp"] = app;
State["SelectedAppType"] = util.GetAppType(State);
switch (State["SelectedAppType"].ToString())
{
case Constants.NATIVE_APP_TYPE:
break;
case Constants.WEB_APP_TYPE:
Response.Redirect("TabDesignWeb.aspx", false);
break;
case Constants.HYBRID_APP_TYPE:
Response.Redirect("TabDesignHybrid.aspx", false);
break;
}
if (util.IsAppSelectedForTest(State))
AppSelectedForTest.Visible = true;
else
AppSelectedForTest.Visible = false;
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;
}
DeviceType.Text = State["SelectedDeviceType"].ToString();
SetViewForDevice();
InitAppPages();
StartMessage.Style.Value = "display:none";
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;
}
}