public Item(IItemDefinition definition, Guid parentId, IEnumerable <IItemDefinition> children, PresentationDetails details = null) { _definition = definition; ParentId = parentId; Children = children; PresentationDetails = details; }
private async void PresentationButton_Click(object sender, RoutedEventArgs e) { Presentation.IsEnabled = false; if (currentArticle.PresentationId.HasValue) { var presentation = await presCore.GetPresentationByIdAsync(currentArticle.PresentationId.Value); PresentationDetails newWindow = new PresentationDetails(presentation); newWindow.ShowDialog(); } Presentation.IsEnabled = true; }
private void miLoadMap_Click(object sender, RoutedEventArgs e) { try { OpenFileDialog ofdDialog = new OpenFileDialog(); ucPlace.m_nIndexTable = 0; ofdDialog.Filter = "XML Files (.xml)|*.xml"; if ((bool)ofdDialog.ShowDialog()) { cnvPool.Children.Clear(); PresentationDetails pdDetails = PresenetationProvider.ReadPresentation(ofdDialog.FileName); foreach (KeyValuePair<Point, ObjectDetails> pair in pdDetails.dicObject) { switch (pair.Value.poType) { case PresentationObject.POOL_TABLE: AddPlaceToCanvas("PoolTable", pair.Key); break; case PresentationObject.BAR_CHAIR: AddPlaceToCanvas("BarChair", pair.Key); break; case PresentationObject.BAR_TABLE: AddPlaceToCanvas("BarTable", pair.Key); break; default: break; } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }