Example #1
0
        internal void proceeed()
        {
            switch (ComType)
            {
            case RemoteCommandType.process:
            {
                if (this.ViewImageProcess)
                {
                    ProcessName = Application.StartupPath + "\\RootDir\\" + ProcessName;
                }
                string r = "";
                if (this.NoProcessPar)
                {
                    r = AppHelper.StartProcess(this.ProcessName).ToString();
                }
                else
                {
                    r = AppHelper.StartProcess(this.ProcessName, this.ProcessPar);
                }
                this.Result = this.ProcessName + WebServer.NewLineReplacor + "      proce = " + r;
                break;
            }

            case RemoteCommandType.MessageBox:
            {
                AppHelper.EnormusMessageBox(MessageBoxCap, this.closeMessage);
                this.Result = "msgbx sent";
                break;
            }

            case RemoteCommandType.MoveMouse:
            {
                this.initMouseCursor();
                RemoteAdmin.MouseMove(this.mouseCursorX, this.mouseCursorY);
                this.Result = "MovedTo {" + this.mouseCursorX + "," + this.mouseCursorY + "}";
                break;
            }

            case RemoteCommandType.CloseProcess:
            {
                string r = AppHelper.CloseProcess(ProcessName);
                this.Result = "closed=" + r;
                break;
            }

            case RemoteCommandType.CloseAllProcess:
            {
                this.Result = "closed=" + AppHelper.CloseProcessAll(ProcessName); break;
            }

            case RemoteCommandType.MouseClick:
            {
                this.RequireUnpreved = true;
                RemoteAdmin.PerformMouseLeftClick();
                break;
            }

            case RemoteCommandType.LS:
            {
                string [] x = AppHelper.GetDirectoryContents(this.DirPath);
                this.Result = AppHelper.ConcaTArrayToString(x, "<br />");

                break;
            }

            case RemoteCommandType.MuteSystemSound:
            {
                this.Result = RemoteAdmin.MuteSystemSound(this.HandlePointer);
                break;
            }

            case RemoteCommandType.MouseRightClick:
            {
                this.Result = "clicking=" + RemoteAdmin.PerformMouseRightClick();
                break;
            }

            case RemoteCommandType.PrintScreenShot:
            {
                this.HasBinaryResult = true;
                string fil = AppHelper.GetRandomFilePAth();
                var    bmp = ScreenCapturePInvoke.CaptureFullScreen(true);
                bmp.Save(fil);
                this.bytes = AppHelper.ReadFileBts(fil);
                AppHelper.deleteFile(fil);
                this.extn   = "jpg";
                this.Result = fil;
                break;
            }

            case RemoteCommandType.ShowClient:
            case RemoteCommandType.HideClient: this.RequireUnpreved = true; break;
            }
        }