當前位置: 首頁>>代碼示例>>C#>>正文


C# WebVirtualDirectory.GetValue方法代碼示例

本文整理匯總了C#中WebsitePanel.Providers.Web.WebVirtualDirectory.GetValue方法的典型用法代碼示例。如果您正苦於以下問題:C# WebVirtualDirectory.GetValue方法的具體用法?C# WebVirtualDirectory.GetValue怎麽用?C# WebVirtualDirectory.GetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebsitePanel.Providers.Web.WebVirtualDirectory的用法示例。


在下文中一共展示了WebVirtualDirectory.GetValue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ToggleWmSvcControls

		private void ToggleWmSvcControls(WebVirtualDirectory item)
		{
			if (!item.GetValue<bool>(WebVirtualDirectory.WmSvcAvailable))
			{
				pnlWmcSvcManagement.Visible = false;
				pnlNotInstalled.Visible = true;
				//
				return;
			}
			//
			pnlWmcSvcManagement.Visible = true;
			pnlNotInstalled.Visible = false;

			//
			string wmSvcAccountName = item.GetValue<string>(WebVirtualDirectory.WmSvcAccountName);
			bool wmcSvcSiteEnabled = item.GetValue<bool>(WebVirtualDirectory.WmSvcSiteEnabled);

			btnWmSvcSiteEnable.Visible = true;
			txtWmSvcAccountName.Visible = true;

			//
			txtWmSvcAccountPassword.Text = txtWmSvcAccountPassword.Attributes["value"] = String.Empty;
			//
			txtWmSvcAccountPasswordC.Text = txtWmSvcAccountPasswordC.Attributes["value"] = String.Empty;

			// Disable edit mode if WmSvc account name is set
			if (wmcSvcSiteEnabled)
			{
				btnWmSvcSiteEnable.Visible = false;
				txtWmSvcAccountName.Visible = false;

				//
				txtWmSvcAccountPassword.Text = PasswordControl.EMPTY_PASSWORD;
				txtWmSvcAccountPassword.Attributes["value"] = PasswordControl.EMPTY_PASSWORD;

				//
				txtWmSvcAccountPasswordC.Text = PasswordControl.EMPTY_PASSWORD;
				txtWmSvcAccountPasswordC.Attributes["value"] = PasswordControl.EMPTY_PASSWORD;
			}

			//
			litWmSvcAccountName.Visible = wmcSvcSiteEnabled;
			btnWmSvcSiteDisable.Visible = wmcSvcSiteEnabled;
			btnWmSvcChangePassw.Visible = wmcSvcSiteEnabled;
			pnlWmSvcSiteDisabled.Visible = !wmcSvcSiteEnabled;
			pnlWmSvcSiteEnabled.Visible = wmcSvcSiteEnabled;

			//
			txtWmSvcAccountName.Text = wmSvcAccountName;
			litWmSvcAccountName.Text = wmSvcAccountName;
		}
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:51,代碼來源:WebSitesEditSite.ascx.cs

示例2: ToggleWmSvcConnectionHint

		private void ToggleWmSvcConnectionHint(WebVirtualDirectory item)
		{
			bool wmcSvcSiteEnabled = item.GetValue<bool>(WebSite.WmSvcSiteEnabled);
			//
			if (wmcSvcSiteEnabled)
			{
				//
				string wmSvcServicePort = item.GetValue<String>(WebSite.WmSvcServicePort);
				string wmSvcServiceUrl = item.GetValue<String>(WebSite.WmSvcServiceUrl);
				//
				if (!String.IsNullOrEmpty(wmSvcServiceUrl))
				{
					if (!String.IsNullOrEmpty(wmSvcServicePort)
						&& !String.Equals(wmSvcServicePort, WebSite.WmSvcDefaultPort))
						lclWmSvcConnectionHint.Text = String.Format(
							lclWmSvcConnectionHint.Text, String.Format("{0}:{1}", wmSvcServiceUrl, wmSvcServicePort), item.Name);
					else
						lclWmSvcConnectionHint.Text = String.Format(
							lclWmSvcConnectionHint.Text, wmSvcServiceUrl, item.Name);
				}
				else
					lclWmSvcConnectionHint.Visible = false;
			}
		}
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:24,代碼來源:WebSitesEditSite.ascx.cs

示例3: AutoSuggestWmSvcAccontName

		private void AutoSuggestWmSvcAccontName(WebVirtualDirectory item)
		{
			bool wmSvcItemEnabled = item.GetValue<bool>(WebVirtualDirectory.WmSvcSiteEnabled);
			//
			if (!wmSvcItemEnabled)
			{
				string autoSuggestedPart = item.Name;
				//
				if (autoSuggestedPart.Length > 14)
				{
					autoSuggestedPart = autoSuggestedPart.Substring(0, 14);
					//
					while (!String.IsNullOrEmpty(autoSuggestedPart) &&
						!Char.IsLetterOrDigit(autoSuggestedPart[autoSuggestedPart.Length - 1]))
					{
						autoSuggestedPart = autoSuggestedPart.Substring(0, autoSuggestedPart.Length - 1);
					}
				}
				//
				txtWmSvcAccountName.Text = autoSuggestedPart + "_admin";
			}
		}
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:22,代碼來源:WebSitesEditSite.ascx.cs


注:本文中的WebsitePanel.Providers.Web.WebVirtualDirectory.GetValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。