📄 message.cs
字号:
namespace mCore
{
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Threading;
using System.Windows.Forms;
public class Message : IMessage
{
private string a = "";
private string b = "";
private DateTime c;
private string d = "";
private string e = "";
private int f;
private int g = 0;
private f h;
private bool i = false;
private const int j = 1;
internal Message(ref f A_0, int A_1, string A_2, string A_3, DateTime A_4, string A_5, int A_6, string A_7)
{
this.h = A_0;
this.f = A_1;
this.a = A_2;
this.b = A_3;
this.c = A_4;
this.d = A_5;
this.g = A_6;
this.e = A_7;
}
private void a()
{
if (Monitor.TryEnter(this.h, this.h.@as))
{
string str = "";
try
{
this.h.av();
Collection cn = this.h.cn;
Collection co = this.h.co;
this.i = false;
str = "";
if ((this.h.ae <= 0) | (this.h.ae > this.h.co.Count))
{
this.h.a(0x1773L, "Invalid message item index", "SMSDELETE");
}
else
{
bool flag;
mCore.Message message = (mCore.Message) co[this.h.ae.ToString()];
int index = message.Index;
int count = cn.Count;
for (int j = 1; j <= count; j++)
{
i i = (i) cn[j];
if (i.b == index)
{
if (str == "")
{
str = i.a.ToString();
}
else
{
str = str + "," + i.a.ToString();
}
}
}
if (str.Length > 0)
{
flag = this.h.a(index, str);
}
else
{
this.h.bw = 0x1774L;
this.h.bv = "Cannot find the requested message for deletion";
flag = false;
}
if (flag)
{
this.i = true;
}
else
{
this.i = false;
if (this.h.bw == 0L)
{
this.h.bw = 0x1775L;
this.h.bv = "Delete message error";
}
if (this.h.bw != 0L)
{
this.h.a(this.h.bw, this.h.bv, "SMSDELETE");
}
}
if (this.h.cm)
{
this.h.ao();
}
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.h.a.b("[Message:Delete_Method:1] " + exception.Message);
ProjectData.ClearProjectError();
}
finally
{
Monitor.Exit(this.h);
}
}
else
{
this.i = false;
this.h.a(0x2333L, "Thread monitor enter attempt timeout [Message:Delete_Method:A]", "SMSDELETE");
}
}
public bool Delete()
{
Thread thread = new Thread(new ThreadStart(this.a));
thread.Name = "DeleteMethodThread";
thread.Start();
while (thread.IsAlive)
{
Thread.Sleep(1);
Application.DoEvents();
}
return this.i;
}
public int Index
{
get
{
return this.f;
}
}
public int mCore.IMessage.Index
{
get
{
return this.f;
}
}
public string mCore.IMessage.Phone
{
get
{
return this.a;
}
}
public string mCore.IMessage.SMSC
{
get
{
return this.e;
}
}
public string mCore.IMessage.Text
{
get
{
return this.b;
}
}
public DateTime mCore.IMessage.TimeStamp
{
get
{
return this.c;
}
}
public string mCore.IMessage.TimeStampRFC
{
get
{
return this.d;
}
}
public int mCore.IMessage.TimeZone
{
get
{
return this.g;
}
}
public string Phone
{
get
{
return this.a;
}
}
public string SMSC
{
get
{
return this.e;
}
}
public string Text
{
get
{
return this.b;
}
}
public DateTime TimeStamp
{
get
{
return this.c;
}
}
public string TimeStampRFC
{
get
{
return this.d;
}
}
public int TimeZone
{
get
{
return this.g;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -