Giter Site home page Giter Site logo

persianbingcalendar's Introduction

PersianBingCalendar

PersianBingCalendar

این برنامه آخرین تصاویر موتور جستجوی Bing را دریافت کرده، سپس تقویم شمسی ماه را به همراه تعطیلات رسمی آن، بر روی این تصویر ترسیم کرده و در آخر آن‌را به عنوان Wallpaper ویندوز، به صورت خودکار تنظیم می‌کند.

برای اجرای این برنامه نیاز به نصب دات نت فریم ورک 4 را دارید که اگر از ویندوزهای جدید استفاده می‌کنید، هم اکنون نصب است و جزئی سیستم عامل می‌باشد.

پس از اجرای آن، به صورت خودکار یک وظیفه‌ی زمانبندی شده، به لیست وظایف ویندوز اضافه گردیده و این برنامه به صورت خودکار هر ساعت یکبار اجرا خواهد شد. به این ترتیب نیازی به اجرای پس زمینه‌ی آن وجود نداشته و سرباری را به سیستم شما تحمیل نخواهد کرد. اگر مسیر فایل اجرایی برنامه را تغییر دادید، تنها کافی است یکبار دیگر مستقیما آن‌را اجرا کنید تا پارامترهای این وظیفه به صورت خودکار به روز شوند.

PersianBingCalendarTask

آخرین نگارش این برنامه را از قسمت releases می‌توانید دریافت کنید.

نکات و تنظیمات

تنظیمات تاریخ قمری در ویندوز

ghamari

همانطور که در اینجا مشاهده می‌کنید، اگر به کنترل پنل، قسمت Region آن مراجعه کرده و در برگه‌ی باز شده، بر روی دکمه‌ی additional settings کلیک کنیم، امکان انتخاب تاریخ قمری هم وجود دارد و در اینجا به ازای روز جاری، 5 روز و تاریخ مختلف را می‌توان انتخاب کرد (بسته به موقعیت جغرافیایی). پس از این تنظیم است که برنامه، تاریخ روز جاری را به قمری به نحو صحیحی نمایش می‌دهد.

تنظیمات برنامه (PersianBingCalendar.exe.config)

تنظیم توضیحات
UseRandomImages اگر به true تنظیم شود، ساعتی یکبار به صورت اتفاقی یکی از تصاویر دریافتی را نمایش می‌دهد. در غیراینصورت همواره آخرین تصویر دریافتی نمایش داده خواهد شد.
ShowPastHolidays آیا مناسبت‌های پیش از روز جاری نیز نمایش داده شوند؟
CalendarFontSize اندازه فونت تقویم
HolidaysFontSize اندازه فونت مناسبت‌ها
CopyrightFontSize اندازه فونت کپی رایت
CalendarFontFileName نام فایل فونت تقویم که در پوشه Fonts برنامه کپی شده‌است.
CopyrightFontName نام فونت کپی رایت که در سیستم نصب است.
ShowCopyright اگر به true تنظیم شود،‌ کپی رایت تصویر نیز نمایش داده خواهد شد.

دریافت مناسبت‌هاى به روز شده

همواره می‌توانید آخرین فایل مناسبت‌ها را از این آدرس دریافت کنید و سپس آن‌را جایگزین فایل Data\holidays.csv موجود و قدیمی نمائید: holidays.csv

persianbingcalendar's People

Contributors

vahidn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

persianbingcalendar's Issues

خطا در اجرای برنامه

در هنگام اجرای برنامه در حالتی که Run as administrator نباشه خطای زیر رخ میده

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
   at Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl)
   at Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String path, TaskDefinition definition, TaskCreation createType, String userId, String password, TaskLogonType logonType, String sddl)
   at PersianBingCalendar.Core.TaskRunner.CreateOrUpdateTask()
   at PersianBingCalendar.Program.Main(String[] args)

Problem in Windows 10

Hi Vahid. I have windows 10 x64 and your software has a problem with my windows. It works great on first run but it doesn't change background picture in next days.
Is there any way to find what causes this?

Archive downloaded images without modifying them

اگر میشه برنامه عکس هایی که دانلود میکنه رو بدون تغییر هم توی یه پوشه ذخیره کنه
البته میتونه به صورت آپشن باشه که هر کسی مایل بود فعالش کنه
با تشکر

Anti Virus Alert for find High risk Application

Hi Dear Vahid.
in last day Windows Security Application show message that find a Threat program and delete your exe file.
I Check PersianBingCalendar.exe with Virus Total Site and receive some alert message .

https://www.virustotal.com/gui/file/93f95807331ec6b48eb50672dcf0ecfe497298280f1abe07cba3efe9000f80ce

can you help me why Windows Security and some Anti Virus recognize this application as a threat ?
it was happen last month and Windows Security remove the exe file

exception in task scheduler

Is some computers the user must run the application using "Run as Administrator" or he will face this exception in error.log
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl)
at Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String path, TaskDefinition definition, TaskCreation createType, String userId, String password, TaskLogonType logonType, String sddl)
at PersianBingCalendar.Core.TaskRunner.CreateOrUpdateTask() in D:\Ali_Hamidi+Projects\Git\PersianBingCalendar\PersianBingCalendar\Core\TaskRunner.cs:line 25
at PersianBingCalendar.Program.Main(String[] args) in D:\Ali_Hamidi+Projects\Git\PersianBingCalendar\PersianBingCalendar\Program.cs:line 17

also when it is run as administrator. next scheduled runs will face this error too

آبشنی برای تاریک‌کردن تصویر پس‌زمینه

مسئله:

همانطوری که میدانید، پس‌زمینه‌های بینگ اکثرا طبیعت است و به علت روشنایی زیاد این تصاویر در شب قابل استفاده نیستند.
همچنین در برخی از پس‌زمینه‌های شلوغ، تقویم به راحتی قابل خواندن نیست.

راه‌حل:

من می‌خواهم ویژگی‌ای را اضافه کنید که بتوانم تصویر را کمی تاریک کنم.

نحوه‌ی پیاده‌سازی:

پیاده سازی این ویژگی اصلا سخت نیست فقط کافیه که یک مستطیل به صورت ترنسپرنت بر کل عکس ترسیم شود:

myGraphics.FillRectangle(new SolidBrush(Color.FromArgb(DarkValue, Color.Black)), new Rectangle(new Point(0, 0), OutputImage.Size));

به هر حال می‌توانید از این پروژه هم استفاده کنید: ImageDarker.zip
image

error [AccessViolationException]

سلام
آخرین ورژنی که ریلیز کردید خطا داره خطاش هم اینه
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.Gdip.GdipMeasureString(HandleRef graphics, String textString, Int32 length, HandleRef font, GPRECTF& layoutRect, HandleRef stringFormat, GPRECTF& boundingBox, Int32& codepointsFitted, Int32& linesFilled)
at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)
at System.Drawing.Graphics.MeasureString(String text, Font font)
at PersianBingCalendar.Utils.DrawingExtensions.MeasureString(String text, Font f)
at PersianBingCalendar.Core.PersianCalendarRenderer.getMaxCellSize(Int32 margin)
at PersianBingCalendar.Core.PersianCalendarRenderer.setSizes()
at PersianBingCalendar.Core.PersianCalendarRenderer.DrawThisMonthsCalendar()
at PersianBingCalendar.Core.BingWallpaper.SetTodayWallpapaer()
at PersianBingCalendar.Core.TaskRunner.RunTask()
at PersianBingCalendar.Program.Main(String[] args)
یه مشکل دیگه هم داره توی 7 بک گراند رو نمیتونه ست کنه

there is a Bug in getImage Function

Hi,
in getImage function there is a bug in this line
if (!File.Exists(xmlFile))
{
xmlFile = $"{image.Split('_').First()}.xml";
}
if the image path contains _ character in the folders it does not work as you want.

something wrong with lunar months

Summary of the issue

HI
I see this picture today and i think the lunar month on background picture is not correct :
we are in 27 day of Ramazan but in this calendar we are in 29 day of Ramazan

thanks a lot and best regards
capture

Environment

The in-use version:
Operating system: 
IDE: (e.g. Visual Studio 2015)

Example code/Steps to reproduce:

paste your core code

Output:

Exception message:
Full Stack trace:

آپشنی برای اضافه یا کم کردن به مقدار روز قمری

از اونجایی که تاریخ شمسی فراگیر ویندوز برام کاربردی نیست، نمیتونم تاریخ قمری رو اصلاح کنم، لطفا یه آپشن بزارید که بشه یه عدد مثبت یا منفی رو جهت اضافه یا کم کردن از روز قمری قرار داد
با تشکر

تداخل در نمایش تاریخ قمری

سلام. ممنون از ایده جالب و قشنگتون.
اما امروز من برنامه رو گرفتم و تاریخ قمری رو اشتباه نشون میده. یه روز جلو تره.
ممنون میشم اصلاح کنید.
یه پیشنهاد هم داشتم که فونت مناسبت ها کمی کوچکتر بشه

bug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.