public Form1(BootParameter bootParameter) { this.bootParameter = bootParameter; if (string.Empty == this.bootParameter.Host || null == this.bootParameter.Host) { this.bootParameter.Host = "118.26.131.19"; } if (0 == this.bootParameter.Port) { this.bootParameter.Port = 8885; } InitializeComponent(); }
private static BootParameter parseArgs(string[] args) { BootParameter bootParameter = new BootParameter(); if (null != args && args.Length > 0) { bootParameter.Host = args[0]; if (args.Length > 1) { bootParameter.Port = int.Parse(args[1]); } } return(bootParameter); }