public MainWindow(IMtmMainModel mainModel) { this.InitializeComponent(); this.InitializePlugins(); this.mainModel = mainModel; this.DataContext = mainModel; }
public ModTechMasterHome(IModService modService, IMtmMainModel mainModel, IMessageService messageService) { this.MessageService = messageService; this.InitializeComponent(); this.Model = new HomeModel(modService, mainModel, MessageService); this.PluginCommands = new List <IPluginCommand> { new LoadModsCommand(this.Model) }; this.DataContext = this.Model; }
public ModCopyPage( IModService modService, ILogger logger, IMtmMainModel mainModel, IMessageService messageService) { this.MessageService = messageService; Self = this; this.ModCopyModel = new ModCopyModel( modService, logger, mainModel, new ReferenceFinderService(), messageService); this.InitializeComponent(); this.ModCopyModel.PropertyChanged += (sender, args) => { if (args.PropertyName == "ModCollectionNode") { this.Dispatcher.Invoke( () => this.tvModControl.ItemsSource = this.ModCopyModel.ModCollectionData); } }; this.tvModControl.SelectedItemChanged += this.ModCopyModel.OnSelectedItemChanged; this.PluginCommands = new List <IPluginCommand> { ModCopyModel.ResetSelectionsCommand, ModCopyModel.SelectMechsFromDataFileCommand, ModCopyModel.BuildCustomCollectionCommand, ModCopyModel.ValidateLanceDefinitionsCommand, ModCopyModel.SelectVeesFromDataFileCommand, ModCopyModel.ViewObjectSummaryWindow }; this.DataContext = this; }
public ModCopyModel( IModService modService, ILogger logger, IMtmMainModel mainModel, IReferenceFinderService referenceFinderService, IMessageService messageService) { this.modService = modService; this.logger = logger; this.ReferenceFinderService = referenceFinderService; this.MessageService = messageService; this.MainModel = mainModel; this.modService.PropertyChanged += this.ModServiceOnPropertyChanged; ResetSelectionsCommand = new ResetSelectionsCommand(this); SelectMechsFromDataFileCommand = new SelectMechsFromDataFileCommand(this); BuildCustomCollectionCommand = new BuildCustomCollectionCommand(this); ValidateLanceDefinitionsCommand = new ValidateLanceDefinitionsCommand(this); SelectVeesFromDataFileCommand = new SelectVeesFromDataFileCommand(this); ViewObjectSummaryWindow = new DelegatePluginCommand( () => { if (ObjectSummaryWindow == null) { ObjectSummaryWindow = new ObjectSummaryWindow(this); ObjectSummaryWindow.Topmost = true; ObjectSummaryWindow.Show(); } else { ObjectSummaryWindow.Activate(); } }, () => true, this, @"Show Object Summary Window"); }
public HomeModel(IModService modService, IMtmMainModel mainModel, IMessageService messageService) { this.MessageService = messageService; this.modService = modService; this.mainModel = mainModel; }