public HeroVirtualTabletopMainViewModelImpl(IEventAggregator eventAggregator, CrowdMemberExplorerViewModel crowdMemberExplorerViewModel, RosterExplorerViewModel rosterExplorerViewModel, CharacterEditorViewModel characterEditorViewModel, IdentityEditorViewModel identityEditorViewModel, AbilityEditorViewModel abilityEditorViewModel, MovementEditorViewModel movementEditorViewModel, ActiveCharacterWidgetViewModel activeCharacterWidgetViewModel, AttackConfigurationWidgetViewModel attackConfigurationWidgetViewModel, PopupService popupService, IconInteractionUtility iconInteractionUtility, DesktopContextMenu desktopContextMenu, Camera camera) { this.eventAggregator = eventAggregator; this.CrowdMemberExplorerViewModel = crowdMemberExplorerViewModel; this.RosterExplorerViewModel = rosterExplorerViewModel; this.CharacterEditorViewModel = characterEditorViewModel; this.IdentityEditorViewModel = identityEditorViewModel; this.AbilityEditorViewModel = abilityEditorViewModel; this.MovementEditorViewModel = movementEditorViewModel; this.ActiveCharacterWidgetViewModel = activeCharacterWidgetViewModel; this.AttackConfigurationWidgetViewModel = attackConfigurationWidgetViewModel; this.iconInteractionUtility = iconInteractionUtility; this.camera = camera; this.popupService = popupService; this.desktopContextMenu = desktopContextMenu; RegisterPopups(); gameInitializeTimer = new System.Threading.Timer(gameInitializeTimer_Callback, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); LaunchGame(); this.eventAggregator.Subscribe(this); //this.eventAggregator.GetEvent<AddToRosterEvent>().Subscribe((IEnumerable<CrowdMemberModel> models) => { this.IsRosterExplorerExpanded = true; }); //this.eventAggregator.GetEvent<EditCharacterEvent>().Subscribe((Tuple<ICrowdMemberModel, IEnumerable<ICrowdMemberModel>> tuple) => { this.IsCharacterEditorExpanded = true; }); //this.eventAggregator.GetEvent<EditIdentityEvent>().Subscribe((Tuple<Identity, Character> tuple) => { this.IsIdentityEditorExpanded = true; }); //this.eventAggregator.GetEvent<EditAbilityEvent>().Subscribe((Tuple<AnimatedAbility, Character> tuple) => { this.IsAbilityEditorExpanded = true; }); //this.eventAggregator.GetEvent<EditMovementEvent>().Subscribe((CharacterMovement cm) => { this.IsMovementEditorExpanded = true; }); //this.eventAggregator.GetEvent<CreateCrowdFromModelsEvent>().Subscribe((CrowdModel crowd) => { this.IsCrowdFromModelsExpanded = true; }); //this.eventAggregator.GetEvent<AttackInitiatedEvent>().Subscribe((Tuple<Character, Attack> tuple) => { this.IsRosterExplorerExpanded = true; }); }
private static void Uninstall(bool allUsers, ImageFileType[] types) { try { var desktopContextMenu = new DesktopContextMenu(); desktopContextMenu.UninstallHandler(allUsers, types); } catch (Exception ex) { ErrorMsgBox( "Uninstallation failed", "Could not remove context menu entries from Windows Explorer.\n\n" + ex.Message); return; } InfoMsgBox( "Uninstallation succeeded", "Context menu entries were removed from Windows Explorer."); }
private static void Install(string menuText, bool includeFileName, bool allUsers, bool resizeOnUpload, IEnumerable <ImageFileType> types) { try { var desktopContextMenu = new DesktopContextMenu(); desktopContextMenu.InstallHandler(menuText, includeFileName, allUsers, resizeOnUpload, types); } catch (Exception ex) { ErrorMsgBox( "Installation failed", "Could not add context menu entries to Windows Explorer.\n\n" + ex.Message); return; } InfoMsgBox( "Installation succeeded", "Context menu entries were added to Windows Explorer. " + "Remember to reinstall the program if you move or rename it!"); }