private void next_button_Click(object sender, EventArgs e) { BeginnerForm f1 = new BeginnerForm(); editForm e1 = new editForm(); tunneltype = e1.vpnValueChange((string)vpnValueBox.SelectedItem, KeyTextBox.Text); f1.ConfigNext(true, KeyTextBox.Text, tunneltype); }
private void Next_button_Click(object sender, EventArgs e) { page = GetPage(); string[] date = new string[2]; editForm e1 = new editForm(); string scr; switch (page) { case 0: //0ページ目 PageMove(1); break; case 1: //1ページ目 date = vpn_ctr.NameIPGet(); Ip = date[0]; name = date[1]; if (e1.check(name, Ip) == false) { MessageBox.Show("入力が正しくありません"); } else { PageMove(2); } break; case 2: //2ページ目 date = config_ctr.ConfigKeyGet(); tunnelTypeStr = date[0]; Key = date[1]; tunnelType = e1.vpnValueChange(tunnelTypeStr, Key); if (Key == "" && tunnelType == "L2TP -L2tpPsk ") { MessageBox.Show("事前共有キーの入力がされていません"); } else { PageMove(3); ButonnTextReprint(1); } break; case 3: //3ページ目 //vpn作成 addOrSet = @"Add-VpnConnection"; scr = e1.vpnConnectionString(addOrSet, name, Ip, tunnelType); vpnformInstance.RunPowerShell(scr, 0); ButonnTextReprint(2); PageMove(4); break; case 4: //4ページ目 PageMove(5); break; } }