本文整理汇总了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.";
}
示例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);
}
}
示例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;
}
}
示例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);
}
}