Example #1
0
 public void SetApp(StubApp app)
 {
     this.App = app;
     //TODO
     StopProcess();
     if (app != null)
     {
         if (!string.IsNullOrEmpty(app.Name))
         {
             btnProcessTitle.Text = app.Name;
         }
         else
         {
             btnProcessTitle.Text = Path.GetFileNameWithoutExtension(app.Path);
         }
         toolTip1.SetToolTip(btnProcessTitle, btnProcessTitle.Text + "\n" + app.Path + "\n" + app.Args);
         process              = new ProcessPlus(app.Path, app.Args);
         process.Priority     = Priority;
         process.OnExitEvent += delegate(string path, string arg, bool error) {
             UpdateStatus();
             if (OnProcessExit != null)
             {
                 OnProcessExit(this, path, arg, error);
             }
         };
     }
 }
Example #2
0
        public ProcessPanel(StubApp app, int width, ProcessPriorityClass priority = ProcessPriorityClass.Normal)
        {
            InitializeComponent();
            int h = this.Size.Height;

            this.Size = new Size(width, h);
            Priority  = priority;
            SetApp(app);
        }