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 FMessegeBox;

namespace WindowsFormsApplication8
{
    public partial class frmCallSetting : Form
    {
        string cTell = "";
        string cFax = "";
        string cMobile = "";

        public string cTell_
        {
            get
            {
                return cTell;
            }
            set
            {
                cTell = value;
            }
        }

        public string cFax_
        {
            get
            {
                return cFax;
            }
            set
            {
                cFax = value;
            }
        }

        public string cMobile_
        {
            get
            {
                return cMobile;
            }
            set
            {
                cMobile = value;
            }
        }

        string CallNow = "";
        public frmCallSetting()
        {
            InitializeComponent();
        }

        private void frmCall_Load(object sender, EventArgs e)
        {
            MaximizeBox = false;
            MinimizeBox = false;

            lblTell.Text = cTell_;
            lblFax.Text = cFax_;
            lblMobile.Text = cMobile_;
        }

        private void btnCall_Click(object sender, EventArgs e)
        {
            if (rdoTell.Checked)
            {
                CallNow = cTell_;
            }
            else if (rdoFax.Checked)
            {
                CallNow = cFax_;
            }
            else
            {
                CallNow = cMobile_;
            }

            if (CallNow.Length < 8)
            {
                FarsiMessegeBox.Show(".شماره تلفن معتبر نیست", "خطا", FMessegeBoxButtons.Ok, FMessegeBoxIcons.Information);
            }
            else
            {
                frmCall fc = new frmCall();
                fc.Call_ = CallNow;
                Hide();
                fc.ShowDialog();
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
