Beispiel #1
0
        private static bool IsKoobooClosed()
        {
            var dotnetProcesses = Process.GetProcessesByName("dotnet");

            foreach (var process in dotnetProcesses)
            {
                var processId = process.Id;
                var cmd       = string.Format("ps -ef|grep {0}", processId);

                var str = CmdHelper.Excute(cmd, false);
                if (str.IndexOf(KoobooAppName, StringComparison.OrdinalIgnoreCase) == -1)
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #2
0
        public static void CloseKooboo()
        {
            var dotnetProcesses = Process.GetProcessesByName("dotnet");

            foreach (var process in dotnetProcesses)
            {
                var processId = process.Id;
                var cmd       = string.Format("ps -ef|grep {0}", processId);
                Log(processId.ToString());
                var str = CmdHelper.Excute(cmd, false);
                if (str.IndexOf(KoobooAppName, StringComparison.OrdinalIgnoreCase) > -1)
                {
                    var closeCmd = "kill " + processId;
                    CmdHelper.Excute(closeCmd, false);
                    //break;
                    //maybe open multi kooboo.app,so it continue to check kooboo.app process
                }
            }
            //wait koobo to close.
            WaitKoobooClosed();
        }
Beispiel #3
0
        public static void OpenKoobooApp()
        {
            var path = Path.Combine(RootPath, KoobooAppName);

            CmdHelper.StartDotnetApp(path);
        }