using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.Globalization;
namespace WindowsFormsApplication8
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            PersianCalendar pc = new PersianCalendar();
            DateTime dt = DateTime.Parse(maskedTextBoxAdv1.Text);
            DateTime dt2 = DateTime.Parse(maskedTextBoxAdv2.Text);
            DateTime date1 = pc.ToDateTime(dt.Year,dt.Month,dt.Day,dt.Hour,dt.Minute,dt.Second,dt.Millisecond);
            DateTime date2 = pc.ToDateTime(dt2.Year, dt2.Month, dt2.Day, dt2.Hour, dt2.Minute, dt2.Second, dt2.Millisecond);

            if (date1 > date2)
                MessageBox.Show("تاریخ اول بزرگتر");
            else if (date1 < date2)
                MessageBox.Show("تاریخ اول کوچکتر");
            else  
                MessageBox.Show("مساوی");
        }
    }
}
