private void InitThemeGraphRegion() { //初始化当前区域设置为“无范围应用” ThemeGraphRegion newRegion = ThemeGraphRegionSetting.GetThemeGraphRegion(_productIdentify); newRegion.Enable = false; ThemeGraphRegionSetting.SaveThemeGraphRegion(newRegion); }
void cancelRegion_Click(object sender, EventArgs e) { _btnSetThemeGraphRegion.Text = "无范围应用"; ThemeGraphRegion region = (sender as RadMenuItem).Tag as ThemeGraphRegion; region.Enable = false; ThemeGraphRegionSetting.SaveThemeGraphRegion(region); }
void menu_Click(object sender, EventArgs e) { int?index = (sender as RadMenuItem).Tag as int?; ThemeGraphRegion region = ((sender as RadMenuItem).Owner as RadDropDownButtonElement).Tag as ThemeGraphRegion; region.Enable = true; region.SelectedIndex = index.Value; _btnSetThemeGraphRegion.Text = region.PrjEnvelopeItems[index.Value].Name; ThemeGraphRegionSetting.SaveThemeGraphRegion(region); }
void regionFromAoi_Click(object sender, EventArgs e) { if (_session.SmartWindowManager.ActiveCanvasViewer == null) { return; } AOIItem[] aoiItems = _session.SmartWindowManager.ActiveCanvasViewer.AOIProvider.GetAOIItems(); if (aoiItems == null || aoiItems.Length == 0) { return; } CoordEnvelope env = aoiItems[0].GeoEnvelope; ThemeGraphRegion region = (sender as RadMenuItem).Tag as ThemeGraphRegion; region.Add(new PrjEnvelopeItem("AOI", new PrjEnvelope(env.MinX, env.MaxX, env.MinY, env.MaxY))); ThemeGraphRegionSetting.SaveThemeGraphRegion(region); UpdateBtn(); }
private void SaveRegion() { _region.PrjEnvelopeItems = _items.ToArray(); ThemeGraphRegionSetting.SaveThemeGraphRegion(_region); }