当前位置: 首页>>代码示例>>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;未经允许,请勿转载。