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); }
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); } }
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); }
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); } }
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(); }