Exemple #1
0
        //while closing app - save the data
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (rulesWindow == null)
            {
                //delete user from room when clising the app
                DeleteUserFromRoomAlgorithmMethod(LeavingTheRoomWindowType.MainWindow);

                //logging out
                Logout();

                //stop the engine host service if it is running
                EngineHostHandler.StopService("MakaoGameHostService");

                //stop the game client service
                EngineClientHandler.Dispose();

                var logger = NLog.LogManager.GetCurrentClassLogger();
                logger.Info("Saving user data ended successfully.");
            }
            else
            {
                e.Cancel = true;
                if (rulesWindow.WindowState == WindowState.Minimized)
                {
                    rulesWindow.WindowState = WindowState.Normal;
                }
                rulesWindow.Activate();
            }
        }
Exemple #2
0
        private void CheckIfClientIsAlive()
        {
            bool response = EngineClientHandler.CheckIfServiceIsAlive();

            SynchCont.Post(_ => CheckIfClientIsAliveResponseHandler(response), null);
        }
Exemple #3
0
 //method for starting game client service
 private void StartMakaoGameClientService()
 {
     EngineClientHandler.StartTheMakaoGameClientService(thisClientEndpoint);
 }