I want to write a program for VC. It does not work to forward the log to the form. I tried it differently already, but all the time I swear that Form1.richTextBox1.Text unavailable due to the level of protection. Here are the pieces of code, if necessary, I can throw it off completely:
Form1.cs
public static void log(string text) { richTextBox1.Text = text; } VkAuth.cs
string done = net.Get(String.Format("https://login.vk.com/?act=login&email={0}&pass={1}&lg_h={2}", login, pass, pars)).ToString(); int status = CheckAuth(done);//Запрос формируется заново? if (status == 1) // если всё успешно { Form1.log("Авторизация прошла успешно"); } if (status == 2) // если аккаунт заблокирован { Form1.log("Аккаунт заблокирован"); } if (status == 3) //Проверка валидности данных { Form1.log("Проверьте введенные данные"); }
log()method declared static? - rdorn