예제 #1
0
        public ControlWindow()
        {
            Map        = new MapControl(this);
            PlayerList = new StatusControl(this);
            //History = new HistoryControl (PlayerList);

            Map.Dock        = DockStyle.Fill;
            PlayerList.Dock = DockStyle.Fill;
            //History.Dock = DockStyle.Top;

            this.Text        = "MineProxy";
            this.WindowState = FormWindowState.Maximized;

            //Right panel, date picker + player list
            datePick.Value         = DateTime.Now.Date;
            datePick.ValueChanged += HandleDatePickValueChanged;
            datePick.Dock          = DockStyle.Top;
            PlayerList.Dock        = DockStyle.Fill;
            Panel right = new Panel();

            right.Controls.Add(PlayerList);
            right.Controls.Add(datePick);
            right.Dock = DockStyle.Fill;

            SplitContainer split = new SplitContainer();

            split.Panel1.Controls.Add(Map);
            split.Panel2.Controls.Add(right);
            split.SplitterWidth    = 10;
            split.SplitterDistance = Width / 2;
            split.Orientation      = Orientation.Vertical;
            split.Dock             = DockStyle.Fill;
            Controls.Add(split);
            //Controls.Add (History);

            this.MainMenuStrip = new MenuStrip();
            this.MainMenuStrip.Items.Add("Pardon").Click    += HandlePardonClick;
            this.MainMenuStrip.Items.Add("Ban").Click       += HandleBanClick;
            this.MainMenuStrip.Items.Add("Overworld").Click += HandleNetherCheckedChanged;

            this.MainMenuStrip.Items.Add("Reload").Click += HandleRegionReloadClick;
            //this.MainMenuStrip.Items.Add ("History Search").Click += HistorySearch;
            this.MainMenuStrip.Items.Add("TP-Nuxas").Click += HandleTpNuxasClick;
            ;
            this.MainMenuStrip.Items.Add("TP-Player").Click += HandleTpPlayerClick;
            ;


            this.MainMenuStrip.Visible = true;
            this.MainMenuStrip.BringToFront();
            this.Controls.Add(this.MainMenuStrip);
        }
예제 #2
0
        public ControlWindow()
        {
            Map = new MapControl(this);
            PlayerList = new StatusControl(this);
            //History = new HistoryControl (PlayerList);
			
            Map.Dock = DockStyle.Fill;
            PlayerList.Dock = DockStyle.Fill;
            //History.Dock = DockStyle.Top;
			
            this.Text = "MineProxy";
            this.WindowState = FormWindowState.Maximized;
			
            //Right panel, date picker + player list
            datePick.Value = DateTime.Now.Date;
            datePick.ValueChanged += HandleDatePickValueChanged;
            datePick.Dock = DockStyle.Top;
            PlayerList.Dock = DockStyle.Fill;
            Panel right = new Panel();
            right.Controls.Add(PlayerList);
            right.Controls.Add(datePick);
            right.Dock = DockStyle.Fill;
			
            SplitContainer split = new SplitContainer();
            split.Panel1.Controls.Add(Map);
            split.Panel2.Controls.Add(right);
            split.SplitterWidth = 10;
            split.SplitterDistance = Width / 2;
            split.Orientation = Orientation.Vertical;
            split.Dock = DockStyle.Fill;
            Controls.Add(split);
            //Controls.Add (History);
			
            this.MainMenuStrip = new MenuStrip();
            this.MainMenuStrip.Items.Add("Pardon").Click += HandlePardonClick;
            this.MainMenuStrip.Items.Add("Ban").Click += HandleBanClick;
            this.MainMenuStrip.Items.Add("Overworld").Click += HandleNetherCheckedChanged;
            
            this.MainMenuStrip.Items.Add("Reload").Click += HandleRegionReloadClick;
            //this.MainMenuStrip.Items.Add ("History Search").Click += HistorySearch;
            this.MainMenuStrip.Items.Add("TP-Nuxas").Click += HandleTpNuxasClick;
            ;
            this.MainMenuStrip.Items.Add("TP-Player").Click += HandleTpPlayerClick;
            ;


            this.MainMenuStrip.Visible = true;
            this.MainMenuStrip.BringToFront();
            this.Controls.Add(this.MainMenuStrip);
        }
예제 #3
0
		public HistoryControl (StatusControl p)
		{
			this.players = p;
			this.Height = 30;
		}
예제 #4
0
        void DrawPlayer(Graphics g, StatusControl.PlayerListItem i)
        {
            MineProxy.Control.Player p = i.Item;
            if (p.Position == null)
                return;
			
            CoordDouble np = p.Position.ToMapDimensions((Dimensions)p.Dimension);
            Point pp = FromCoord(np);
			
            //Röd Cirkel
            int r = 2;
            if (i.Selected)
            {
                g.DrawEllipse(Pens.Red, pp.X - r, pp.Y - r, r * 2, r * 2);
			
                //Historik
                var hist = PlayerHistory.GetHistory(p);
                foreach (var hi in hist)
                {
                    if (hi == null)
                        continue;
                    Point hp = FromCoord(hi.Position.ToMapDimensions((Dimensions)hi.Dimension));
                    g.DrawEllipse(Pens.Red, hp.X - r, hp.Y - r, r * 2, r * 2);
                }
            }
            //Namnbricka
            Size size = g.MeasureString(p.Username, Font, 500).ToSize();
            Color back = Color.White;
            if (p.Dimension == -1)
                back = Color.Red;
            if (p.Dimension == 1)
                back = Color.Yellow;
            if (p.Session != "RealSession" && p.Session != "VanillaSession")
                back = Color.Gray;
            using (Brush b = new SolidBrush (System.Drawing.Color.FromArgb (128, back)))
                g.FillRectangle(b, pp.X, pp.Y, size.Width, size.Height);
            if (i.Selected)
                g.DrawRectangle(Pens.White, pp.X, pp.Y, size.Width, size.Height);
            


            g.DrawString(p.Username, this.Font, Brushes.Black, pp.X, pp.Y);

            //Höjd
            int h = (int)(p.Position.Y / 8);
            g.DrawRectangle(Pens.Black, pp.X, pp.Y - 32, r, 32);
            using (Brush b = new SolidBrush (back))
                g.FillRectangle(b, pp.X, pp.Y - h, r, h);
			
			
            //g.DrawLine (Pens.Red, Width / 2, Height / 2, (float)x, (float)y);
        }
예제 #5
0
 public HistoryControl(StatusControl p)
 {
     this.players = p;
     this.Height  = 30;
 }