public void AnotherStringPropertyOnFacadeReturnsBaseModelStringPropertyDefaultValueTest() { var model = new BaseModel(); var expectedResult = model.StringProperty; var facade = new FacadeModel(model); Assert.Equal(expectedResult, facade.AnotherStringProperty); }
public void IntPropertyOnWeavedFacadeReturnsBaseModelIntPropertyDefaultValueTest() { var model = new BaseModel(); var expectedResult = model.IntProperty; var facade = new FacadeModel(model); Assert.Equal(expectedResult, facade.IntProperty); }
public string GetCoordinatesAndSave(string vars) { List <string> l = extractVars(vars); // Default value int port = 5400; int.TryParse(l[1], out port); LonLat x = FacadeModel.GetInstance().GetCoordinatesAndSave(l[0], port, l[2]); if (x == null) { return(LonLat.NullLonLatToXML()); } // Else return(x.ToXml()); }
/// <summary> /// Récupère la liste des champions à partir du Model /// </summary> /// <returns> Task liste de IChampion </returns> async public Task <ObservableCollection <ChampionViewModel> > GetListChampion() { Loading = true; listChampionViewModel = new ObservableCollection <ChampionViewModel>(); listFavori.Clear(); List <IChampion> listChampion = await FacadeModel.GetListChampion(); foreach (IChampion champion in listChampion) { ChampionViewModel championVM = new ChampionViewModel(champion); listChampionViewModel.Add(championVM); } ListChampionAffiche = listChampionViewModel; Loading = false; return(listChampionViewModel); }
internal PrecisePopupWindow(PrecisePopupModel model) { Model = model; DataContext = FacadeModel.Wrap(Model); Width = 0; Height = 0; PositioningJob = new ComputedJob(() => { Console.WriteLine("Placing window at ({0},{1})", Model.SelectedCandidate.X, Model.SelectedCandidate.Y); Left = Model.SelectedCandidate.X; Top = Model.SelectedCandidate.Y; Console.WriteLine("Max window size set to {0}x{1}", Model.SelectedCandidate.MaxWidth, Model.SelectedCandidate.MaxHeight); MaxWidth = Model.SelectedCandidate.MaxWidth; MaxHeight = Model.SelectedCandidate.MaxHeight; SizeToContent = SizeToContent.WidthAndHeight; Model.PopupControl.UpdateSelectedPlacement(); }); PositioningJob.Start(); Loaded += (s, args) => Mouse.Capture(this, CaptureMode.SubTree); }
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs args) { FacadeModel.Update(Model, this, args); base.OnPropertyChanged(args); }
public override void OnApplyTemplate() { FacadeModel.Wrap(Model, GetTemplateChild("Root")); base.OnApplyTemplate(); }
public SelectMin() { Inputs = new MinInputCollection(); FacadeModel.UpdateAll(Model, this); }
public PrecisePopup() { Model = new PrecisePopupModel(this); Placements = new PrecisePopupPlacementCollection(); FacadeModel.UpdateAll(Model, this); }
public MinInput() { FacadeModel.UpdateAll(Model, this); }
public PropertySheet() { FacadeModel.UpdateAll(Model, this); }
public PrecisePopupPlacement() { Model = new PrecisePopupPlacementModel(this); FacadeModel.UpdateAll(Model, this); }
public FullName() { FacadeModel.UpdateAll(Model, this); }
private LonLat CoordinatesFromServer(string ip, int port) { return(FacadeModel.GetInstance().GetCoordinatesFromServer(ip, port)); }
private LonLat CoordinatesFromFile(string file, int index) { return(FacadeModel.GetInstance().GetCoordinatesFromFile(file, index)); }
public StatCounter() { FacadeModel.UpdateAll(Model, this); }