private void load() { // Required for the pop in/out animation RelativePositionAxes = Axes.Both; Children = new Drawable[] { topBar = new ChatOverlayTopBar { RelativeSizeAxes = Axes.X, Height = top_bar_height, }, channelList = new ChannelList { RelativeSizeAxes = Axes.Y, Width = side_bar_width, Padding = new MarginPadding { Top = top_bar_height }, }, new Container { RelativeSizeAxes = Axes.Both, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Padding = new MarginPadding { Top = top_bar_height, Left = side_bar_width, Bottom = chat_bar_height, }, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background4, }, currentChannelContainer = new Container <ChatOverlayDrawableChannel> { RelativeSizeAxes = Axes.Both, }, loading = new LoadingLayer(true), channelListing = new ChannelListing { RelativeSizeAxes = Axes.Both, }, }, }, textBar = new ChatTextBar { RelativeSizeAxes = Axes.X, Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Padding = new MarginPadding { Left = side_bar_width }, }, }; }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ChannelListing = await _context.ChannelListings.FirstOrDefaultAsync(m => m.ID == id); if (ChannelListing == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ChannelListing = await _context.ChannelListings.FindAsync(id); if (ChannelListing != null) { _context.ChannelListings.Remove(ChannelListing); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }