Exemplo n.º 1
0
        private void ShowPhaseDialog(List <Zulrah.Phase> phases)
        {
            var possiblePhaseDisplay = new TableLayoutPanel {
                Anchor      = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top,
                Name        = "PossiblePhaseDisplay",
                Margin      = new Padding(0, 10, 0, 0),
                RowCount    = 1,
                RowStyles   = { new RowStyle(SizeType.AutoSize) },
                ColumnCount = phases.Count
            };

            foreach (var phase in phases)
            {
                var phaseCanvas = new CustomPanel();

                var phaseMap = new MapRenderEngine(ref phaseCanvas);

                phaseMap.ShowPhase(phase);

                possiblePhaseDisplay.ColumnStyles.Add(new ColumnStyle {
                    SizeType = SizeType.Percent,
                    Width    = Convert.ToSingle(1.0 / phases.Count)
                });

                possiblePhaseDisplay.Controls.Add(phaseCanvas, phases.IndexOf(phase), 0);
            }

            MainLayout.RowCount++;
            MainLayout.RowStyles.Insert(0, new RowStyle {
                SizeType = SizeType.Percent,
                Height   = 30
            });

            MainLayout.Controls.Add(possiblePhaseDisplay, 0, 0);
        }
Exemplo n.º 2
0
        private void _boss_OnPhaseChanged(Zulrah.Rotation rotation)
        {
            _mainMapRenderEngine.ShowPhase(rotation.CurrentPhase);

            if (PhaseDisplayOn)
            {
                HidePhaseDialog();
            }
        }