public IPage CreatePage(PageSelection element, string pageId) { UserControl page; string headerName; switch (element) { case PageSelection.CardGame: page = new CardGame(pageId); headerName = "PAO Card Game"; break; case PageSelection.ShowHelp: headerName = "Help"; page = new Help(pageId); break; case PageSelection.NumberGame: page = new NumbersGame(pageId); headerName = "Number Game"; break; default: throw new Exception("Unknown page selection detected"); } CreateTab(page, pageId, headerName); return(page as IPage); }
private void nextButton_Click(object sender, EventArgs e) { _pageIndex = PageSelection.SecondPage; if (_webApiSharedPortable) { EntitiesTypeSelection selection = GetEntitiesTypeSelection(clientServiceListView); switch (selection) { case EntitiesTypeSelection.ClientServiceEntities: if (!portableDotNetListView.Items.Contains(_portableListViewItemItem)) { portableDotNetListView.Items.Insert(1, _portableListViewItemItem); portableDotNetListView.Items[1].EnsureVisible(); portableDotNetListView.Items[0].Focused = true; portableDotNetListView.Items[0].Selected = true; } break; case EntitiesTypeSelection.SharedEntities: if (portableDotNetListView.Items.Contains(_portableListViewItemItem)) { portableDotNetListView.Items.Remove(_portableListViewItemItem); portableDotNetListView.Items[0].Focused = true; portableDotNetListView.Items[0].Selected = true; } break; } } SetPageState(); portableDotNetListView.Focus(); portableDotNetListView_SelectedIndexChanged(this, EventArgs.Empty); }
public void RefreshSelection() { PageSelection.Clear(); PageSelection.AddRange(Data.Game_EducationalDosBoxGames.Select(x => $"{x.Name} ({x.LaunchMode})")); ResetSelectedPageSelectionIndex(); Logger.Trace("EDU config selection has been modified with {0} items", PageSelection.Count); }
public AddOrChangePageApi(TemplateInsertionCommand templateInsertionCommand, PageRefreshEvent pageRefreshEvent, PageSelection pageSelection, SourceCollectionsList sourceCollectionsList) { _templateInsertionCommand = templateInsertionCommand; _pageRefreshEvent = pageRefreshEvent; _pageSelection = pageSelection; _sourceCollectionsList = sourceCollectionsList; }
public static bool ForPageLayout = false; // set when most recent relevant command is ShowChangeLayoutDialog public PageTemplatesApi(SourceCollectionsList sourceCollectionsList, BookSelection bookSelection, PageSelection pageSelection, TemplateInsertionCommand templateInsertionCommand, BookThumbNailer thumbNailer, Book.Book.Factory bookFactory, BookStorage.Factory storageFactory) { _sourceCollectionsList = sourceCollectionsList; _bookSelection = bookSelection; _pageSelection = pageSelection; _templateInsertionCommand = templateInsertionCommand; _thumbNailer = thumbNailer; _bookFactory = bookFactory; _storageFactory = storageFactory; }
private void previousButton_Click(object sender, EventArgs e) { _pageIndex = PageSelection.FirstPage; SetPageState(); if (_multiproject) { clientServiceListView.Focus(); clientServiceListView_SelectedIndexChanged(this, EventArgs.Empty); } else { serviceClientSharedListView.Focus(); serviceClientSharedListView_SelectedIndexChanged(this, EventArgs.Empty); } }
private void OpenPage(PageViewModel viewModel, PageSelection pageSelection) { var helper = FacadeFactory.Create(); var uiService = helper.Get <IUiService>(); if (uiService != null) { var newId = name_prefix + nextId; // Step one: Creata a new view model helper.Add(viewModel, newId); // Step two : Create a new UI Element var page = uiService.CreatePage(pageSelection, newId); // Step three: Add a link between them viewModel.Init(page); nextId++; } }
public SignLanguageApi(BookSelection bookSelection, PageSelection pageSelection) { _bookSelection = bookSelection; _pageSelection = pageSelection; DeactivateTime = DateTime.MaxValue; // no action needed on first activate. }
public void CurrentSelection_AfterPageIsInserted_GoesToNewPage() { var bs = new BookSelection(); var ps = new PageSelection(); //bs); // ps. }