当前位置: 首页>>代码示例>>C#>>正文


C# Util.SetDefaultBackgroundForView方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:33,代码来源:AppDevice.aspx.cs

示例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;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:93,代码来源:TabDesignWeb.aspx.cs

示例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;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:34,代码来源:TabDesignWeb.aspx.cs

示例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;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:35,代码来源:TabDesignWeb.aspx.cs


注:本文中的Util.SetDefaultBackgroundForView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。