Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            viewModel = new StatusesViewModel();
            viewModel.FirstStatusBar = new StatusBar(1, "F1:")
            {
                CurrentHealth = 0,
                MaxHealth     = 100,
                Name          = "first",
                Type          = StatusBarType.Friend
            };
            viewModel.SecondStatusBar = new StatusBar(2)
            {
                CurrentHealth = 50,
                MaxHealth     = 100,
                Name          = "second",
                Type          = StatusBarType.Enemy
            };
            viewModel.ThirdStatusBar = new StatusBar(3)
            {
                CurrentHealth = 100,
                MaxHealth     = 100,
                Name          = "third",
                Type          = StatusBarType.Pet
            };
            DataContext = viewModel;

            statusBars = new Statuses("Test", () => new NullUltimaClientWindow());
            statusBars.Open();
            statusBars.MobileTargeted += (sender, id) =>
            {
                viewModel.TargetedMobileId = id.ToString();
            };
        }