public Form1_Layout(int index) { InitializeComponent(); this._index = (SiteRegion)index; FormMain.RunProcess.LogicData.RunData.GetlayoutPointsShow((int)_index, 0); toolStripButton1.ForeColor = Color.Black; toolStripButton2.ForeColor = Color.Green; }
private static String GetSiteRegionDomainPrefix(SiteRegion siteRegion) { switch (siteRegion) { case SiteRegion.Beijing: return "bj"; default: throw new InvalidOperationException("不支持的地域。"); } }
/// <summary> /// Gets the view models for each culture of the given site. /// </summary> /// <param name="site">The site.</param> /// <returns></returns> protected virtual IList <SiteViewModel> GetMultilingualSiteViewModels(ISite site) { var result = new List <SiteViewModel>(); bool addToDataSource = true; foreach (var culture in site.PublicContentCultures) { string siteUrl = string.Empty; bool isCurrentSite = false; // Handle current site URLs from page node if (site.Id == this.currentSiteId) { var actualSitemapNode = SiteMapBase.GetActualCurrentNode(); if (actualSitemapNode != null) { var actualPageNode = PageManager.GetManager().GetPageNode(actualSitemapNode.Id); addToDataSource = actualPageNode.AvailableCultures.Contains(culture); if (addToDataSource) { if (CultureInfo.CurrentUICulture.Name == culture.Name) { isCurrentSite = true; } siteUrl = this.ResolveDefaultSiteUrl(actualPageNode, culture); } } } else { using (SiteRegion.FromSiteId(site.Id)) { siteUrl = this.ResolveSiteHomePage(site, culture); } } if (addToDataSource) { result.Add(this.GetSiteViewModel(site, culture, isCurrentSite, siteUrl)); } } return(result); }
public void GetlayoutPointsShow(int index, int t) { this._index = (SiteRegion)index; this.TRegion = t; }