示例#1
0
 private void createbutton_Click_1(object sender, EventArgs e)
 {
     if (Regex.IsMatch(configal[2].ToString(), "1"))
     {
         using (var form = new BeginnerForm(null))
         {
             //editForm表示
             form.StartPosition = FormStartPosition.CenterScreen;
             form.ShowDialog();
         }
     }
     else if (Regex.IsMatch(configal[2].ToString(), "2"))
     {
         using (var subForm = new editForm(null))
         {
             //editForm表示
             subForm.StartPosition = FormStartPosition.CenterScreen;
             subForm.ShowDialog();
         }
     }
     else
     {
         //何も渡さずにediformを表示
         Create frm = new Create();
         frm.StartPosition = FormStartPosition.CenterScreen;
         frm.ShowDialog();
     }
     loadVPN();
 }
示例#2
0
        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);
        }
示例#3
0
        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;
            }
        }
示例#4
0
 private void CsCreate(object sender, EventArgs e)
 {
     using (var subForm = new editForm(null))
     {
         //editForm表示
         subForm.StartPosition = FormStartPosition.CenterScreen;
         subForm.ShowDialog();
         this.Close();
     }
 }
示例#5
0
        private void editbutton_Click(object sender, EventArgs e)
        {
            if (selectCheck() == true)
            {
                //editfomtにVPN情報を渡す
                using (var subForm = new editForm(this))
                {
                    //editForm表示

                    subForm.ShowDialog();
                }

                loadVPN();
            }
        }