📄 vcalendar.cs
字号:
this.a.a(0x1f93L, "The specified path, file name, or both exceed the system defined maximum length", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (DirectoryNotFoundException exception27)
{
ProjectData.SetProjectError(exception27);
DirectoryNotFoundException exception11 = exception27;
this.a.a(0x1f94L, "The specified path for vCalendar file is invalid", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (FileNotFoundException exception28)
{
ProjectData.SetProjectError(exception28);
FileNotFoundException exception12 = exception28;
this.a.a(0x1f95L, "The specified vCalendar file [" + this.b + "] not found", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (IOException exception29)
{
ProjectData.SetProjectError(exception29);
IOException exception13 = exception29;
this.a.a(0x1f96L, "An I/O error occured while opening the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (UnauthorizedAccessException exception30)
{
ProjectData.SetProjectError(exception30);
UnauthorizedAccessException exception14 = exception30;
this.a.a(0x1f97L, "Permission denied to access the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (NotSupportedException exception31)
{
ProjectData.SetProjectError(exception31);
NotSupportedException exception15 = exception31;
this.a.a(0x1f98L, "The specified vCalendar file path is in an invalid format", "VCALENDAR");
ProjectData.ClearProjectError();
}
catch (SecurityException exception32)
{
ProjectData.SetProjectError(exception32);
SecurityException exception16 = exception32;
this.a.a(0x1f99L, "Insufficient permission to access the vCalendar file", "VCALENDAR");
ProjectData.ClearProjectError();
}
if (this.a.z > 0L)
{
return;
}
Label_0669:
if (str4.Replace("\r\n", "").Trim().Length > 0)
{
this.i = this.d.objQueue.b(this.c, str4, this.h, this.e, this.f);
}
else
{
this.a.a(0x1f9aL, "vCalendar file is empty", "VCALENDAR");
}
return;
Label_06D9:
this.a.a(0x1f9bL, "vCalendar file [" + this.b + "] not found", "VCALENDAR");
return;
Label_0706:
this.a.a(0x1f9cL, "Invalid vCalendar file name", "VCALENDAR");
}
catch (Exception exception33)
{
ProjectData.SetProjectError(exception33);
Exception exception17 = exception33;
this.d.r.b("[vCalendar:Send_Class:SendQ:1] " + exception17.Message);
ProjectData.ClearProjectError();
}
}
}
private class b
{
private f a;
private SMS b;
private DateTime c = new DateTime();
private DateTime d = new DateTime();
private string e = "0";
private string f = "";
private string g = "";
private string h = "";
private int i;
private string j = "";
private string k = "Powered by LogixMobile.com\r\r";
internal bool l = false;
internal int m;
internal string n = "";
private bool o = false;
internal string p = "";
internal b(ref SMS A_0, DateTime A_1, DateTime A_2, string A_3, string A_4, string A_5, string A_6, string A_7, int A_8, bool A_9)
{
this.b = A_0;
this.a = this.b.gm;
this.c = A_1;
this.d = A_2;
this.e = A_3;
this.f = A_4;
this.g = A_5;
this.h = A_6;
this.j = A_7;
this.i = A_8;
this.o = A_9;
}
private string a()
{
string str4 = "";
string str2 = "";
long num = 0L;
string str3 = "";
if (DateTime.Compare(this.c, DateTime.MinValue) == 0)
{
this.a.a(0x1f66L, "vCalendar event start date not defined", "VCALENDAR");
return "";
}
if (DateTime.Compare(this.d, DateTime.MinValue) == 0)
{
DateInterval minute;
if (this.e.Trim() == "0")
{
this.a.a(0x1f67L, "Both vCalendar event end date and duration not defined", "VCALENDAR");
return "";
}
if (this.e.Trim().Length < 2)
{
this.a.a(0x1f6aL, "Invalid vCalendar even duration", "VCALENDAR");
return "";
}
str2 = this.e.Trim().Substring(this.e.Trim().Length - 1, 1);
if (!(((Versioned.IsNumeric(this.e.Trim().Substring(0, this.e.Trim().Length - 1)) & !this.e.Contains(",")) & !this.e.Contains(".")) & (((str2.ToUpper() == "M") | (str2.ToUpper() == "H")) | (str2.ToUpper() == "D"))))
{
this.a.a(0x1f69L, "Invalid vCalendar event duration", "VCALENDAR");
return "";
}
num = Conversions.ToLong(this.e.Trim().Substring(0, this.e.Trim().Length - 1));
if (num <= 0L)
{
this.a.a(0x1f68L, "vCalendar event start and end date cannot be same", "VCALENDAR");
return "";
}
switch (str2.ToUpper())
{
case "M":
minute = DateInterval.Minute;
break;
case "H":
minute = DateInterval.Hour;
break;
case "D":
minute = DateInterval.Day;
break;
}
this.d = DateAndTime.DateAdd(minute, (double) num, this.c);
}
if (this.e.Trim() == "0")
{
long num2 = DateAndTime.DateDiff(DateInterval.Minute, this.c, this.d, FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1);
str3 = "M";
if ((num2 % 60L) == 0L)
{
num2 = (long) Math.Round((double) (((double) num2) / 60.0));
str3 = "H";
if ((num2 % 0x18L) == 0L)
{
num2 = (long) Math.Round((double) (((double) num2) / 24.0));
str3 = "D";
}
}
this.e = num2.ToString() + str3;
}
if ((this.f.Trim().Length == 0) & (this.g.Trim().Length == 0))
{
this.a.a(0x1f6bL, "Both vCalendar event description and summary are not defined", "VCALENDAR");
return "";
}
str4 = "BEGIN:VCALENDAR\r\nVERSION:1.0\r\nBEGIN:VEVENT";
if (this.f.Trim().Length > 0)
{
str4 = str4 + "\r\nDESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + this.a.k(this.f);
}
if (this.g.Trim().Length > 0)
{
str4 = str4 + "\r\nSUMMARY;ENCODING=QUOTED-PRINTABLE:" + this.a.k(this.g);
}
if (this.j.Trim().Length > 0)
{
str4 = str4 + "\r\nLOCATION;ENCODING=QUOTED-PRINTABLE:" + this.a.k(this.j);
}
return (((str4 + "\r\nDTSTART:" + this.a.a(this.c)) + "\r\nDTEND:" + this.a.a(this.d)) + "\r\nEND:VEVENT\r\nEND:VCALENDAR");
}
internal void b()
{
if (Monitor.TryEnter(this.a, this.a.@as))
{
string str = "";
bool flag = false;
string str2 = "";
this.l = false;
try
{
if (!this.a.af)
{
this.a.b.a(true);
}
if (this.a.ah == this.a.b9)
{
this.a.a(0x1f64L, this.a.l("odumu5VOg_:5-26cCP/GtqPa6g$"), "VCALENDAR");
this.l = false;
}
else if (this.h.Length <= 0)
{
this.a.a(0x1f57L, "Destination mobile number not defined", "VCALENDAR");
this.l = false;
}
else
{
if (this.a.ah == this.a.b8)
{
this.f = this.k + this.f;
this.g = this.k + this.g;
}
str = this.a();
if (str.Length <= 0)
{
this.l = false;
}
else
{
str2 = this.a.b(str, this.h, this.i, this.o);
if (str2.Trim().Length <= 0)
{
if ((this.a.b4 == 0L) && (this.a.z == 0L))
{
this.a.b4 = 0x1f65L;
this.a.b1 = "vCalendar send error";
}
if (this.a.b4 > 0L)
{
this.a.a(this.a.b4, this.a.b3, "VCALENDAR");
}
}
else
{
flag = true;
}
this.l = flag;
this.p = str2;
}
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.b.r.b("[vCalendar:Send_Class:Send:1] " + exception.Message);
ProjectData.ClearProjectError();
}
finally
{
Monitor.Exit(this.a);
}
}
else
{
this.a.a(0x2333L, "Thread monitor enter attempt timeout [vCalendar:Send_Class:Send:A]", "VCALENDAR");
this.l = false;
}
}
internal void c()
{
string str = "";
try
{
if (!this.a.af)
{
this.a.b.a(true);
}
if (this.a.ah == this.a.b9)
{
this.a.a(0x1f64L, this.a.l("odumu5VOg_:5-26cCP/GtqPa6g$"), "VCALENDAR");
}
else if (this.h.Length <= 0)
{
this.a.a(0x1f57L, "Destination mobile number not defined", "VCALENDAR");
}
else
{
if (this.a.ah == this.a.b8)
{
this.f = this.k + this.f;
this.g = this.k + this.g;
}
str = this.a();
if (str.Length > 0)
{
this.n = this.b.objQueue.b(this.h, str, this.m, this.i, this.o);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -