Пример #1
0
        private void Floore_Scheme_MouseClick(object sender, MouseEventArgs e)
        {
            mainSpace = currentSpace;
            if (!isChange)
            {
                LB.Items.Clear();
                if (isManager)
                {
                    LB.Items.Add(DeletePoint);
                }
                if (currentSpace != null)
                {
                    LB.SetBounds(currentSpace.XCoord, currentSpace.YCoord, 150, 65);
                    for (int pos = 0; pos < currentSpace.GetExhibits().Count; pos++)
                    {
                        LB.Items.Add(currentSpace.GetExhibits()[pos].exhibit_name);
                    }
                    if (isManager)
                    {
                        if (LB.Items.Count == 1)
                        {
                            LB.Items.Add(empty);
                        }
                    }
                    else
                    if (LB.Items.Count == 0)
                    {
                        LB.Items.Add(empty);
                    }

                    if (isManager)
                    {
                        LB.Items.Add(AddExhibit);
                        LB.Items.Add(ResetExhibit);
                    }

                    Scheme_Panel.Controls.Add(LB);
                    LB.Show();
                    LB.BringToFront();
                    System.Threading.Thread.Sleep(1000);
                }
                else
                {
                    LB.Hide();
                }
            }
            else
            {
                bridge.AddNewExhibitSpace(e.X, e.Y, currentFloor.GetId());
                CanselFunction();
                RefreshFloor();
            }
        }