static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form1 form = new Form1(); Vkontakte VK = new Vkontakte(); Presenter presenter = new Presenter(form, VK); Application.Run(form); }
public Presenter(IUserInterface UI, Vkontakte VK) { _UI = UI; _VK = VK; _UI.TextRequested += (sender, e) => { try { _VK.GetEnter(_UI.Login, _UI.Password); _UI.SongsText = _VK.GetAudio(); _UI.SongsCount = _VK.SongsCount; } catch (Exception ex) { Console.WriteLine(ex.Message); } }; }