void playerOpen_Click(object sender, RoutedEventArgs e)
        {
            Player player = (sender as MenuItem).Tag as Player;

            PlayerInterfaceControl i = new PlayerInterfaceControl(player.PlayerName);
            TabItem tab = new TabItem();

            tab.Content = i;
            tab.Header  = String.Format("{0} - {1}", player.BBSName, player.PlayerName);
            InterfaceTabControl.Items.Add(tab);
            InterfaceTabControl.SelectedItem = tab;

            CharacterMenu.Items.Remove(sender);
        }
Exemple #2
0
        /// <summary>
        /// Constructs a player.
        /// </summary>
        public Player(PlayerInterfaceControl playerInterface)
        {
            CurrentParseState = new ParseState();
            Palette           = new MudPalette0();
            SentCommands      = new Queue <string>();
            CurrentColor      = new AnsiColor()
            {
                ForegroundCode = AnsiColorCode.White, BackgroundCode = AnsiColorCode.Black
            };
            StatlineRegex = new Regex("\\[HP=(?<hp>-?\\d+)/(?<mhp>\\d+),MA=(?<mp>\\d+)/(?<mmp>\\d+)]:( \\(Resting\\) )? ");
            Interface     = playerInterface;
            this.Money    = new Wallet();

            StartupMessage();
        }