Ejemplo n.º 1
0
        // -- Debug -- //
#endif

        public SCONClient(BasicUIViewModel basicUIvm)
        {
            BasicUIVM = basicUIvm;
            BasicUIVM.OnConnect += BasicUIViewModel_OnConnect;
            BasicUIVM.OnDisconnect += BasicUIViewModel_OnDisconnect;

            BasicUIVM.TabChanged += BasicUIViewModel_TabChanged;

            BasicUIVM.OnGetLog += BasicUIViewModel_GetLog;
            BasicUIVM.OnGetCrashLog += BasicUIViewModel_GetCrashLog;

            BasicUIVM.OnSaveLog += BasicUIViewModel_SaveLog;

            BasicUIVM.OnChatStateChanged += BasicUIViewModel_OnChatStateChanged;

            Client = SocketClient.CreateTCP();
            Stream = new ProtobufStream(Client);
        }
Ejemplo n.º 2
0
        protected override void LoadContent()
        {
            IsMouseVisible = true;

            FontManager.DefaultFont = Engine.Instance.Renderer.CreateFont(Content.Load<SpriteFont>("Segoe_UI_10_Regular"));

            BasicUI = new BasicUI(Graphics.PreferredBackBufferWidth, Graphics.PreferredBackBufferHeight);
            ViewModel = new BasicUIViewModel();
            BasicUI.DataContext = ViewModel;
            DebugViewMode = new DebugViewModel(BasicUI);

            FontManager.Instance.LoadFonts(Content);
            ImageManager.Instance.LoadImages(Content);
            SoundManager.Instance.LoadSounds(Content);

            BasicUI.InputBindings.Add(new KeyBinding(new RelayCommand(o => Exit()), KeyCode.Escape, ModifierKeys.None));

            SCONClient = new SCONClient(ViewModel);

            base.LoadContent();
        }