Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ServerConnectorAsync.StartConnection();

            Task.Run(() => ServerConnectorAsync.ReceiveWhile());
            activeForm = new LoginForm();
            Application.Run(activeForm);
            ServerConnectorAsync.StopConnection();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            OperatingSystem os = Environment.OSVersion;

            if (os.Platform == PlatformID.Win32NT)
            {
                if (!(os.Version.Major >= 6))
                {
                    MessageBox.Show("Program działa tylko na systemach Windows Vista/7 i nowszych!");
                    return;
                }
            }
            else
            {
                MessageBox.Show("Program działa tylko na systemach Windows Vista/7 i nowszych!");
                return;
            }

            setServ = new SettingsService();

            /*if (args.Length==1) //Temporary change of server IP Address
             * {
             *  //MessageBox.Show("Tymczasowo nadpisano IP serwera za pomocą argumentu! Adres IP nie zostanie zapisany w konfiguracji.");
             *  Shared.IP.serverIp = args[0];
             * }*/

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ServerConnectorAsync.StartConnection();
            ServerProcessing.startUp();

            Task.Run(() => ServerConnectorAsync.ReceiveWhile());
            Application.Run(new LoginForm());
            ServerConnectorAsync.closingApp = true;
            ServerConnectorAsync.StopConnection();
        }