コード例 #1
0
        private StringTextBox PlaceStringTextBoxAt(int x, int row, string label)
        {
            int y = row * 25;

            this.PlaceLabelAt(x, y, label);
            StringTextBox obj = new StringTextBox();

            obj.Left = x + 105;
            obj.Top  = y;
            this.Controls.Add(obj);
            return(obj);
        }
コード例 #2
0
        public MetadataForm()
        {
            this.Hide();
            this.Owner           = MainForm.self;
            this.Text            = "Metadata Editor";
            this.Width           = 440;
            this.Height          = 445;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.MinimizeBox     = false;
            this.StartPosition   = FormStartPosition.CenterParent;

            this.gameMode   = this.PlaceRadioSelectionAt(0, 0, "Game Mode", new string[] { "Standard", "Taiko", "Catch the Beat", "Mania" });
            this.version    = this.PlaceIntTextBoxAt(0, 1, "Osu Version");
            this.playerName = this.PlaceStringTextBoxAt(0, 2, "Player Name");
            this.mapHash    = this.PlaceStringTextBoxAt(0, 3, "Map Hash");
            this.replayHash = this.PlaceStringTextBoxAt(0, 4, "Replay Hash");
            this.count300   = this.PlaceShortTextBoxAt(0, 5, "Number of 300's");
            this.count100   = this.PlaceShortTextBoxAt(0, 6, "Number of 100's");
            this.count50    = this.PlaceShortTextBoxAt(0, 7, "Number of 50's");
            this.score      = this.PlaceIntTextBoxAt(0, 8, "Total Score");
            this.countGeki  = this.PlaceShortTextBoxAt(200, 5, "Number of Geki's");
            this.countKatsu = this.PlaceShortTextBoxAt(200, 6, "Number of Katsu's");
            this.countMiss  = this.PlaceShortTextBoxAt(200, 7, "Number of Misses");
            this.maxCombo   = this.PlaceShortTextBoxAt(200, 8, "Max Combo");
            this.isPerfect  = this.PlaceRadioSelectionAt(0, 9, "Perfect Combo", new string[] { "Yes", "No" });
            this.mods       = new ModCheckBox[14];
            this.PlaceLabelAt(0, 10 * 25, "Mods");
            for (int i = 0; i < 14; i++)
            {
                this.mods[i] = this.PlaceModCheckBoxAt(105 + 100 * (i / 5), 10 + (i % 5), modNames[i], i);
                this.mods[i].CheckedChanged += Mods_CheckedChanged;
            }
            this.ok            = this.PlaceButtonAt(260, 15, "OK");
            this.ok.Click     += ok_Click;
            this.cancel        = this.PlaceButtonAt(340, 15, "Cancel");
            this.cancel.Click += cancel_Click;
        }