예제 #1
0
        private void AddressPictureClickEvent(object sender, MouseEventArgs e)
        {
            System.Windows.Forms.Control control = ((System.Windows.Forms.Control)sender).Parent;
            AddressPicture addressPicture        = (AddressPicture)control;

            try
            {
                if (localData.AutoManual == EnumAutoState.Manual)
                {
                    lock (lockAddressListChange)
                    {
                        drawMapData.AllAddressPicture[addressPicture.AddressID].ChangeAddressBackColor();
                        MovingAddresList.Items.Add(addressPicture.AddressID);
                        if (!changeColorAddresList.Contains(addressPicture.AddressID))
                        {
                            changeColorAddresList.Add(addressPicture.AddressID);
                        }

                        addressList.Add(addressPicture.AddressID);
                    }

                    moveControlForm.SetAddress(addressPicture.AddressID);
                }
            }
            catch { }
        }
예제 #2
0
        public void DrawAddress()
        {
            try
            {
                AddressPicture addressPicture;

                foreach (MapAddress address in localData.TheMapInfo.AllAddress.Values)
                {
                    addressPicture = new AddressPicture(address, localData.MapConfig.AddressWidth, localData.MapConfig.AddressLineWidth,
                                                        drawMapData.TransferX(address.AGVPosition.Position.X), drawMapData.TransferY(address.AGVPosition.Position.Y));

                    DrawAddressID(address);
                    drawMapData.AllAddressPicture.Add(address.Id, addressPicture);
                }

                foreach (MapAddress address in localData.TheMapInfo.AllAddress.Values)
                {
                    pB_Map.Controls.Add(drawMapData.AllAddressPicture[address.Id]);
                    drawMapData.AllAddressPicture[address.Id].PB_Address.MouseDoubleClick += AddressPictureClickEvent;
                }
            }
            catch (Exception ex)
            {
                mainFlow.WriteLog(3, "", String.Concat("Exception : ", ex.ToString()));
            }
        }