Example #1
0
        public TorchUI(TorchServer server)
        {
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            Width   = 800;
            Height  = 600;
            _config = (TorchConfig)server.Config;
            _server = server;
            //TODO: data binding for whole server
            DataContext = server;
            InitializeComponent();

            AttachConsole();

            //Left = _config.WindowPosition.X;
            //Top = _config.WindowPosition.Y;
            //Width = _config.WindowSize.X;
            //Height = _config.WindowSize.Y;

            Chat.BindServer(server);
            PlayerList.BindServer(server);
            Plugins.BindServer(server);
            LoadConfig((TorchConfig)server.Config);

            Themes.uiSource = this;
            Themes.SetConfig(_config);
            Title = $"{_config.InstanceName} - Torch {server.TorchVersion}, SE {server.GameVersion}";

            Loaded += TorchUI_Loaded;
        }
Example #2
0
        public TorchUI(TorchServer server)
        {
            _config = (TorchConfig)server.Config;
            _server = server;
            InitializeComponent();
            _startTime         = DateTime.Now;
            _uiUpdate.Elapsed += UiUpdate_Elapsed;

            Chat.BindServer(server);
            PlayerList.BindServer(server);
            Plugins.BindServer(server);
        }
Example #3
0
        public TorchUI(TorchServer server)
        {
            _config = (TorchConfig)server.Config;
            _server = server;
            InitializeComponent();
            _startTime         = DateTime.Now;
            _uiUpdate.Elapsed += UiUpdate_Elapsed;

            Left   = _config.WindowPosition.X;
            Top    = _config.WindowPosition.Y;
            Width  = _config.WindowSize.X;
            Height = _config.WindowSize.Y;

            Chat.BindServer(server);
            PlayerList.BindServer(server);
            Plugins.BindServer(server);
        }
Example #4
0
        public TorchUI(TorchServer server)
        {
            _config = (TorchConfig)server.Config;
            _server = server;
            InitializeComponent();

            Left   = _config.WindowPosition.X;
            Top    = _config.WindowPosition.Y;
            Width  = _config.WindowSize.X;
            Height = _config.WindowSize.Y;

            //TODO: data binding for whole server
            DataContext = server;
            Chat.BindServer(server);
            PlayerList.BindServer(server);
            Plugins.BindServer(server);
            LoadConfig((TorchConfig)server.Config);
        }