Rene Duchamp
Rene Duchamp

Reputation: 2629

Command Line Argument c#

I have a standalone example program which when executed gives a terminal to get the input as "0" and then shows another window which is essentially the camera function.

enter image description here enter image description here

program for camera which intakes the command line arguments:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using mv.impact.acquire;


#if USE_DISPLAY
    using mv.impact.acquire.display;
#endif // #if USE_DISPLAY
using mv.impact.acquire.examples.helper;

namespace SW_FormsApplication3
{
    class ContinousCapture
    {

        public static void StartCamera(string[] args)
        {

          //Acquire camera image and display it on window

        }//End Method
    }//End class
}//End namespace

My toolstrip button to invoke the method:

private void toolStripButton2_Click(object sender, EventArgs e)
    {

        ContinousCapture.StartCamera();

    }

I want to implement the same in my application but in my case, I should click a button on the form (toolstrip button) so that I can have the image window show up. How can I achieve this, meaning how to invoke a method that takes in command line args ?

I have already tried, ContinousCapture.StartCamera(null); I have resolved the problem with PDB file but not able to figure out why the console doesnt show up.

Upvotes: 0

Views: 110

Answers (1)

Orel Eraki
Orel Eraki

Reputation: 12196

Simple as that ContinousCapture.StartCamera(null);

Upvotes: 3

Related Questions