コード例 #1
0
        /// <summary>
        /// initialize all property values for the mission status view model
        /// </summary>
        /// <returns>mission status view model</returns>
        private MissionStatusViewModel InitializeMissionStatusViewModel()
        {
            MissionStatusViewModel missionStatusViewModel = new MissionStatusViewModel();

            missionStatusViewModel.MissionInformation = GenerateMissionStatusInformation();

            missionStatusViewModel.Missions = new List <Mission>(_player.Missions);
            foreach (Mission mission in missionStatusViewModel.Missions)
            {
                if (mission is MissionTravel)
                {
                    mission.StatusDetail = GenerateMissionTravelDetail((MissionTravel)mission);
                }

                if (mission is MissionEngage)
                {
                    mission.StatusDetail = GenerateMissionEngageDetail((MissionEngage)mission);
                }

                if (mission is MissionGather)
                {
                    mission.StatusDetail = GenerateMissionGatherDetail((MissionGather)mission);
                }
            }

            return(missionStatusViewModel);
        }
コード例 #2
0
        public MissionStatusView(MissionStatusViewModel missionStatusViewModel)
        {
            _missionStatusViewModel = missionStatusViewModel;
            DataContext             = missionStatusViewModel;

            InitializeWindowTheme();

            InitializeComponent();
        }