shabgardetanha
پنج شنبه 18 آبان 1396, 11:26 صبح
public static string CheckMoshavere(string chatid)
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "";
}
}
public static void DeleteMoshavere(string chatid)
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Moshavere = Moshavere.Replace(chatid + ":" + b + ",", "");
}
catch
{
}
}
public static void AddMoshavere(string chatid, string text)
{
string a = CheckMoshavere(chatid);
DeleteMoshavere(chatid);
Moshavere += chatid + ":" + a + "\n" + text + ",";
}
public static void DeleteLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Location = Location.Replace(chatid + ":" + b + ",", "");
}
catch
{
}
}
public static void AddLocation(string chatid, string location)
{
DeleteLocation(chatid);
Location += chatid + ":" + location + ",";
}
public static string CheckLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "start";
}
}
ممنون میشم بگید اینها معنی شون چیه؟
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "";
}
}
public static void DeleteMoshavere(string chatid)
{
try
{
string a = Moshavere.Substring(Moshavere.IndexOf(chatid), Moshavere.Length - Moshavere.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Moshavere = Moshavere.Replace(chatid + ":" + b + ",", "");
}
catch
{
}
}
public static void AddMoshavere(string chatid, string text)
{
string a = CheckMoshavere(chatid);
DeleteMoshavere(chatid);
Moshavere += chatid + ":" + a + "\n" + text + ",";
}
public static void DeleteLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
Location = Location.Replace(chatid + ":" + b + ",", "");
}
catch
{
}
}
public static void AddLocation(string chatid, string location)
{
DeleteLocation(chatid);
Location += chatid + ":" + location + ",";
}
public static string CheckLocation(string chatid)
{
try
{
string a = Location.Substring(Location.IndexOf(chatid), Location.Length - Location.IndexOf(chatid));
string b = a.Substring(a.IndexOf(":") + 1, a.IndexOf(",") - a.IndexOf(":") - 1);
return b;
}
catch
{
return "start";
}
}
ممنون میشم بگید اینها معنی شون چیه؟