/// <summary> /// Prepares the page with a given profile. /// </summary> /// <param name="profile">The profile to prepare with.</param> /// <param name="handler">The menu handler.</param> public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var pageProfile = (PageProfile)profile; this.Name = pageProfile.name; }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var objProfile = (IObjectProfile)profile; this.id = objProfile.label; this.alignment = objProfile.align; }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var menuProfile = (MenuProfile)profile; this.window.SetTitle(menuProfile.title); this.window.SetIcon(menuProfile.icon); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var textProfile = (IObjectProfileWithText)profile; this.textLabel.Label.SetText(textProfile.text); this.textLabel.Tooltip = textProfile.tooltip; }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var dummyProfile = (DummyProfile)profile; this.Frame.SetWidth(dummyProfile.width ?? 10); this.Frame.SetHeight(dummyProfile.height ?? 10); this.value = null; }
public virtual void Prepare(IElementProfile profile, IMenuHandler handler) { if (this.prepared) { throw new MenuException("Element is already prepared."); } this.prepared = true; this.handler = handler; this.Frame.Show(); }
/// <summary> /// Prepares the object with a given profile. /// </summary> /// <param name="profile">The profile to prepare with.</param> /// <param name="handler">The menu handler.</param> public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(null, handler); var lineProfile = (LineProfile)profile; this.leftBlock = GenerateAndPrepareBlock(lineProfile, ObjectAlign.l, handler); this.centerBlock = GenerateAndPrepareBlock(lineProfile, ObjectAlign.c, handler); this.rightBlock = GenerateAndPrepareBlock(lineProfile, ObjectAlign.r, handler); this.Content = new List <IAlignedBlock>(); this.Content.AddRange(new[] { this.leftBlock, this.centerBlock, this.rightBlock }.Where(b => b != null)); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var panelProfile = (PanelProfile)profile; var innerPageProfile = new PageProfile(); panelProfile.ForEach(innerPageProfile.Add); this.innerPage = (IPage)handler.CreateRegion(innerPageProfile); this.innerPage.Prepare(innerPageProfile, handler); this.name = panelProfile.name; }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); var menuProfile = (MenuProfile)profile; this.HandleOnShow(menuProfile); this.HandleOnHide(menuProfile); this.Inserts = new Inserts(); this.menuWidth = menuProfile.width; this.menuHeight = menuProfile.height; this.Frame["Name"] = menuProfile.name; }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.Content = new List <T>(); this.layout = handler.Layout; var containerProfile = profile as IContainerProfile <TProfile>; if (containerProfile == null) { return; } containerProfile.ToList().ForEach(p => { var regionProfile = (IMenuRegionProfile)p; var region = (T)handler.CreateRegion(regionProfile); this.Content.Add(region); region.Prepare(regionProfile, handler); }); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.DisplayTab(0); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.Inner = (IMenuObject)handler.CreateRegion((IObjectProfile)profile, true); this.Inner.Prepare(profile, handler); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.ApplyProfile((CustomDropDownProfile)profile); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.SetUpFromProfile((EditFieldProfile)profile); // this.SetUpTabbableObject(new TabableEditBox(this.frame.Text)); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.profile = (ButtonWithDropDownProfile)profile; this.button.SetScript(ButtonHandler.OnClick, this.OnClick); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.SetUpFromProfile((TextProfile)profile); }
public override void Prepare(IElementProfile profile, IMenuHandler handler) { base.Prepare(profile, handler); this.SetupFrame((ButtonProfile)profile); }