private void saveState() { stgList = new ArrayListStg(); stgList.Reset(); // Save trv state foreach (TreeNode tn in trvObGroups.Nodes) { stgList.pdArray.Add(new System.Collections.DictionaryEntry(tn.Name /* ID */, tn.Checked)); foreach (TreeNode tn_child in tn.Nodes) { stgList.pdArray.Add(new System.Collections.DictionaryEntry(tn_child.Name /* ID */, tn_child.Checked)); } } //************************************************************************************************ stgList.Save(); }
private void Form1_Load(object sender, EventArgs e) { wMarker = new GMarkerGoogle(new PointLatLng(43.3251, 45.6959), new Bitmap(1, 1)); this.Text = ("Daymohk GiS - " + _Dh.myAccount.Firstname + _Dh.myAccount.Lastname); TheMap.MapProvider = GMap.NET.MapProviders.OpenStreetMapProvider.Instance; GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerAndCache; TheMap.Position = new PointLatLng(43.3251, 45.6959); TheMap.CanDragMap = true; TheMap.MaxZoom = 18; TheMap.MinZoom = 0; TheMap.Zoom = 16; TheMap.ShowCenter = false; TheMap.MouseWheelZoomType = MouseWheelZoomType.MousePositionWithoutCenter; trbZoom.Maximum = TheMap.MaxZoom; trbZoom.Minimum = TheMap.MinZoom; trbZoom.Value = 16; _Dh.loadOrganisationsData(); _Dh.loadObGroupsData(); _Dh.loadObjects(); cmbProvider.Items.Add(GMapProviders.YandexMap.Name); cmbProvider.Items.Add(GMapProviders.GoogleMap.Name); cmbProvider.Items.Add(GMapProviders.OpenStreetMap.Name); cmbProvider.Items.Add(GMapProviders.OpenCycleMap.Name); cmbProvider.Items.Add(GMapProviders.OpenCycleLandscapeMap.Name); cmbProvider.Items.Add(GMapProviders.OpenCycleTransportMap.Name); cmbProvider.Items.Add(GMapProviders.OpenStreetMapQuest.Name); cmbProvider.Items.Add(GMapProviders.WikiMapiaMap.Name); cmbProvider.Items.Add(GMapProviders.BingMap.Name); cmbProvider.Items.Add(GMapProviders.BingSatelliteMap.Name); cmbProvider.Items.Add(GMapProviders.BingHybridMap.Name); cmbProvider.Items.Add(GMapProviders.OviMap.Name); cmbProvider.Items.Add(GMapProviders.OviSatelliteMap.Name); cmbProvider.Items.Add(GMapProviders.OviHybridMap.Name); cmbProvider.Items.Add(GMapProviders.OviTerrainMap.Name); cmbProvider.Items.Add(GMapProviders.ArcGIS_World_Street_Map.Name); cmbProvider.SelectedIndex = 0; TheMap.Overlays.Clear(); foreach (xObGroup xobgroup in _Dh.myObGroups) { if (_Dh.getGroupAccessLevel(xobgroup).CompareTo(_Dh.AccessLevel.Read) >= 0) { GMapOverlay overlay = new GMapOverlay(xobgroup.Name); TheMap.Overlays.Add(overlay); } } if (!_Dh.myAccount.IsModerator) { mnuMainOrganisations.Visible = false; } stgList = new ArrayListStg(); stgList.Reload(); RefreshUI(); //_arrayListDemo.Reset(); trvTrackers.Nodes.Add("Автобусы"); trvTrackers.Nodes[0].Nodes.Add("В007ВЧ95"); trvTrackers.Nodes[0].Nodes.Add("В777ВЧ95"); trvTrackers.Nodes[0].Nodes.Add("В505ВЧ95"); trvTrackers.Nodes[0].Nodes.Add("В001ВЧ95"); trvTrackers.Nodes.Add("Маршрутки"); trvTrackers.Nodes[1].Nodes.Add("Х102ТЭ95"); trvTrackers.Nodes[1].Nodes.Add("Х103ТЭ95"); trvTrackers.ExpandAll(); }