void CreateLayout(SampleDataGroup dataGroup, PageGroup child) { for (int i = 0; i < dataGroup.Items.Count; i++) { CreateLayoutCore(dataGroup.Items[i], child, i); } }
void CreateLayout() { foreach (SampleDataGroup group in dataSource.Data.Groups) { //esto es ub comentario //No quiero modificar tileContainer.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton(group.Title, null, -1, DevExpress.XtraBars.Docking2010.ImageLocation.AboveText, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, null, true, -1, true, null, false, false, true, null, group, -1, false, false)); PageGroup pageGroup = new PageGroup(); pageGroup.Parent = tileContainer; pageGroup.Caption = group.Title; windowsUIView.ContentContainers.Add(pageGroup); groupsItemDetailPage.Add(group, CreateGroupItemDetailPage(group, pageGroup)); foreach (SampleDataItem item in group.Items) { ItemDetailPage itemDetailPage = new ItemDetailPage(item); itemDetailPage.Dock = System.Windows.Forms.DockStyle.Fill; BaseDocument document = windowsUIView.AddDocument(itemDetailPage); document.Caption = item.Title; pageGroup.Items.Add(document as Document); CreateTile(document as Document, item).ActivationTarget = pageGroup; } } windowsUIView.ActivateContainer(tileContainer); tileContainer.ButtonClick += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(buttonClick); }
public async Task <IActionResult> Edit([Bind("GroupId,GroupTitle")] PageGroup pageGroup) { //if (id != pageGroup.GroupId) //{ // return NotFound(); //} //if (id != pageGroup.GroupId) //{ // return NotFound(); //} if (ModelState.IsValid) { try { _pageGroupRepository.UpdatePageGroup(pageGroup); _pageGroupRepository.Save(); } catch (DbUpdateConcurrencyException) { if (!PageGroupExists(pageGroup.GroupID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pageGroup)); }
public async Task <IActionResult> PutPageGroup(int id, PageGroup pagegroup) { var result = new Result <object>(); try { var pageGroup = await _ablemusicContext.PageGroup .Where(x => x.PageGroupId == id) .FirstOrDefaultAsync(); if (pageGroup == null) { return(NotFound(DataNotFound(result))); } pageGroup = await _ablemusicContext.PageGroup .Where(s => s.PageGroupId == id).FirstOrDefaultAsync(); pageGroup.PageGroupName = pagegroup.PageGroupName; pageGroup.DisplayOrder = pagegroup.DisplayOrder; pageGroup.Icon = pagegroup.Icon; _ablemusicContext.Update(pageGroup); await _ablemusicContext.SaveChangesAsync(); result.Data = "success"; } catch (Exception e) { result.ErrorMessage = e.Message; result.IsSuccess = false; return(BadRequest(result)); } result.Data = pagegroup; return(Ok(result)); }
public async Task <IActionResult> Edit(int id, [Bind("GroupID,GroupTitle")] PageGroup pageGroup) { if (id != pageGroup.GroupID) { return(NotFound()); } if (ModelState.IsValid) { try { pageGroups.Update(pageGroup); pageGroups.Save(); } catch (DbUpdateConcurrencyException) { if (!PageGroupExists(pageGroup.GroupID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pageGroup)); }
public PageGroup Generate() { TargetPageGroup = TargetPlayerDb.PageGroups.Find(MMUnitSource.Id); if (TargetPageGroup != null) return TargetPageGroup; TargetPageGroup = TargetPlayerDb.PageGroups.NewRow(); TargetPageGroup.Id = MMUnitSource.Id; TargetPageGroup.Name = $"{MMUnitSource.NameId} - {MMUnitSource.MMForeignUnitTyp.TypNameId} - {MMUnitSource.Id}"; TargetPageGroup.Table.Rows.Add(TargetPageGroup); if (MMUnitSource.PagingType == MMUnitSource.DataSet.DirectPlayerPage) { foreach (DbEntities.dbserver3.multimedia.rows.Page page in MMUnitSource.Pages.OrderBy(ord => ord.ISortOrder)) { CreatePlayerRootPage(page); } } else { foreach (MMPart mmPart in MMUnitSource.MMParts.OrderBy(ord => ord.SortOrder)) { CreatePlayerPage(mmPart); } } return TargetPageGroup; }
protected virtual void PushGroupHeader(PageBase topage, bool first) { if (null == topage.Header) { if (first == false && null != this._group.ContinuationHeader) { topage.Header = this._group.ContinuationHeader; } else if (null != this._group.Header) { topage.Header = this._group.Header; } } //Set the continuation header of inner sections and page-groups if we have one and they don't if (null != this._group.ContinuationHeader) { if (topage is Section) { Section section = (Section)topage; if (null == section.ContinuationHeader) { section.ContinuationHeader = this._group.ContinuationHeader; } } else if (topage is PageGroup) { PageGroup innergrp = (PageGroup)topage; if (null == innergrp.ContinuationHeader) { innergrp.ContinuationHeader = this._group.ContinuationHeader; } } } }
public ActionResult DeleteConfirmed(int id) { PageGroup pageGroup = db.PageGroups.Find(id); db.PageGroups.Remove(pageGroup); db.SaveChanges(); return(RedirectToAction("Index")); }
//---------------------------------------------------------------------- public override void Update(float _fElapsedTime) { mCloseButton.Update(_fElapsedTime); PageGroup.Update(_fElapsedTime); mTooltip.EnableDisplayTimer = mNotebook.HoveredTab == this && mNotebook.DraggedTab != this; mTooltip.Update(_fElapsedTime); }
public ActionResult DeleteConfirmed(int id) { PageGroup pageGroup = db.PageGroupRepository.GetById(id); db.PageGroupRepository.Delete(pageGroup); db.Commit(); return(RedirectToAction("Index")); }
//void CreateLayout(SampleDataGroup dataGroup, PageGroup child) //{ // for (int i = 0; i < dataGroup.Items.Count; i++) // CreateLayoutCore(dataGroup.Items[i], child, i); //} void CreateLayout(List <MainMenu> dataGroup, PageGroup child) { for (int i = 0; i < dataGroup.Count; i++) { //根据用户权限控制是否显示Tile ////if (MainForm.userPermissions.Count > 0 && MainForm.userPermissions.Find(o => o.Caption.Trim() == dataGroup[i].Caption.Trim()).CheckBoxState) CreateLayoutCore(dataGroup[i], child, i); } }
public ActionResult Edit([Bind(Include = "GroupId,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { db.Entry(pageGroup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
public GroupItemDetailPage(SampleDataItem item, PageGroup child, int index) { InitializeComponent(); pageGroupCore = child; indexCore = index; labelTitle.Text = item.Title; labelSubtitle.Text = item.Subtitle; imageControl.Image = DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(item.ImagePath, typeof(ItemDetailPage).Assembly); labelDescription.Text = item.Description; }
public ActionResult Edit([Bind(Include = "GroupID,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { pageGroupRepository.UpdatePageGroup(pageGroup); pageGroupRepository.Save(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
public IActionResult Create([Bind("GroupID,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { _pageService.InsertPageGroup(pageGroup); _pageService.Save(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
public GroupDetailPage(SampleDataGroup dataGroup, PageGroup child) { InitializeComponent(); pageGroupCore = new PageGroup(); pageGroupCore.Caption = dataGroup.Title; imageControl.Image = DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(dataGroup.ImagePath, typeof(MainForm).Assembly); labelSubtitle.Text = dataGroup.Subtitle; labelDescription.Text = dataGroup.Description; CreateLayout(dataGroup, child); }
public ActionResult Edit([Bind(Include = "GroupID,Title")] PageGroup pageGroup) { if (ModelState.IsValid) { db.PageGroupRepository.Update(pageGroup); db.Commit(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
public async Task <IActionResult> Create([Bind("GroupID,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { PageGroupRepository.InsertPageGroup(pageGroup); PageGroupRepository.Save(); return(RedirectToAction(nameof(Index))); } return(View(pageGroup)); }
public ActionResult DeleteConfirmed(Guid id) { PageGroup pageGroup = db.PageGroups.Find(id); pageGroup.IsDelete = true; pageGroup.DeleteDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); }
void tile_Click(object sender, TileClickEventArgs e) { PageGroup page = ((e.Tile as Tile).ActivationTarget as PageGroup); if (page != null) { page.Parent = tileContainer; page.SetSelected((e.Tile as Tile).Document); } }
public async Task <IActionResult> Create([Bind("PageGroupID,PageGroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { _context.Add(pageGroup); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pageGroup)); }
public ActionResult Create([Bind(Include = "GroupId,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { db.PageGroups.Add(pageGroup); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
PageGroup CreateGroupItemDetailPage(SampleDataGroup group, PageGroup child) { GroupDetailPage page = new GroupDetailPage(group, child); PageGroup pageGroup = page.PageGroup; BaseDocument document = windowsUIView.AddDocument(page); pageGroup.Parent = tileContainer; pageGroup.Items.Add(document as Document); windowsUIView.ContentContainers.Add(pageGroup); windowsUIView.ActivateContainer(pageGroup); return pageGroup; }
/// <summary> /// /// </summary> /// <param name="currentGroup"></param> /// <param name="items"></param> private static void BuildGroup(RibbonPageGroup currentGroup, PageGroup items) { if (items == null) { return; } foreach (var item in items.Parts.OfType <MenuButton>()) { currentGroup.Items.Add(CreateButton(item)); } }
public ActionResult Create([Bind(Include = "GroupId,GroupTitle")] PageGroup pageGroup) { if (ModelState.IsValid) { db.PageGroupRepository.Insert(pageGroup); db.Save(); return(RedirectToAction("Index")); } return(View(pageGroup)); }
public bool DeletePageGroup(PageGroup pageGroup) { try { db.Entry(pageGroup).State = System.Data.Entity.EntityState.Deleted; return(true); } catch (Exception) { return(false); } }
private PageGroup CreateGroupItemDetailPage(PageDataGroup group, PageGroup child) { GroupDetailPage page = new GroupDetailPage(group, child); PageGroup pageGroup = page.PageGroup; BaseDocument document = windowsUIView.AddDocument(page); pageGroup.Parent = tileContainer; pageGroup.Items.Add(document as Document); windowsUIView.ContentContainers.Add(pageGroup); windowsUIView.ActivateContainer(pageGroup); return(pageGroup); }
public LayoutEnginePageGroup(PageGroup group, IPDFLayoutEngine parent, PDFLayoutContext context, Style full) { if (null == group) { throw new ArgumentNullException("group"); } this._group = group; this._parent = parent; this._context = context; this._full = full; this.ContinueLayout = true; }
public bool InsertNewPageGroup(PageGroup pageGroup) { try { db.pageGroups.Add(pageGroup); return(true); } catch (Exception) { return(false); } }
PageGroup CreateGroupItemDetailPage(SampleDataGroup group, PageGroup child) { GroupDetailPage page = new GroupDetailPage(group, child); PageGroup pageGroup = page.PageGroup; BaseDocument document = windowsUIView.AddDocument(page); pageGroup.Parent = tileContainer; pageGroup.Properties.ShowPageHeaders = DevExpress.Utils.DefaultBoolean.False; pageGroup.Items.Add(document as Document); windowsUIView.ContentContainers.Add(pageGroup); windowsUIView.ActivateContainer(pageGroup); return(pageGroup); }
// GET: Admin/PageGroups/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PageGroup pageGroup = db.PageGroupRepository.GetById(id); if (pageGroup == null) { return(HttpNotFound()); } return(PartialView(pageGroup)); }
// GET: Admin/PageGroups/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PageGroup pageGroup = pageGroupRepository.GetGroupById(id.Value); if (pageGroup == null) { return(HttpNotFound()); } return(View(pageGroup)); }
void CreateLayoutCore(SampleDataItem item, PageGroup child, int index) { ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); DevExpress.XtraLayout.LayoutControlItem layoutTileItem = new DevExpress.XtraLayout.LayoutControlItem(); GroupItemDetailPage page = new GroupItemDetailPage(item, child, index); page.Tag = pageGroupCore; layoutTileItem.Control = page; layoutTileItem.Location = new System.Drawing.Point(0, 0); layoutTileItem.MinSize = new System.Drawing.Size(winLayoutControl1.Width, page.Height); layoutTileItem.MaxSize = new System.Drawing.Size(0, page.Height); layoutTileItem.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutTileItem.TextSize = new System.Drawing.Size(0, 0); layoutTileItem.TextToControlDistance = 0; layoutTileItem.TextVisible = false; layoutControlGroup2.Add(layoutTileItem); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); }
private PageGroup Generate() { TargetPageGroup = TargetPlayerDb.PageGroups.Find(MMUnitSource.Id); if (TargetPageGroup != null) return TargetPageGroup; TargetPageGroup = TargetPlayerDb.PageGroups.NewRow(); TargetPageGroup.Id = MMUnitSource.Id; TargetPageGroup.Name = $"{MMUnitSource.NameId} - {MMUnitSource.MMForeignUnitTyp.TypNameId} - {MMUnitSource.Id}"; TargetPageGroup.Table.Rows.Add(TargetPageGroup); foreach (MMPart mmPart in MMUnitSource.MMParts.OrderBy(ord => ord.SortOrder)) { CreatePlayerPage(mmPart); } return TargetPageGroup; }
void CreateLayout() { foreach (SampleDataGroup group in dataSource.Data.Groups) { tileContainer.Buttons.Add(new DevExpress.XtraBars.Docking2010.WindowsUIButton(group.Title, null, -1, DevExpress.XtraBars.Docking2010.ImageLocation.AboveText, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, null, true, -1, true, null, false, false, true, null, group, -1, false, false)); PageGroup pageGroup = new PageGroup(); pageGroup.Parent = tileContainer; pageGroup.Caption = group.Title; windowsUIView.ContentContainers.Add(pageGroup); groupsItemDetailPage.Add(group, CreateGroupItemDetailPage(group, pageGroup)); foreach (SampleDataItem item in group.Items) { ItemDetailPage itemDetailPage = new ItemDetailPage(item); itemDetailPage.Dock = System.Windows.Forms.DockStyle.Fill; BaseDocument document = windowsUIView.AddDocument(itemDetailPage); document.Caption = item.Title; pageGroup.Items.Add(document as Document); CreateTile(document as Document, item).ActivationTarget = pageGroup; } } windowsUIView.ActivateContainer(tileContainer); tileContainer.ButtonClick += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(buttonClick); }
private async Task LoadData() { // Fetch the list of pages from DNN var client = new HttpClient(); client.DefaultRequestHeaders.Add( "Authorization", "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes("dnnconnect:dnnconnect"))); var pageJson = JObject.Parse( await client.GetStringAsync( "http://mydnnsite/DesktopModules/InternalServices/API/ItemListService/GetPages")); var pages = ParsePageJson(pageJson["Tree"]); // Group the pages by first letter of name var pageGroups = pages.Select(page => page.Name.Substring(0, 1)).Distinct().OrderBy(ch => ch).Select( ch => { var pageGroup = new PageGroup { Title = ch.ToUpperInvariant(), LongTitle = "Starts with " + ch.ToUpperInvariant() }; pageGroup.AddRange(pages.Where(page => page.Name.Substring(0, 1) == ch).OrderBy(page => page.Name)); return pageGroup; }).ToList(); // Bind the view XAML to the data BindingContext = new ViewModel { PageGroups = pageGroups }; }
void CreateLayout(SampleDataGroup dataGroup, PageGroup child) { for (int i = 0; i < dataGroup.Items.Count; i++) CreateLayoutCore(dataGroup.Items[i], child, i); }
/* * use WPMedia use WPMedia select * from Timings where ConnectedId in (select BeitragID from VideoFilesZuBeitraege where FileID in (SELECT FileID FROM [WPMedia].[dbo].[VideoFiles] where not BeitragsTyp = 'PlayingPackage' and not BeitragsTyp = 'Video' and not BeitragsTyp = 'ExternesProgramm')) select * from StructuredMaterialDataBase where FileId in (SELECT FileID FROM [WPMedia].[dbo].[VideoFiles] where not BeitragsTyp = 'PlayingPackage' and not BeitragsTyp = 'Video' and not BeitragsTyp = 'ExternesProgramm') select * from BeitraegeZuZuordnungen where BeitragID in (select BeitragID from Beitraege where BeitragId in (select BeitragID from VideoFilesZuBeitraege where FileID in (SELECT FileID FROM [WPMedia].[dbo].[VideoFiles] where not BeitragsTyp = 'PlayingPackage' and not BeitragsTyp = 'Video' and not BeitragsTyp = 'ExternesProgramm'))) E06B9253-D90C-4ABC-B333-05880EC9697B 9AC3704B-D62E-4D99-87F7-0F5DF8E87380 E5586956-54FF-4C1B-B71C-1C96AF03009B 2FF02774-2E2B-41A7-A65C-22D50585A465 29399797-9387-4C3C-A833-24F0C00FC2BB 577A17CE-2154-4429-886B-26CAFFBE965B 77E133F3-3AA9-48E7-9E15-418DC4941493 684B80E9-E585-425F-BC90-514AD22A5245 1A27507B-1E93-458B-805B-5F0CA806E2D3 88C3DB2B-76F9-42E5-B521-75D8E1F4D9D0 AA129509-DFC9-4625-91C3-A94B4D27CBD6 6E6CD009-1CB2-4AB0-A57D-F1B453D8FB56 BA7E7E24-8B11-46B9-B9A2-F948ED792722 select * from Beitraege where BeitragId in (select BeitragID from VideoFilesZuBeitraege where FileID in (SELECT FileID FROM [WPMedia].[dbo].[VideoFiles] where not BeitragsTyp = 'PlayingPackage' and not BeitragsTyp = 'Video' and not BeitragsTyp = 'ExternesProgramm')) SELECT * FROM [WPMedia].[dbo].[VideoFiles] where not BeitragsTyp = 'PlayingPackage' and not BeitragsTyp = 'Video' and not BeitragsTyp = 'ExternesProgramm' select * from VideoFiles where not FileID in (SELECT FileID FROM VideoFilesZuBeitraege ) and beitragsTyp = 'ExternesProgramm' select * from StructuredMaterialDataBase where FileId in (SELECT FileID from VideoFiles where not FileID in (SELECT FileID FROM VideoFilesZuBeitraege ) and beitragsTyp = 'ExternesProgramm') */ #region Manipulating PlayLists public String CreateAndStorePageGroupAsDataSet(PageGroup pageGroup, String pageGroupSerializedName = "") { pageGroup.DataSet.SetHasBeenLoaded(); RingPlayerDb dataSet = pageGroup.Copy_BundledData_In_New_DataSet(true); FileInfo fileInfo; if (String.IsNullOrEmpty(pageGroupSerializedName)) fileInfo = VisualBasics.CreateScreenGroupFileInfo(pageGroup.Id, pageGroup.Name); else fileInfo = VisualBasics.GetWeatherScreenGroupFileInfo($"{pageGroupSerializedName}.ScreenGroup"); if (!fileInfo.Exists) dataSet.SaveAs_SerializedBinary(fileInfo); return fileInfo.FullName; }