This repository has been archived on 2020-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
ibz/software/1_sem/ConsoleApp1/ConsoleApp1/Calculator.cs

34 lines
834 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace ConsoleApp1
{
class Calculator
{
public static void StartCalc()
{
var processInfo = new ProcessStartInfo
{
FileName = "calc.exe",
};
using (var process = Process.Start(processInfo))
{
process.Start();
}
}
public static void IsProcessRunning(string sProcessName)
{
Process[] proc = System.Diagnostics.Process.GetProcessesByName(sProcessName);
while (proc.Length > 0)
{
Console.WriteLine("calc.exe beendet");
}
}
}
}