Esempio n. 1
0
        private void MainServerForm_Load(object sender, EventArgs e)
        {
            TraceOps.LoadLog();
            try
            {
                _name = "Server";

                Services.PrepareSetService(_port);
                Services.SetService(typeof(ConnectionTable));
                Services.SetService(typeof(MessageQueue));

                _connectionTable = ConnectionTable.GetRemote("localhost", _port);
                _messageQueue    = MessageQueue.GetRemote("localhost", _port);

                _taskManager       = new TaskManager(ref _messageQueue, ref _name);
                _taskManager.Task += TaskManagerOnTask;

                var ci = new ConnectionTable.ClientInformation(_name);
                ci.SetGroup("server");
                ci.SetIp(NetworkOps.GetIpString(HashOps.GetFqdn()));
                ci.SetPort(_port);
                _connectionTable.Set(_name, ci);

                LoadClientsTable();
                LoadPlugIns();
            }
            catch (Exception ex)
            {
                TraceOps.Out(ex.Message);
            }
        }
Esempio n. 2
0
        private void MainClientForm_Load(object sender, EventArgs e)
        {
            TraceOps.LoadLog();
            Services.PrepareGetService();
            SystemOps.SetAutoStart();

            _configServer          = new ConfigServer();
            _configServer.Changed += ConfigServerOnChanged;

            _keyboard = new KeyboardControl();
            _keyboard.RegisterGlobalHotKey(Constants.NOMOD, Keys.Left, this);
            _keyboard.RegisterGlobalHotKey(Constants.NOMOD, Keys.Right, this);
            _keyboard.KeyPressed += HandleHotkey;


            DllLoader.InitializeClientPlugIns(_plugins);
        }
Esempio n. 3
0
 private void logFileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     TraceOps.LoadLog();
 }