⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcalendar.cs

📁 老外Logix Mobile mCoreLib短信控件源码 通过串口或者手机数据线进行连接,可对手机进行 读写操作.
💻 CS
📖 第 1 页 / 共 5 页
字号:
                                                str = strArray2[i];
                                            }
                                        }
                                        else
                                        {
                                            str = strArray2[i];
                                        }
                                        str4 = str4 + str + "\r\n";
                                    }
                                    goto Label_0696;
                                }
                                this.a.a(0x1f9aL, "vCalendar file is empty", "VCALENDAR");
                            }
                            return;
                        }
                        try
                        {
                            str4 = File.ReadAllText(this.b);
                        }
                        catch (ArgumentException exception25)
                        {
                            ProjectData.SetProjectError(exception25);
                            ArgumentException exception9 = exception25;
                            this.a.a(0x1f92L, "Invalid vCalendar file name", "VCALENDAR");
                            ProjectData.ClearProjectError();
                        }
                        catch (PathTooLongException exception26)
                        {
                            ProjectData.SetProjectError(exception26);
                            PathTooLongException exception10 = exception26;
                            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_0696:
                        if (str4.Replace("\r\n", "").Trim().Length > 0)
                        {
                            this.j = this.a.b(str4, this.c, this.e, this.f);
                            goto Label_074B;
                        }
                        this.a.a(0x1f9aL, "vCalendar file is empty", "VCALENDAR");
                        return;
                    Label_06FB:
                        this.a.a(0x1f9bL, "vCalendar file [" + this.b + "] not found", "VCALENDAR");
                        return;
                    Label_072B:
                        this.a.a(0x1f9cL, "Invalid vCalendar file name", "VCALENDAR");
                        return;
                    Label_074B:
                        if (this.j.Trim().Length <= 0)
                        {
                            if ((this.a.b4 == 0L) && (this.a.z == 0L))
                            {
                                this.a.b4 = 0x1f9eL;
                                this.a.b1 = "vCalendar file send error";
                            }
                            if (this.a.b4 > 0L)
                            {
                                this.a.a(this.a.b4, this.a.b3, "VCALENDAR");
                            }
                        }
                        else
                        {
                            this.g = true;
                        }
                    }
                    catch (Exception exception33)
                    {
                        ProjectData.SetProjectError(exception33);
                        Exception exception17 = exception33;
                        this.d.r.b("[vCalendar:Send_Class:Send:1] " + exception17.Message);
                        ProjectData.ClearProjectError();
                    }
                    finally
                    {
                        Monitor.Exit(this.a);
                    }
                }
                else
                {
                    this.a.a(0x2333L, "Thread monitor enter attempt timeout [vCalendar:SendFile_Class:Send:A]", "VCALENDAR");
                    this.g = false;
                }
            }

            internal void b()
            {
                bool flag = false;
                string str = "";
                string str2 = "";
                string str3 = "";
                string str4 = "";
                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_0706;
                    }
                    if (!File.Exists(this.b))
                    {
                        goto Label_06D9;
                    }
                    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
                                        {
                                            str = strArray2[i];
                                        }
                                    }
                                    else
                                    {
                                        str = strArray2[i];
                                    }
                                    str4 = str4 + str + "\r\n";
                                }
                                goto Label_0669;
                            }
                            this.a.a(0x1f9aL, "vCalendar file is empty", "VCALENDAR");
                        }
                        return;
                    }
                    try
                    {
                        str4 = File.ReadAllText(this.b);
                    }
                    catch (ArgumentException exception25)
                    {
                        ProjectData.SetProjectError(exception25);
                        ArgumentException exception9 = exception25;
                        this.a.a(0x1f92L, "Invalid vCalendar file name", "VCALENDAR");
                        ProjectData.ClearProjectError();
                    }
                    catch (PathTooLongException exception26)
                    {
                        ProjectData.SetProjectError(exception26);
                        PathTooLongException exception10 = exception26;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -