Exemplo n.º 1
0
        private void EventPublisher_ManipulatorChanged(object sender, ManipulatorEventArgs e)
        {
            // Visual indication of current manipulator
            var manipulators = new TupleList <ManipulatorManagerTypes, ToolStripButton>
            {
                { ManipulatorManagerTypes.Default, ToolStripDefaultManipulator },
                { ManipulatorManagerTypes.Polygon, ToolStripPolygonManipulator },
                { ManipulatorManagerTypes.Attack, ToolStripAttackManipulator }
            };

            foreach (var manipulator in manipulators)
            {
                manipulator.Item2.Checked = manipulator.Item1 == e.ManipulatorType;
            }

            var manipulators2 = new TupleList <ManipulatorManagerTypes, ToolStripMenuItem>
            {
                { ManipulatorManagerTypes.Default, MenuMapInteractionDefault },
                { ManipulatorManagerTypes.Polygon, MenuMapInteractionPolygon },
                { ManipulatorManagerTypes.Attack, MenuMapInteractionPlanAttacks }
            };

            foreach (var manipulator in manipulators2)
            {
                manipulator.Item2.Checked = manipulator.Item1 == e.ManipulatorType;
            }

            if (e.ManipulatorType == ManipulatorManagerTypes.Attack)
            {
                var pane = GetNavigationPane(NavigationPanes.Attack);
                LeftNavigation.SelectNavigationPage(pane.Key);
            }
        }
Exemplo n.º 2
0
 public void ChangeManipulator(object sender, ManipulatorEventArgs e)
 {
     if (ManipulatorChanged != null)
     {
         ManipulatorChanged(sender, e);
     }
 }
Exemplo n.º 3
0
        private void EventPublisher_ManipulatorChanged(object sender, ManipulatorEventArgs e)
        {
            // Visual indication of current manipulator
            var manipulators = new TupleList<ManipulatorManagerTypes, ToolStripButton>
                {
                    {ManipulatorManagerTypes.Default, ToolStripDefaultManipulator},
                    {ManipulatorManagerTypes.Polygon, ToolStripPolygonManipulator},
                    {ManipulatorManagerTypes.Attack, ToolStripAttackManipulator}
                };

            foreach (var manipulator in manipulators)
            {
                manipulator.Item2.Checked = manipulator.Item1 == e.ManipulatorType;
            }

            var manipulators2 = new TupleList<ManipulatorManagerTypes, ToolStripMenuItem>
                {
                    {ManipulatorManagerTypes.Default, MenuMapInteractionDefault},
                    {ManipulatorManagerTypes.Polygon,MenuMapInteractionPolygon},
                    {ManipulatorManagerTypes.Attack, MenuMapInteractionPlanAttacks}
                };

            foreach (var manipulator in manipulators2)
            {
                manipulator.Item2.Checked = manipulator.Item1 == e.ManipulatorType;
            }

            if (e.ManipulatorType == ManipulatorManagerTypes.Attack)
            {
                var pane = GetNavigationPane(NavigationPanes.Attack);
                LeftNavigation.SelectNavigationPage(pane.Key);
            }
        }
Exemplo n.º 4
0
 public void ChangeManipulator(object sender, ManipulatorEventArgs e)
 {
     if (ManipulatorChanged != null)
         ManipulatorChanged(sender, e);
 }