예제 #1
0
        public static LayoutTable PropertyTable(params Control[] controls)
        {
            var height = controls.Length / 2;

            var table = new LayoutTable(height, 2);

            table.Fill(controls);
            table.FixRows();
            table.FixColumns(0);

            return(table);
        }
예제 #2
0
        public MatchDialog(MatchRequest request,
                           IgsPlayerInfo stats) : this(request)
        {
            if (Environment.OSVersion.Platform == PlatformID.WinCE)
            {
                userNameTextBox.Width = 0;
                var statsButton = new Button()
                {
                    Text   = "?",
                    Height = userNameTextBox.Height,
                    Width  = userNameTextBox.Height
                };

                var innerTable = new LayoutTable(1, 2);
                innerTable.Fill(userNameTextBox, statsButton);
                innerTable.FixRows();
                innerTable.FixColumns(1);

                table.PutLayout(innerTable, 0, 1);
                table.Apply(this, this.ClientRectangle);

                statsButton.Click += delegate { notification.Visible = true; };

                notification = new Notification()
                {
                    Text = "<html><body><form method='GET' action='notify'><hr/>" +
                           "Name: " + stats.Name +
                           "<br/>Rank: " + stats.Rank.ToString() +
                           "<br/>Wins/Losses: " + stats.GamesWon + "/" +
                           stats.GamesLost +
                           "<hr/></form></body></html>",
                    Caption         = "Stats of " + stats.Name,
                    InitialDuration = 10,
                    Icon            = ConfigManager.GetIcon("game")
                };
            }
        }