Exemplo n.º 1
0
 public void KillOrigin()
 {
     if (IsOriginRunning())
     {
         OriginClose(new OriginCloseEventArgs(restartOrigin));
         ProcessTools.KillProcess(OriginProcess, true, false);
         closedSafely = true;
     }
 }
Exemplo n.º 2
0
        public void StartOrigin()
        {
            OriginPath = getOriginPath();
            if (OriginPath == null)
            {
                return;
            }
            var originProcessInfo = new ProcessStartInfo(OriginPath, CommandLineOptions);

            if (IsOriginRunning())  //We must relaunch Origin as a child process for Steam to properly apply the overlay hook.
            {
                ProcessTools.KillProcess("Origin", true, false);
                restartOrigin = true;
            }
            OriginProcess = Process.Start(originProcessInfo);
            listenForUnexpectedClose();
        }
Exemplo n.º 3
0
 public static void CreateUnmanagedInstance()
 {
     ProcessTools.CreateOrphanedProcess(getOriginPath(), "/StartClientMinimized");
 }
Exemplo n.º 4
0
 public static void SetWindowIcon(IntPtr handle, Icon icon)
 {
     ProcessTools.SendMessage(handle, WM_SETICON, ICON_BIG, icon.Handle);
     ProcessTools.SendMessage(handle, WM_SETICON, ICON_SMALL, icon.Handle);
 }