Пример #1
0
 public ApplicationSettings(MessageQueue messageQueue, SystemEventQueue eventQueue)
 {
     InitializeDirectories();
     SystemMessageQueue = messageQueue;
     SystemEventQueue = eventQueue;
     MapColors = new Dictionary<int, KnownColor>();
     LoadColors();
     Logins = new List<Connection>();
     RegisteredUsers = new RegisteredUsers();
     Players = new Players();
     LoadRegistryAccounts();
 }
Пример #2
0
 public Mountain()
 {
     InitializeComponent();
     MessageQueue = new MessageQueue();
     SystemEventQueue = new SystemEventQueue();
     Common.Settings = new ApplicationSettings(MessageQueue, SystemEventQueue);
     MessageQueue.Tag = "System";
     MessageQueue.OnMessageReceived += Messages_OnMessageReceived;
     SystemEventQueue.OnEventReceived += Events_OnEventReceived;
     world = BuildWorldAdminSection();
     Common.Settings.World = world;
     // todo: load last saved world else load default world, if no default, build basic default area
     world.StartAcceptingConnections(world.Port);
     if (world.portListener.Active()) {
         listenerCheckBox.BackColor = Color.GreenYellow;
         connectionPoller.Enabled = true;
         Console.Items.Add("System: Server has started.");
     }
     RefreshEditor();
     SyncControls();
 }