/// <summary> /// Updates fields necessary to build the canvas display of the lines and locations over the map. /// </summary> /// <param name="filepath"></param> private void makeCanvas(string filepath) { helper = ViewHelper.LoadModel(filepath, mapHeight, mapWidth); var chooseFeeder = new ChooseContainer(helper.ContainerNames()); var feederselected = chooseFeeder.ShowDialog(); if (feederselected == true) { this.LineDefs = helper.LineOverlays(chooseFeeder.SelectedLine); } this.LocationDefs = helper.LocationOverlays(); this.BackgroundMap = helper.GoogleMapsURL(); var mapdisplay = new MapDisplay(this); MainDisplay.Content = mapdisplay; }
public static ViewHelper LoadModel(string datasourcePath,double mapheight,double mapwidth){ var source = new DataFromExcel(datasourcePath); var model = new PowerSystemModel(source); var helper = new ViewHelper(model,mapwidth,mapheight); return helper; }