-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f8e170
commit f825c92
Showing
11 changed files
with
130 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
namespace PersianUIControlsMaui.Enums; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace PersianUIControlsMaui.Enums; | ||
|
||
public enum PersianMonthNames | ||
{ | ||
فروردین = 0, | ||
اردیبهشت, | ||
خرداد, | ||
تیر, | ||
مرداد, | ||
شهریور, | ||
مهر, | ||
آبان, | ||
آذر, | ||
دی, | ||
بهمن, | ||
اسفند | ||
[Display(Name = "فروردین")] | ||
Farvardin = 0, | ||
[Display(Name = "اردیبهشت")] | ||
Ordibehesht, | ||
[Display(Name = "خرداد")] | ||
Khordad, | ||
[Display(Name = "تیر")] | ||
Tir, | ||
[Display(Name = "مرداد")] | ||
Mordad, | ||
[Display(Name = "شهریور")] | ||
Shahrivar, | ||
[Display(Name = "مهر")] | ||
Mehr, | ||
[Display(Name = "آبان")] | ||
Aban, | ||
[Display(Name = "آذر")] | ||
Azar, | ||
[Display(Name = "دی")] | ||
Day, | ||
[Display(Name = "بهمن")] | ||
Bahman, | ||
[Display(Name = "اسفند")] | ||
Esfand | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Reflection; | ||
|
||
namespace PersianUIControlsMaui.Extensions; | ||
|
||
public static class EnumExtensions | ||
{ | ||
public static string GetDisplay(this Type type, int value) | ||
{ | ||
var enumItem = Enum.Parse(type, value.ToString()); | ||
var displayName = type.GetField(enumItem.ToString()).GetCustomAttribute<DisplayAttribute>().Name; | ||
return displayName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace PersianUIControlsMaui.Models; | ||
|
||
public class PuiTuple : Tuple<string, string> | ||
{ | ||
public PuiTuple(string key, string value) : base(key, value) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters