private void TccWindow_Loaded(object sender, RoutedEventArgs e)
        {
            InitWindow(SettingsManager.ClassWindowSettings, ignoreSize: true);

            Context = (ClassWindowViewModel)DataContext;
            Context.PropertyChanged += _context_PropertyChanged;
        }
Ejemplo n.º 2
0
        public ClassWindow(ClassWindowViewModel vm)
        {
            DataContext = vm;
            VM          = (ClassWindowViewModel)DataContext;
            InitializeComponent();
            ButtonsRef  = Buttons;
            BoundaryRef = Boundary;
            MainContent = WindowContent;
            Init(App.Settings.ClassWindowSettings);

            //if (!Game.Logged) return;
            //if (VM.CurrentManager != null) return;
            //VM.CurrentClass = Game.Me.Class;
        }
        public ClassWindow()
        {
            DataContext = new ClassWindowViewModel();
            VM          = DataContext as ClassWindowViewModel;
            InitializeComponent();
            ButtonsRef  = Buttons;
            MainContent = WindowContent;
            Init(Settings.SettingsHolder.ClassWindowSettings, ignoreSize: true, undimOnFlyingGuardian: false);
            Settings.SettingsHolder.ClassWindowSettings.EnabledChanged += OnEnabledChanged;

            if (!SessionManager.Logged)
            {
                return;
            }
            if (WindowManager.ClassWindow.VM.CurrentManager == null)
            {
                WindowManager.ClassWindow.VM.CurrentClass = SessionManager.CurrentPlayer.Class;
            }
        }