Exemplo n.º 1
0
        private void EntitySelected(int x, int y, double z)
        {
            Point3D point = new Point3D(x, editor.InvertHeight(y), z);

            if (editor.Entities.ContainsKey(point))
            {
                // Load up that entity into the new window
                EntityWindow window = new EntityWindow(point, editor.Entities, editor.Height, this, editor);
                bool?        result = window.ShowDialog();
                ReSyncOnEditor();
            }
            else
            {
                // Open entity window
                EntityWindow window = new EntityWindow(point, editor.Entities, editor.Height, this, editor);
                window.ShowDialog();

                if (window.Entity_.id == -1)
                {
                    return;
                }

                Rectangle rectangle = editor.EntityRectangle(window.Entity_);

                editor.Entities.Add(point, new Tuple <Entity, Rectangle>(window.Entity_, rectangle));
                cnvMap.Children.Add(rectangle);
            }
        }
Exemplo n.º 2
0
        private void btnQueue_Click(object sender, RoutedEventArgs e)
        {
            EntityWindow entityWindow = new EntityWindow(Dialogue_.queues);

            if (entityWindow.ShowDialog() == true)
            {
                Dialogue_.queues = entityWindow.Entity_.queues;
            }

            UpdateQueueButton();
        }