public void Execute() { ProfileModel profile = profileCollection.Get(args.ItemId); List <PlaceholderModel> placeholders = layoutIO.LoadProfileLayout(profile); if (placeholders == null) { return; } // TODO gestion des erreurs, chargemetn de fichiers, bitmaps... BackgroundModel background = backgroundCollection.Get(profile.BackgroundId); selectionModel.Unselect(); screen.SetBackground(background); placeholderCollection.Clear(); placeholderCollection.AddRange(placeholders); assetFactory.SetMotec(motecCollection.Get(profile.MotecId)); selectedProfile.SelectProfile(profile); layoutIO.DispatchSaveStatus(); }
public void Execute() { List <PlaceholderModel> placeholders = null; try { placeholders = layoutIO.LoadDefaultR3eLayout(); } catch (Exception e) { MessageBox.Show("Error while parsing HUD xml file, application will exit.\n" + e.Message, "Error"); Environment.Exit(0); } if (placeholders != null) { selectionModel.Unselect(); selectedProfile.SelectNone(); placeHolderCollection.Clear(); placeHolderCollection.AddRange(placeholders); layoutIO.DispatchSaveStatus(); } }
public void Execute() { selectionModel.Unselect(); }