private void InitShowPanel(ADZoneType selected) { switch (selected) { case ADZoneType.Banner: this.ZoneTypeSetting1.Attributes.Add("style", "display: "); return; case ADZoneType.Pop: this.ZoneTypeSetting2.Attributes.Add("style", "display: "); return; case ADZoneType.Move: this.ZoneTypeSetting3.Attributes.Add("style", "display: "); return; case ADZoneType.Fixed: this.ZoneTypeSetting4.Attributes.Add("style", "display: "); return; case ADZoneType.Float: this.ZoneTypeSetting5.Attributes.Add("style", "display: "); return; case ADZoneType.Code: this.ZoneTypeSetting6.Attributes.Add("style", "display: "); return; case ADZoneType.Couplet: this.ZoneTypeSetting7.Attributes.Add("style", "display: "); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { int num = BasePage.RequestInt32("ZoneType"); ADZoneType zoneType = (ADZoneType)num; this.HdnZoneType.Value = num.ToString(); this.TxtADTemplate.Text = new ADZoneJS().GetADZoneJSTemplateContent(zoneType); } }
private void InitSetting(string setting, ADZoneType showType) { string[] strArray = this.SplitZetting(setting + ",,,,,"); switch (showType) { case ADZoneType.Banner: case ADZoneType.Code: break; case ADZoneType.Pop: this.DropPopType.SelectedIndex = this.DropPopType.Items.IndexOf(this.DropPopType.Items.FindByValue(strArray[0])); this.TxtPopLeft.Text = strArray[1]; this.TxtPopTop.Text = strArray[2]; this.TxtPopCookieHour.Text = strArray[3]; this.DropPopPosition.SelectedIndex = this.DropPopPosition.Items.IndexOf(this.DropPopPosition.Items.FindByValue(strArray[4])); return; case ADZoneType.Move: this.TxtMoveLeft.Text = strArray[0]; this.TxtMoveTop.Text = strArray[1]; this.TxtMoveDelay.Text = strArray[2]; BasePage.SetSelectedIndexByValue(this.RadlMoveShowCloseAD, strArray[3]); this.TxtMoveCloseFontColor.Text = strArray[4]; this.DropMovePosition.SelectedIndex = this.DropMovePosition.Items.IndexOf(this.DropMovePosition.Items.FindByValue(strArray[5])); return; case ADZoneType.Fixed: this.TxtFixedLeft.Text = strArray[0]; this.TxtFixedTop.Text = strArray[1]; BasePage.SetSelectedIndexByValue(this.RadlFixedShowCloseAD, strArray[2]); this.TxtFixedCloseFontColor.Text = strArray[3]; this.DropFixedPosition.SelectedIndex = this.DropFixedPosition.Items.IndexOf(this.DropFixedPosition.Items.FindByValue(strArray[4])); return; case ADZoneType.Float: this.DropFloatType.SelectedIndex = this.DropFloatType.Items.IndexOf(this.DropFloatType.Items.FindByValue(strArray[0])); this.TxtFloatLeft.Text = strArray[1]; this.TxtFloatTop.Text = strArray[2]; BasePage.SetSelectedIndexByValue(this.RadlFloatShowCloseAD, strArray[3]); this.TxtFloatCloseFontColor.Text = strArray[4]; this.DropFloatPosition.SelectedIndex = this.DropFloatPosition.Items.IndexOf(this.DropFloatPosition.Items.FindByValue(strArray[5])); return; case ADZoneType.Couplet: this.TxtCoupletLeft.Text = strArray[0]; this.TxtCoupletTop.Text = strArray[1]; this.TxtCoupletDelay.Text = strArray[2]; BasePage.SetSelectedIndexByValue(this.RadlCoupletShowCloseAD, strArray[3]); this.TxtCoupletCloseFontColor.Text = strArray[4]; break; default: return; } }
public bool SaveJSTemplate(string template, ADZoneType zoneType) { string templateName = this.GetTemplateName(zoneType); try { FileSystemObject.WriteFile(GetJsTemplatePath() + templateName, template); return(true); } catch { return(false); } }
public ADZoneInfo(int zoneId, string zoneName, string zoneJSName, string zoneIntro, ADZoneType zoneType, bool defaultSetting, string setting, int zoneWidth, int zoneHeight, bool active, int showType, DateTime updateTime) { this.m_ZoneId = zoneId; this.m_ZoneName = zoneName; this.m_ZoneJSName = zoneJSName; this.m_ZoneIntro = zoneIntro; this.m_ZoneType = zoneType; this.m_DefaultSetting = defaultSetting; this.m_Seting = setting; this.m_ZoneWidth = zoneWidth; this.m_ZoneHeight = zoneHeight; this.m_Active = active; this.m_ShowType = showType; this.m_UpdateTime = updateTime; }
public string GetTemplateName(ADZoneType zoneType) { return("Template_" + this.zoneConfig[zoneType] + ".js"); }
public string GetADZoneJSTemplateContent(ADZoneType zoneType) { string templateName = this.GetTemplateName(zoneType); return(FileSystemObject.ReadFile(GetJsTemplatePath() + templateName)); }