Ejemplo n.º 1
0
        public Combat(CharacterSet CS) : this()
        {
            Chars  = CS;
            tokens = new List <WpfToken>();

            foreach (CharData c in CS.Listing())
            {
                WpfToken token = new WpfToken(c);
                Canvas.SetTop(token.Token, token.CurrentX);
                Canvas.SetLeft(token.Token, token.CurrentY);
                tokens.Add(token);
            }
        }
Ejemplo n.º 2
0
        public Combat(CharacterSet cs) : this()
        {
            charSet = cs;

            foreach (CharData c in cs.Listing())
            {
                WpfToken token = new WpfToken(c);
                tokens.Add(token);
                int a = tokens.Count(s => s.charData.ReturnPosition() == token.charData.ReturnPosition());
                token.Sector(a, true);
                TokenCanvas.Children.Add(token.Token);
                Canvas.SetLeft(token.Token, token.CurrentY);
                Canvas.SetTop(token.Token, token.CurrentX);
            }
        }
Ejemplo n.º 3
0
        private void dataGrid_Loaded(object sender, RoutedEventArgs e)
        {
            var grid = sender as DataGrid;

            grid.ItemsSource = CS.Listing();
        }