Esempio n. 1
0
        private static void SingleComp()
        {
            var View  = new View.PortEnter();
            var Model = new ModelChat();

            Application.Run(View);
        }
Esempio n. 2
0
        private static void NotSingleComp()
        {
            var View  = new View.UserLogin();
            var Model = new ModelChat();

            Model.Localport = Model.Remoteport = 8888;
            var Presentor = new Presentor.PresentorUserLogin(View, Model);
            var _         = new MyProcess.FindProcces();

            if (_.ProcessHaveCopy("UDPChat"))
            {
                MessageBox.Show("Данное приложение уже запущено на вашем компьютере", "Error");
                Environment.Exit(0);
            }
            Application.Run(View);
        }