예제 #1
0
 public MapEditViewModel(DomainModelService.Map model, Action removeMapAction)
     : base(model)
 {
     m_RemoveMap = removeMapAction;
     DisplayName = "Karte bearbeiten";
     DisplayName = TranslationProvider.Translate("EditMap");
 }
예제 #2
0
        public DomainModelService.Map CreateNewMapModel(string fileName)
        {
            Stream imageStream = File.OpenRead(fileName);

            byte[] byteArray;
            using (var br = new BinaryReader(imageStream))
            {
                byteArray = br.ReadBytes((int)imageStream.Length);
            }

            var map       = new DomainModelService.Map();
            var mapSource = new MapSource();

            mapSource.BinarySource = byteArray;
            map.MapSource          = mapSource;
            map.Name = "Karte";

            return(map);
        }
예제 #3
0
 public MapViewModel(DomainModelService.Map model)
 {
     m_Model = model;
     m_Model.PropertyChanged += ModelPropertyChanged;
     m_Map = GetBitmapImageFromByteArray(model.MapSource.BinarySource);
 }
예제 #4
0
 private void CreateMapViewModel(DomainModelService.Map newItem)
 {
     m_Maps.Add(m_MapViewModelFactory.CreateFromExisting(newItem));
 }
예제 #5
0
 public MapEditViewModel(DomainModelService.Map model, Action removeMapAction)
     : base(model)
 {
     m_RemoveMap = removeMapAction;
     DisplayName = TranslationProvider.Translate("TitleMapEditViewModel");
 }
예제 #6
0
 public MapEditViewModel CreateEditViewModel(DomainModelService.Map model, Action removeMapAction)
 {
     return(new MapEditViewModel(model, removeMapAction));
 }
예제 #7
0
 public MapViewModel CreateFromExisting(DomainModelService.Map model)
 {
     return(new MapViewModel(model));
 }
예제 #8
0
 public MapAddViewModel(DomainModelService.Map model)
 {
     m_Model     = model;
     DisplayName = TranslationProvider.Translate("TitleMapAddViewModel");
 }