📄 vcalendar.cs
字号:
this.g = "";
this.i.a(0x1f63L, "Invalid characters in event location name", "VCALENDAR");
}
this.a();
}
}
public DateTime mCore.IvCalendar.StartDateTime
{
get
{
this.i.av();
return this.a;
}
set
{
this.i.av();
if ((DateTime.Compare(value, DateTime.MinValue) != 0) & Information.IsDate(value))
{
if (DateTime.Compare(this.b, DateTime.MinValue) != 0)
{
if (DateAndTime.DateDiff(DateInterval.Minute, this.a, this.b, FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1) > 0L)
{
this.a = value;
}
else
{
this.a = new DateTime();
this.i.a(0x1f5cL, "Event start date time cannot be greater than end date time", "VCALENDAR");
}
}
else
{
this.a = value;
}
}
else
{
this.a = new DateTime();
this.i.a(0x1f5dL, "Invalid event start date time", "VCALENDAR");
}
this.b();
this.a();
}
}
public string mCore.IvCalendar.Summary
{
get
{
this.i.av();
return this.e;
}
set
{
if (value == null)
{
value = "";
}
this.e = value.Trim();
if ((value.Trim().Length > 0) & !this.i.h(value))
{
this.e = "";
this.i.a(0x1f62L, "Invalid characters in event summary", "VCALENDAR");
}
this.a();
}
}
public DateTime StartDateTime
{
get
{
this.i.av();
return this.a;
}
set
{
this.i.av();
if ((DateTime.Compare(value, DateTime.MinValue) != 0) & Information.IsDate(value))
{
if (DateTime.Compare(this.b, DateTime.MinValue) != 0)
{
if (DateAndTime.DateDiff(DateInterval.Minute, this.a, this.b, FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1) > 0L)
{
this.a = value;
}
else
{
this.a = new DateTime();
this.i.a(0x1f5cL, "Event start date time cannot be greater than end date time", "VCALENDAR");
}
}
else
{
this.a = value;
}
}
else
{
this.a = new DateTime();
this.i.a(0x1f5dL, "Invalid event start date time", "VCALENDAR");
}
this.b();
this.a();
}
}
public string Summary
{
get
{
this.i.av();
return this.e;
}
set
{
if (value == null)
{
value = "";
}
this.e = value.Trim();
if ((value.Trim().Length > 0) & !this.i.h(value))
{
this.e = "";
this.i.a(0x1f62L, "Invalid characters in event summary", "VCALENDAR");
}
this.a();
}
}
private class a
{
private f a;
private string b = "";
private string c = "";
private SMS d;
private int e;
private bool f = false;
internal bool g = false;
internal int h;
internal string i = "";
internal string j = "";
private string k;
internal a(ref SMS A_0, string A_1, string A_2, int A_3, bool A_4)
{
this.k = this.a.l("\x0012uL$\x0012T&\x0003H3\x0006K4[\v\"\x000f!O#R!\x0012\x0003xN%#");
this.d = A_0;
this.a = this.d.gm;
this.b = A_1;
this.c = A_2;
this.e = A_3;
this.f = A_4;
}
internal void a()
{
if (Monitor.TryEnter(this.a, this.a.@as))
{
bool flag = false;
string str = "";
string str2 = "";
string str3 = "";
string str4 = "";
this.g = false;
this.j = "";
try
{
if (this.c.Length <= 0)
{
this.a.a(0x1f57L, "Destination mobile number not defined", "VCALENDAR");
return;
}
if (!((this.b.Length > 0) & this.b.ToUpper().EndsWith(".VCS")))
{
goto Label_072B;
}
if (!File.Exists(this.b))
{
goto Label_06FB;
}
if (string.Compare(this.a.ah, this.a.b8, true) == 0)
{
string[] strArray2;
try
{
strArray2 = File.ReadAllLines(this.b);
}
catch (ArgumentException exception1)
{
ProjectData.SetProjectError(exception1);
ArgumentException exception = exception1;
this.a.a(0x1f92L, "Invalid vCalendar file name", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (PathTooLongException exception18)
{
ProjectData.SetProjectError(exception18);
PathTooLongException exception2 = exception18;
this.a.a(0x1f93L, "The specified path, file name, or both exceed the system defined maximum length", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (DirectoryNotFoundException exception19)
{
ProjectData.SetProjectError(exception19);
DirectoryNotFoundException exception3 = exception19;
this.a.a(0x1f94L, "The specified path for vCalendar file is invalid", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (FileNotFoundException exception20)
{
ProjectData.SetProjectError(exception20);
FileNotFoundException exception4 = exception20;
this.a.a(0x1f95L, "The specified vCalendar file [" + this.b + "] not found", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (IOException exception21)
{
ProjectData.SetProjectError(exception21);
IOException exception5 = exception21;
this.a.a(0x1f96L, "An I/O error occured while opening the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (UnauthorizedAccessException exception22)
{
ProjectData.SetProjectError(exception22);
UnauthorizedAccessException exception6 = exception22;
this.a.a(0x1f97L, "Permission denied to access the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (NotSupportedException exception23)
{
ProjectData.SetProjectError(exception23);
NotSupportedException exception7 = exception23;
this.a.a(0x1f98L, "The specified vCalendar file path is in an invalid format", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (SecurityException exception24)
{
ProjectData.SetProjectError(exception24);
SecurityException exception8 = exception24;
this.a.a(0x1f99L, "Insufficient permission to access the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
if (this.a.z <= 0L)
{
if (strArray2.GetUpperBound(0) > 0)
{
int upperBound = strArray2.GetUpperBound(0);
for (int i = 0; i <= upperBound; i++)
{
str = "";
str2 = "";
str3 = "";
if (strArray2[i].Length > 0)
{
if (strArray2[i].Contains(":"))
{
string[] strArray = strArray2[i].Split(":".ToCharArray());
str2 = strArray[0];
int num4 = strArray.GetUpperBound(0);
for (int j = 1; j <= num4; j++)
{
if (j > 1)
{
str3 = str3 + ":";
}
str3 = str3 + strArray[j];
}
}
if (strArray2[i].ToUpper().Contains("ENCODING=QUOTED-PRINTABLE"))
{
str3 = str3.Replace("=0D", "\r").Replace("=0A", "\n");
flag = true;
if (str3.EndsWith("="))
{
str3 = Strings.Left(str3, str3.Length - 1);
flag = false;
}
while (!flag)
{
i++;
str3 = str3 + strArray2[i].Replace("=0D", "\r").Replace("=0A", "\n");
if (str3.EndsWith("="))
{
str3 = Strings.Left(str3, str3.Length - 1);
flag = false;
}
else
{
flag = true;
}
}
if (((str2.ToUpper().StartsWith("DESCRIPTION;") | str2.ToUpper().StartsWith("DESCRIPTION:")) | str2.ToUpper().StartsWith("SUMMARY;")) | str2.ToUpper().StartsWith("SUMMARY:"))
{
str = str2 + ":" + this.a.k(this.k + str3);
}
else
{
str = str2 + ":" + this.a.k(str3);
}
}
else if (((str2.ToUpper().StartsWith("DESCRIPTION;") | str2.ToUpper().StartsWith("DESCRIPTION:")) | str2.ToUpper().StartsWith("SUMMARY;")) | str2.ToUpper().StartsWith("SUMMARY:"))
{
str = str2 + ";ENCODING=QUOTED-PRINTABLE:" + this.a.k(str3);
}
else
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -