I want to add command line
options to my WPF
application but in case command line is sent into my EXE file
i don't want the UI
open but only command line options.
Is it possible to do something like this ?
public partial class MainWindow : MetroWindow
{
public MainWindow()
{
string[] args = Environment.GetCommandLineArgs();
if (args.Length > 1)
{
this.Hide();
ParseArgs(args);
}
else
{
InitializeComponent();
}
}
private void ParseArgs(string[] args)
{
// bla bla
}
}