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


C# Util.DoesAppExist方法代码示例

本文整理汇总了C#中Util.DoesAppExist方法的典型用法代码示例。如果您正苦于以下问题:C# Util.DoesAppExist方法的具体用法?C# Util.DoesAppExist怎么用?C# Util.DoesAppExist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util.DoesAppExist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Save_Click

 protected void Save_Click(object sender, EventArgs e)
 {
     Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
     if(AppName.Value.Length == 0)
     {
         Message.Text = "Enter an App Name";
         return;
     }
     else if (PageName.Value.Length == 0)
     {
         Message.Text = "Enter an Page Name";
         return;
     }
     else if (!Check.ValidateObjectName(Message, AppName.Value.Trim()))
     {
         return;
     }
     else if (!Check.ValidateObjectName(Message, PageName.Value.Trim()))
     {
         return;
     }
     Util util = new Util();
     if(util.DoesAppExist(State,AppName.Value))
     {
         Message.Text = "The New App Name has already been used. Try another name";
         return;
     }
     Message.Text = "Saved.";
 }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:29,代码来源:NewApp.aspx.cs

示例2: 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();
                UserLabel.Text = State["Username"].ToString();

                if (CurrentApp.Items.Count == 0 || CurrentApp.SelectedValue.Contains("->") ||
                              State["SelectedApp"] == null)
                {
                    init.InitAppsList(State, CurrentApp);
                }

                State["SelectedAppType"] = Constants.WEB_APP_TYPE;
                AppType.Text = Constants.WEB_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());
                }
            }
            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);
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:67,代码来源:TabDesignWeb.aspx.cs

示例3: SaveApp_Click

    protected void SaveApp_Click(object sender, EventArgs e)
    {
        try
        {
            ClearMessages();
            if (SavedCanvasHtml.Text.Length > 0)
                SavePage();

            Util util = new Util();
            Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
            if ( State["SelectedApp"] == null ||
                !util.DoesAppExist(State) ||
                CurrentApp.SelectedIndex == 0)
            {
                return;
            }

            if ( State["CreatePageMessage"] != null)
            {
                StringBuilder sb = (StringBuilder) State["CreatePageMessage"];
                Message.Text += sb.ToString();
                InitAppPages();
            }
        }
        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;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:32,代码来源:TabDesignWeb.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Init init = new Init();
        Util util = new Util();

        try
        {
            Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
            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", "TabDesign");

            ClearMessages();

            if (!IsPostBack)
            {
                CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
                string attr = "javascript: NamedPopUp('ManageData.aspx', 'ManageDataPopup','height=800, width=1000, left=50, top=50, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');return false;";
                ManageData.Attributes.Add("onclick", attr);

                UserLabel.Text = State["Username"].ToString();

                if (CurrentApp.Items.Count == 0 || CurrentApp.SelectedValue.Contains("->") ||
                              State["SelectedApp"] == null)
                {
                    init.InitAppsList(State, CurrentApp);
                }

                State["SelectedAppType"] = Constants.NATIVE_APP_TYPE;

                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());
                }
            }

            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)
        {
            Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
            util.ProcessMainExceptions(State, Response, ex);
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:70,代码来源:TabDesignNative.aspx.cs


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