| | |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | private MapViewProjectListHelper _helper = new(); |
| | | |
| | | private void MainForm_Load(object sender, EventArgs e) |
| | | private async void MainForm_Load(object sender, EventArgs e) |
| | | { |
| | | _helper.LoadCompletedEvent += _helper_LoadCompletedEvent; |
| | | _helper.SelectProjectEvent += _helper_SelectProjectEvent; |
| | | _helper.Initial(mapViewProjectListContainer1); |
| | | this.mapViewProjectListContainer1.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent; |
| | | this.mapViewProjectListContainer1.SelectProjectEvent += MapViewProjectListContainer1_SelectProjectEvent; |
| | | await this.mapViewProjectListContainer1.InitialContainer(); |
| | | } |
| | | |
| | | private bool _helper_SelectProjectEvent(string arg) |
| | | private bool MapViewProjectListContainer1_SelectProjectEvent(string arg) |
| | | { |
| | | MessageBox.Show("aaa"); |
| | | MessageBox.Show(arg); |
| | | return true; |
| | | } |
| | | |
| | | private async void _helper_LoadCompletedEvent() |
| | | private async void MapViewProjectListContainer1_LoadCompletedEvent() |
| | | { |
| | | await _helper.SetProjectList(new List<MapProjectViewModel>() { |
| | | var projectList = new List<MapProjectViewModel>() { |
| | | new MapProjectViewModel(){ |
| | | Id="1", |
| | | Name="TEST01", |
| | | Description="CESHI01", |
| | | Point=new MapPointViewModel(121.516899,31.132442) |
| | | Point=new Yw.Model.Map.Point(121.516899,31.132442) |
| | | }, |
| | | new MapProjectViewModel(){ |
| | | Id="1", |
| | | Name="TEST01", |
| | | Description="CESHI01", |
| | | Point=new MapPointViewModel(116.422636,39.884519) |
| | | Point=new Yw.Model.Map.Point(116.422636,39.884519) |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | await this.mapViewProjectListContainer1.SetProjectList(projectList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |