Exemplo n.º 1
0
        public void ProcessArgs(string[] args, bool firstInstance)
        {
            //Process Command Line Arguments Here
            if (args.Length == 0)
            {
                //if no file is given via args get file from OpenFileDialog
                Microsoft.Win32.OpenFileDialog fileDlg = new Microsoft.Win32.OpenFileDialog();
                fileDlg.DefaultExt = "vpp";
                fileDlg.Filter     = "VisionProFiles (*.vpp)|*.vpp";
                if (!String.IsNullOrEmpty(settings.ReadValue("FileDialog", "InitialDirectory")))
                {
                    fileDlg.InitialDirectory = settings.ReadValue("FileDialog", "InitialDirectory");
                }
                fileDlg.ShowDialog();

                MyWindow.OpenVPP(fileDlg.FileName);
            }

            else if (args.Length == 1)
            {
                MyWindow.OpenVPP(args[0]);
            }
        }