示例#1
0
 private void UC_Header_Load(object sender, EventArgs e)
 {
     lblDay.Text = lblNewDate.Text = "";
     MaftooxCalendar.MaftooxPersianCalendar.DateWork PRD = new MaftooxCalendar.MaftooxPersianCalendar.DateWork();
     lblDay.Text     = PRD.GetNameDayInMonth();
     lblNewDate.Text = PRD.GetNumberDayInMonth() + " " + PRD.GetNameMonth() + " " + PRD.GetNumberYear();
     timer1_Tick(null, null);
 }
示例#2
0
 private void SetCalendar()
 {
     try
     {
         var prd = new MaftooxCalendar.MaftooxPersianCalendar.DateWork();
         lblDay.Text    = prd.GetNumberDayInMonth().ToString();
         lblMounth.Text = prd.GetNameMonth();
         lblYear.Text   = prd.GetNumberYear().ToString();
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
示例#3
0
        public static string GetFullCalendar()
        {
            var res = "";

            try
            {
                var prd     = new MaftooxCalendar.MaftooxPersianCalendar.DateWork();
                var day     = prd.GetNumberDayInMonth().ToString();
                var mounth  = prd.GetNameMonth();
                var year    = prd.GetNumberYear().ToString();
                var dayname = Calendar.GetDayNameOfWeek(DateTime.Now);

                res = $"امروز: {dayname} {day} {mounth} {year}";
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }

            return(res);
        }
示例#4
0
        private async void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                Utility.CloseAllChromeWindows();
                PictureManager();
                await CopyImage();

                var th = new Thread(new ThreadStart(async() => await GetNaqz()));
                th.Start();
                lblDay.Text = lblNewDate.Text = "";
                var PRD = new MaftooxCalendar.MaftooxPersianCalendar.DateWork();
                lblDay.Text     = PRD.GetNameDayInMonth();
                lblNewDate.Text = PRD.GetNumberDayInMonth() + " " + PRD.GetNameMonth() + " " + PRD.GetNumberYear();
                timer1_Tick(null, null);
                lblVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
                SetBackUpLables();
                await GetDelete();
            }
            catch (Exception exception)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(exception);
            }
        }
示例#5
0
 public static void Display_Header(System.Windows.Forms.Label lblDay, System.Windows.Forms.Label lblNewDate)
 {
     MaftooxCalendar.MaftooxPersianCalendar.DateWork PRD = new MaftooxCalendar.MaftooxPersianCalendar.DateWork();
     lblDay.Text     = PRD.GetNameDayInMonth();
     lblNewDate.Text = PRD.GetNumberDayInMonth() + " " + PRD.GetNameMonth() + " " + PRD.GetNumberYear();
 }