Пример #1
0
        private static async Task StartClient(int localWorldId, short portOffset, bool membersWorld)
        {
            Application.SetCompatibleTextRenderingDefault(false);

            Task clientRunningAwaitable       = signlink.startpriv(IPAddress.Parse("127.0.0.1"));
            ClientConfiguration configuration = new ClientConfiguration(localWorldId, portOffset, membersWorld);

            //Wait for signlink
            while (!signlink.IsSignLinkThreadActive)
            {
                await Task.Delay(50)
                .ConfigureAwait(false);
            }

            RsWinForm        windowsFormApplication = new RsWinForm(765, 503);
            RsWinFormsClient client1 = new RsWinFormsClient(configuration, windowsFormApplication.CreateGraphics());

            windowsFormApplication.RegisterInputSubscriber(client1);
            client1.createClientFrame(765, 503);

            Application.Run(windowsFormApplication);

            await clientRunningAwaitable
            .ConfigureAwait(false);
        }
Пример #2
0
        private static async Task StartClient(int localWorldId, short portOffset, bool membersWorld)
        {
            Application.SetCompatibleTextRenderingDefault(false);

            Task clientRunningAwaitable       = signlink.startpriv("127.0.0.1");
            ClientConfiguration configuration = new ClientConfiguration(localWorldId, (short)(portOffset), membersWorld);

            RsWinForm        windowsFormApplication = new RsWinForm(765, 503);
            RsWinFormsClient client1 = new RsWinFormsClient(configuration, windowsFormApplication.CreateGraphics());

            windowsFormApplication.RegisterInputSubscriber(client1);
            client1.createClientFrame(765, 503);

            Application.Run(windowsFormApplication);

            await clientRunningAwaitable
            .ConfigureAwait(false);
        }