本文整理汇总了C#中Util.SetDefaultBackgroundForView方法的典型用法代码示例。如果您正苦于以下问题:C# Util.SetDefaultBackgroundForView方法的具体用法?C# Util.SetDefaultBackgroundForView怎么用?C# Util.SetDefaultBackgroundForView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.SetDefaultBackgroundForView方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DesignedForDevice_SelectedIndexChanged
protected void DesignedForDevice_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
DesignedForDevice.Text = e.Text;
string device_design = e.Value;
DeviceType.Text = e.Text;
XmlUtil x_util = new XmlUtil();
string previous_device_design = x_util.GetAppDeviceType(State);
//State["SelectedDeviceView"] = device_design;
State["SelectedDeviceType"] = device_design;
if (State["SelectedApp"] == null || State["SelectedApp"].ToString().Contains("->"))
{
util.SetDefaultBackgroundForView(State,device_design);
}
x_util.SetAppDeviceType(State, previous_device_design, device_design);
Message.Text = "Main device for App has been set.";
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}
示例2: SaveAppAs_Click
protected void SaveAppAs_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
if (SavedCanvasHtml.Text.Length > 0)
SavePage();
string app = AppName.Text.Trim();
if (!CheckAppName(app))
return;
string page_name = PageName.Text.Trim().Replace(" ", "_");
string designed_for = DeviceType.Text.Trim();
string app_type = AppType.Text.Trim();
if (IsNewApp.Text.Length > 0)
{
IsNewApp.Text = "";
CurrentApp.SelectedIndex = 0;
AppPages.Items.Clear();
ResetAppStateVariables();
SavedCanvasHtml.Text = "";
}
else
{
if ( State["AppXmlDoc"] != null && !CheckPageName(app, page_name))
return;
}
State["SelectedApp"] = app;
State["SelectedAppPage"] = page_name;
State["SelectedDeviceType"] = designed_for;
// State["SelectedDeviceView"] = designed_for;
State["SelectedAppType"] = app_type;
XmlUtil x_util = new XmlUtil();
AppPages.SelectedValue = page_name;
util.SetDefaultBackgroundForView(State,designed_for);
if (!SaveAppInDatabase(app, page_name))
{
return;
}
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;
}
DesignedFor.Text = "";
DeviceType.Text = State["SelectedDeviceType"].ToString();
ShowAppControls();
InitAppPages();
Message.Text = app + " has been saved. ";
AppName.Text = app;
DesignMessage.Text = "";
if ( State["EncodeComputeWarnings"] != null)
{
Message.Text += " " + State["EncodeComputeWarnings"].ToString();
State["EncodeComputeWarnings"] = null;
}
if ( State["CreatePageMessage"] != null)
{
StringBuilder sb = (StringBuilder) State["CreatePageMessage"];
Message.Text += sb.ToString();
State["SelectedAppPage"] = page_name;
PageName.Text = State["SelectedAppPage"].ToString();
}
UpdateAppLists();
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}
示例3: DeleteApp_Click
protected void DeleteApp_Click(object sender, ImageClickEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
string app = CurrentApp.SelectedValue;
State["SelectedApp"] = app;
util.DeleteApplication(State);
ResetAppStateVariables();
UpdateAppLists();
CurrentApp.SelectedIndex = 0;
//SaveApp.Style.Value = "display:none";
//RememberMessage.Style.Value = "display:none";
DesignMessage.Text = "Select an App or Click the New App Icon";
AppPages.Items.Clear();
Message.Text = app + " has been deleted.";
util.SetDefaultBackgroundForView(State,Constants.IPHONE);
State["SelectedDeviceType"] = Constants.IPHONE;
HideAppControls();
SetViewForDevice();
AppName.Text = "";
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}
示例4: ViewForDevice_SelectedIndexChanged
protected void ViewForDevice_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
if (SavedCanvasHtml.Text.Length > 0)
SavePage();
XmlUtil x_util = new XmlUtil();
string device_view = e.Value;
if (State["SelectedDeviceType"].ToString() == Constants.IPAD)
device_view = Constants.IPAD;
else if (State["SelectedDeviceType"].ToString() == Constants.ANDROID_TABLET)
device_view = Constants.ANDROID_TABLET;
else if (device_view == Constants.IPAD && State["SelectedDeviceType"].ToString() != Constants.IPAD)
device_view = State["SelectedDeviceType"].ToString();
State["SelectedDeviceType"] = device_view;
if ( State["SelectedApp"] == null || State["SelectedApp"].ToString().Contains("->"))
{
util.SetDefaultBackgroundForView(State,device_view);
}
else
ShowPage( State["SelectedAppPage"].ToString());
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}