using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;

namespace WindowsFormsApplication8
{
    public partial class frmCall : Form
    {
        SerialPort Port = new SerialPort();

        public frmCall()
        {
            InitializeComponent();
        }
        string Call = "";
        public string Call_
        {
            get
            {
                return Call;
            }
            set
            {
                Call = value;
            }
        }

        private void frmCall_Load(object sender, EventArgs e)
        {
            ControlBox = false;
            Port.PortName = "COM3";
            Port.Open();
            Port.Write("ATDT " + Call_ + Convert.ToChar(13) + Convert.ToChar(10));
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Port.Close();
            Close();
        }
    }
}
