// Edit button released
        public void OnEditEnd()
        {
            if (General.Interface.IsActiveWindow)
            {
                List <Vertex> verts = mode.GetSelectedVertices();
                updateList = new Dictionary <BaseVisualSector, bool>();

                foreach (Vertex v in verts)
                {
                    VertexData vd = mode.GetVertexData(v);
                    foreach (KeyValuePair <Sector, bool> s in vd.UpdateAlso)
                    {
                        if (mode.VisualSectorExists(s.Key))
                        {
                            BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s.Key);
                            if (!updateList.ContainsKey(vs))
                            {
                                updateList.Add(vs, s.Value);
                            }
                        }
                    }
                }

                General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged;
                mode.StartRealtimeInterfaceUpdate(SelectionType.Vertices);
                General.Interface.ShowEditVertices(verts, false);
                mode.StopRealtimeInterfaceUpdate(SelectionType.Vertices);
                General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged;

                updateList.Clear();
                updateList = null;
            }
        }
Пример #2
0
        // Edit button released
        public virtual void OnEditEnd()
        {
            if (General.Interface.IsActiveWindow)
            {
                //mxd
                List <Sector> sectors = mode.GetSelectedSectors();
                updatelist = new List <BaseVisualSector>();

                foreach (Sector s in sectors)
                {
                    if (mode.VisualSectorExists(s))
                    {
                        updatelist.Add((BaseVisualSector)mode.GetVisualSector(s));
                    }
                }

                General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged; //mxd
                mode.StartRealtimeInterfaceUpdate(SelectionType.Sectors);                       //mxd
                DialogResult result = General.Interface.ShowEditSectors(sectors);
                mode.StopRealtimeInterfaceUpdate(SelectionType.Sectors);                        //mxd
                General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged; //mxd

                updatelist.Clear();                                                             //mxd
                updatelist = null;                                                              //mxd

                if (result == DialogResult.OK)
                {
                    mode.RebuildElementData();                                           //mxd
                }
            }
        }
        // Edit button released
        public void OnEditEnd()
        {
            if (General.Interface.IsActiveWindow)
            {
                List <Thing> things = mode.GetSelectedThings();
                //mxd
                updateList = new List <BaseVisualThing>();
                foreach (Thing t in things)
                {
                    VisualThing vt = mode.GetVisualThing(t);
                    if (vt != null)
                    {
                        updateList.Add((BaseVisualThing)vt);
                    }
                }

                General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged;
                mode.StartRealtimeInterfaceUpdate(SelectionType.Things);
                General.Interface.ShowEditThings(things);
                mode.StopRealtimeInterfaceUpdate(SelectionType.Things);
                General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged;

                updateList.Clear();
                updateList = null;
            }
        }