Example #1
0
        private void ButtonClick3(object sender, RoutedEventArgs e)
        {
            IList <MissionObjectDto> dtos = _missionObjectViewSource.Source as IList <MissionObjectDto>;

            if (dtos == null)
            {
                return;
            }
            foreach (MissionObjectDto dto in dtos)
            {
                _adminWs.AdminMissionObjectServiceSaveArrayMissionObject(MissionObjectConverter.MissionObjectToAdmin(dto.MissionObject), _username, Md5(_pwd));
            }
            Mission mission = ((MissionDto)lstMissions.SelectedItem).Mission;

            _adminWs.AdminMissionServiceSaveArrayMission(MissionConverter.MissionToAdmin(mission), _username, Md5(_pwd));

            ReloadMissions();
        }
Example #2
0
 private void Button_Click_3(object sender, RoutedEventArgs e)
 {
     Nme2WsAdmin.Nme2Ws adminWs = new Nme2WsAdmin.Nme2Ws();
     adminWs.AdminMissionServiceDeleteArrayMission(MissionConverter.MissionToAdmin(((MissionDto)lstMissions.SelectedItem).Mission), _username, Md5(_pwd));
     ReloadMissions();
 }
Example #3
0
        private void BtnNewMissionClick(object sender, RoutedEventArgs e)
        {
            try
            {
                MissionDto newDto = new MissionDto(new Mission()
                {
                    Active = 0, Name = "Neue Mission", CenterLat = 0.0, CenterLon = 0.0
                });

                newDto.Mission = MissionConverter.AdminToMission(_adminWs.AdminMissionServiceSaveArrayMission(MissionConverter.MissionToAdmin(newDto.Mission), _username, Md5(_pwd)));

                IList <MissionDto> dtos = (IList <MissionDto>)_missionViewSource.Source;
                dtos.Add(newDto);
                _missionViewSource.Source = dtos;
                lstMissions.Items.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Anlegen fehlgeschlagen:\n" + ex.Message);
            }
        }