示例#1
0
        private void lv_zonelist_DoubleClick(object sender, System.EventArgs e)
        {
            if (lv_zonelist.SelectedItems.Count == 0) return;
            MapZone mz = (MapZone)lv_zonelist.SelectedItems[0].Tag;
            EditZoneWnd ezw = new EditZoneWnd();
            ezw.init(Global.ActiveMap, Global.ActiveMap.Zones);
            ezw.seek(mz);
            if (ezw.ShowDialog() == DialogResult.Cancel) return;
            Global.ActiveMap.Zones = ezw.AlteredZones;
            Global.ActiveMap.ZoneLayer.Data = ezw.AlteredZoneLayer.Data;
            update_zone_list();
            lv_zonelist.SelectedIndices.Clear();
            if (ezw.lv_zones.SelectedIndices.Count > 0)
            {
                lv_zonelist.SelectedIndices.Add(ezw.lv_zones.SelectedIndices[0]);
                lv_zonelist.SelectedItems[0].EnsureVisible();
            }

            Global.ActiveMap.touch();
        }
示例#2
0
 public void OpenZoneEditor()
 {
     if (Global.ActiveMap == null)
         return;
     EditZoneWnd ezw = new EditZoneWnd();
     ezw.init(Global.ActiveMap, Global.ActiveMap.Zones);
     MapZone mz = null;
     if (lv_zonelist.SelectedIndices.Count > 0)
     {
         mz = (MapZone) lv_zonelist.SelectedItems[0].Tag;
         ezw.seek(mz);
     }
     if (ezw.ShowDialog(mz) == DialogResult.Cancel) return;
     Global.ActiveMap.Zones = ezw.AlteredZones;
     Global.ActiveMap.ZoneLayer.Data = ezw.AlteredZoneLayer.Data;
     update_zone_list();
     lv_zonelist.SelectedIndices.Clear();
     if (ezw.lv_zones.SelectedIndices.Count > 0)
     {
         lv_zonelist.SelectedIndices.Add(ezw.lv_zones.SelectedIndices[0]);
         lv_zonelist.SelectedItems[0].EnsureVisible();
     }
     Global.ActiveMap.touch();
 }
示例#3
0
文件: mainWindow.cs 项目: jder/verge3
 public void OpenZoneEditor()
 {
     if (Global.ActiveMap == null)
         return;
     EditZoneWnd ezw = new EditZoneWnd();
     ezw.init(Global.ActiveMap, Global.ActiveMap.Zones);
     if (ezw.ShowDialog() == DialogResult.Cancel) return;
     Global.ActiveMap.Zones = ezw.AlteredZones;
     Global.ActiveMap.ZoneLayer.Data = ezw.AlteredZoneLayer.Data;
     update_zone_list();
     Global.ActiveMap.touch();
 }