public Proxy(Client client) { try { this.client = client; Initialize(); } catch (Exception e) { Logger.Log("Falha ao inciar o proxy. Erro: " + e.ToString(), LogType.FATAL); } }
private void uxChoose_Click(object sender, RoutedEventArgs e) { if (this.uxClients.SelectedItem is Client) this.SelectedClient = (Client)uxClients.SelectedItem; else { if (this.uxClients.Items.Count > 1) this.SelectedClient = Client.OpenMC(); else this.SelectedClient = Client.Open(); } this.Close(); }
internal InputHelper(Client client) { this.client = client; }
internal WindowHelper(Client client) { this.client = client; }
internal LoginHelper(Client client) { this.client = client; }
/// <summary> /// Get a list of all the open clients of certain version. Class method. /// </summary> /// <returns></returns> public static List<Client> GetClients(string version, bool offline) { List<Client> clients = new List<Client>(); Client client = null; foreach (Process process in Process.GetProcesses()) { StringBuilder classname = new StringBuilder(); Util.WinApi.GetClassName(process.MainWindowHandle, classname, 12); if (classname.ToString().Equals("TibiaClient", StringComparison.CurrentCultureIgnoreCase)) { if (version == null) { client = new Client(process); if (!offline || !client.LoggedIn) clients.Add(client); } else if (process.MainModule.FileVersionInfo.FileVersion == version) { clients.Add(new Client(process)); if (!offline || !client.LoggedIn) clients.Add(client); } } } return clients; }