protected override void PostBuild(Level level) { level.OnActorDrop += actor => { if (actor.CurrentPlatform == Platforms.First()) { LevelContext.SuppressHint(RUN_DOWN_HINT); DroppedFromFirstPlatform = true; } }; level.OnActorDeath += actor => { if (DroppedFromFirstPlatform) { LevelContext.DisplayMessage("EPIC"); } else if (_steppedOnHighOneWay) { LevelContext.DisplayMessage("Now I'm disappointed"); } }; _checkpoint.OnActorLanding += actor => level.SaveCheckpoint(); }
public void SetItemDetails() { if (currentGroupItem == null || currentGroupItem.IsSpoof) { SelectedBrand = null; SelectedFreq = null; SelectedDeliveryMethod = null; SelectedPlatform = null; SelectedSpecialist = null; ContractName = null; if (ReportTypes != null) { ReportTypes.ForEach((thislist, thisreport) => RemoveWeakEventListener(thisreport, ReportListener)); ReportTypes = new ObservableReportTypes(safeReportTypes, true); ReportTypes.ForEach((thislist, thisreport) => AddWeakEventListener(thisreport, ReportListener)); } ClientLocations = null; RaisePropertyChanged("ReportTypes"); ReportText = "Select Report Types..."; return; } if (/*DB.Connnected &&*/ ReportTypes == null) { ReportTypes = new ObservableReportTypes(ReportTypesTarget.GetReportTypesAsList()); safeReportTypes = new ObservableReportTypes(ReportTypes, true); } if (CurrentGroupItem.ContractID == null) { ContractName = "No Contract assigned."; } else { Contract contract = ContractTarget.GetByContractID((int)CurrentGroupItem.ContractID); if (contract == null) { ContractName = "No contract found for this Group."; } else { ContractName = contract.DESCR; } } AddWeakEventListener(CurrentGroupItem, EncryptListener); IgReports = InvoiceGrpReportsTarget.GetById(currentGroupItem.InvoiceGrpId); foreach (ReportType reportType in ReportTypes) { foreach (InvoiceGrpReport igr in IgReports) { if (igr.REPORT_TYPE_ID == reportType.REPORT_TYPE_ID) { reportType.IsSelected = true; } else { reportType.IsSelected = false; } } } RaisePropertyChanged("ReportTypes"); base.ViewCore.UpdateCB(); SelectedSpecialist = (Specialists.First(ss => ss.Id == currentGroupItem.BillingSpecialistID) as BillingSpecialist); SelectedFreq = (Freqs.First(f => f.FREQ == currentGroupItem.BillingFrequency) as Freq); SelectedPlatform = (Platforms.First(p => p.PLATFORM == currentGroupItem.PrimaryPlatform) as Platform); SelectedDeliveryMethod = (DeliveryMethods.First(dm => dm.TheDeliveryMethod == currentGroupItem.DeliveryMethod) as DeliveryMethod); SelectedBrand = (Brands.FirstOrDefault(b => b.BRAND == currentGroupItem.Brand) as Brand); SelectedRemitTo = (RemitTos.First(r => r.REMIT_TO_ID == currentGroupItem.RemitToID) as RemitTo); SelectedInvoiceStyle = (InvoiceStyles.First(i => i.INVOICE_STYLE == currentGroupItem.InvoiceStyle) as InvoiceStyle); SelectedInvoiceGrpStatus = (InvoiceGrpStatuss.First(i => i.INVOICE_GRP_STATUS == currentGroupItem.InvoiceGroupStatus) as InvoiceGrpStatus); if (ClientLocations != null) { ClientLocations.CollectionChanged -= ClientLocCollectionChanged; } ClientLocations = ExtClientTarget.FetchLocations(CurrentGroupItem.InvoiceGrpId, true); ClientLocations.CollectionChanged += ClientLocCollectionChanged; currentGroupItem.Modified = false; GroupVM.EnablePicker = true; }