public MapEditViewModel(DomainModelService.Map model, Action removeMapAction) : base(model) { m_RemoveMap = removeMapAction; DisplayName = "Karte bearbeiten"; DisplayName = TranslationProvider.Translate("EditMap"); }
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); }
public MapViewModel(DomainModelService.Map model) { m_Model = model; m_Model.PropertyChanged += ModelPropertyChanged; m_Map = GetBitmapImageFromByteArray(model.MapSource.BinarySource); }
private void CreateMapViewModel(DomainModelService.Map newItem) { m_Maps.Add(m_MapViewModelFactory.CreateFromExisting(newItem)); }
public MapEditViewModel(DomainModelService.Map model, Action removeMapAction) : base(model) { m_RemoveMap = removeMapAction; DisplayName = TranslationProvider.Translate("TitleMapEditViewModel"); }
public MapEditViewModel CreateEditViewModel(DomainModelService.Map model, Action removeMapAction) { return(new MapEditViewModel(model, removeMapAction)); }
public MapViewModel CreateFromExisting(DomainModelService.Map model) { return(new MapViewModel(model)); }
public MapAddViewModel(DomainModelService.Map model) { m_Model = model; DisplayName = TranslationProvider.Translate("TitleMapAddViewModel"); }