private void timer1_Tick(object sender, EventArgs e) { DateTime dt = DateTime.Now; circularProgressBar1.Text = dt.Hour.ToString("00") + ":" + dt.Minute.ToString("00"); label1.Text = dt.Second.ToString("00"); circularProgressBar1.Value = dt.Second; prdtime.Upate(); string stry = prd.GetNameMonth() + prd.GetNameDayInMonth(); label2.Text = prd.GetNameDayInMonth(); label3.Text = prd.GetNumberDayInMonth().ToString() + "" + prd.GetNameMonth() + "" + prd.GetNumberYear(); }
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); } }
private void timer1_Tick(object sender, EventArgs e) { DateTime DT = DateTime.Now; circularProgressBar2.Text = DT.Hour.ToString("00") + ":" + DT.Minute.ToString("00"); LblSec.Text = DT.Second.ToString("00"); circularProgressBar2.Value = DT.Second; PersianTime.Upate(); if (PersianDate.GetNameDayInMonth() == "سه شبه") { LblDay.Text = "سه شنبه"; } else { LblDay.Text = PersianDate.GetNameDayInMonth(); } LblDate.Text = PersianDate.GetNumberDayInMonth().ToString() + " " + PersianDate.GetNameMonth() + " " + PersianDate.GetNumberYear().ToString(); }
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(); }