Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();
            Client.Start();

            m_CharactersViewModel = new CharactersViewModel();

            //cmbCharacterLhs.DataContext = m_CharactersViewModel.CharacterList;
            //cmbCharacterRhs.DataContext = m_CharactersViewModel.CharacterList;

            var character = new CharactersViewModel().CharacterList[0];

            //if (character != null)
            //{
            lblNameValueLhs.Content = character.Name;
            lblAttackValueLhs.Content = character.Attack;
            lblEnduraceValueLhs.Content = character.Endurance;
            lblConstitutionValueLhs.Content = character.Constitution;
            lblDexterityValueLhs.Content = character.Dexterity;
            maxHP1.Content = character.MaxHealthPoints;

            var character2 = new CharactersViewModel().CharacterList[1];

            //if (character != null)
            //{
            lblNameValueRhs.Content = character2.Name;
            lblAttackValueRhs.Content = character2.Attack;
            lblEnduraceValueRhs.Content = character2.Endurance;
            lblConstitutionValueRhs.Content = character2.Constitution;
            lblDexterityValueRhs.Content = character2.Dexterity;
            maxHP2.Content = character2.MaxHealthPoints;
            curHP2.Content = Client.sHP;

            NewBat = new Battle();
        }
Esempio n. 2
0
 public void Conn(object sender, RoutedEventArgs e)
 {
     var charFORsend = new CharactersViewModel().CharacterList[0];
     var paramFORsend = charFORsend.Attack + ";" + charFORsend.CurHealthPoints + ";" + charFORsend.Damage_Reduction+";"+charFORsend.Evasion;
     Client.SendMSG(paramFORsend);
     button1.IsEnabled = true;
     button6.IsEnabled = false;
     button7.IsEnabled = true;
 }
Esempio n. 3
0
        public MainWindow()
        {
            InitializeComponent();

            m_CharactersViewModel = new CharactersViewModel();

            cmbCharacterLhs.DataContext = m_CharactersViewModel.CharacterList;
            cmbCharacterRhs.DataContext = m_CharactersViewModel.CharacterList;
        }
Esempio n. 4
0
        public MainWindow()
        {
            InitializeComponent();

            m_CharactersViewModel = new CharactersViewModel();

            cmbCharacterLhs.DataContext = m_CharactersViewModel.CharacterList;
            cmbCharacterRhs.DataContext = m_CharactersViewModel.CharacterList;
        }
Esempio n. 5
0
        private void cmbCharacterLhs_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            var character = new CharactersViewModel().CharacterList[1];

            //if (character != null)
            //{
                lblNameValueLhs.Content = character.Name;
                lblAttackValueLhs.Content = character.Attack;
                lblEnduraceValueLhs.Content = character.Endurance;
                lblConstitutionValueLhs.Content = character.Constitution;
                lblDexterityValueLhs.Content = character.Dexterity;
                maxHP1.Content = character.CurHealthPoints;

            //}
            //else
            //{
            //    lblNameValueLhs.Content = "";
            //    lblAttackValueLhs.Content = 0;
            //    lblEnduraceValueLhs.Content = 0;
            //    lblConstitutionValueLhs.Content = 0;
            //    lblDexterityValueLhs.Content = 0;
            //    lblHealthPointsValueLhs.Content = 0;
            //    lblLevelPointsValueLhs.Content = 0;
            //}
        }