Esempio n. 1
0
        public CivLauncher(Config config)
        {
            Config  = config;
            Handler = new ErrorHandler(config.Locale);

            InitializeComponent();
            LoadLocale(config.Locale);
            Civilians = new CivilianDictionary();

            SkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            SkinManager.ColorScheme = new ColorScheme(Primary.Green500, Primary.Green700, Primary.Green300, Accent.Green700, TextShade.WHITE);
        }
Esempio n. 2
0
        public Server(Config config, CivilianDictionary civilians)
        {
            Config  = config;
            Handler = new ErrorHandler(config.Locale);

            Console.Title = "CloneCAD Server";

            Civilians = new StorableValue <CivilianDictionary>(civilians)
            {
                FilePath = Program.CIV_EXPORT_PATH
            };

            Listener = new TcpListener(IPAddress.Parse(Config["IP"]), Config.Port);

            SetConsoleCtrlHandler(OnExit, true);
        }