예제 #1
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
                }
            }
        }