Пример #1
0
 static void Main(string[] args)
 {
     // If length of args is not one, either none or too many arguments were passed through.
     if (args.Length != 1)
     {
         // If length of args > 1, too many arguments have been passed. A message is displayed.
         if (args.Length > 1)
         {
             MessageBox.Show("Emulate assist only accepts one argument.\n\nThe program will discard any arguments and continue.", "Note!");
         }
         // Run the program without a web link passed through.
         VmForm vmForm = new VmForm("");
         vmForm.ShowDialog();
         vmForm.Dispose();
     }
     // If length of args = 1, we have a web link and need to pass it through to the forms so
     // that PathsForm can start with a path to an .ISO location.
     else if (args.Length == 1)
     {
         VmForm vmForm = new VmForm(args[0].ToString());
         vmForm.ShowDialog();
         vmForm.Dispose();
     }
     // If we get here, an unexpected error has occured. Message is displayed and prgram terminates.
     else
     {
         MessageBox.Show("An unknown error has occured.\n\nPlease check the arguments passed to Emulate Assist and try again.", "Error!");
     }
 }
Пример #2
0
 static void Main(string[] args)
 {
     // If length of args is not one, either none or too many arguments were passed through.
     if(args.Length != 1) {
         // If length of args > 1, too many arguments have been passed. A message is displayed.
         if(args.Length > 1) {
             MessageBox.Show("Emulate assist only accepts one argument.\n\nThe program will discard any arguments and continue.", "Note!");
         }
         // Run the program without a web link passed through.
         VmForm vmForm = new VmForm("");
         vmForm.ShowDialog();
         vmForm.Dispose();
     }
     // If length of args = 1, we have a web link and need to pass it through to the forms so
     // that PathsForm can start with a path to an .ISO location.
     else if(args.Length == 1) {
         VmForm vmForm = new VmForm(args[0].ToString());
         vmForm.ShowDialog();
         vmForm.Dispose();
     }
     // If we get here, an unexpected error has occured. Message is displayed and prgram terminates.
     else {
         MessageBox.Show("An unknown error has occured.\n\nPlease check the arguments passed to Emulate Assist and try again.", "Error!");
     }
 }
Пример #3
0
 //-------------------------------------------------------------
 // First Page Constructor
 //-------------------------------------------------------------
 public PathsForm(VmForm parent, string webPath)
 {
     InitializeComponent();
     this.myParent = parent;
     if(webPath != "") {
         this.txtBxISOpath.Text = webPath;
     }
     else {
         this.txtBxISOpath.Text = "";
     }
 }
Пример #4
0
 //-------------------------------------------------------------
 // First Page Constructor
 //-------------------------------------------------------------
 public PathsForm(VmForm parent, string webPath)
 {
     InitializeComponent();
     this.myParent = parent;
     if (webPath != "")
     {
         this.txtBxISOpath.Text = webPath;
     }
     else
     {
         this.txtBxISOpath.Text = "";
     }
 }