public frmNetworkInfo(BitChatNode node) { InitializeComponent(); _node = node; listView1.Items.Add("Local Peer ID").SubItems.Add("Loading..."); listView1.Items.Add("Local Port").SubItems.Add("Loading..."); listView1.Items.Add("IPv4 DHT Node ID").SubItems.Add("Loading..."); listView1.Items.Add("IPv4 DHT Nodes").SubItems.Add("Loading..."); listView1.Items.Add("IPv6 DHT Node ID").SubItems.Add("Loading..."); listView1.Items.Add("IPv6 DHT Nodes").SubItems.Add("Loading..."); listView1.Items.Add("IPv4 Internet Status").SubItems.Add("Loading..."); listView1.Items.Add("IPv6 Internet Status").SubItems.Add("Loading..."); listView1.Items.Add("UPnP Status").SubItems.Add("Loading..."); listView1.Items.Add("UPnP Device IP").SubItems.Add("Loading..."); listView1.Items.Add("UPnP External IP").SubItems.Add("Loading..."); listView1.Items.Add("Proxy Server").SubItems.Add("Loading..."); listView1.Items.Add("IPv4 External End Point").SubItems.Add("Loading..."); listView1.Items.Add("IPv6 External End Point").SubItems.Add("Loading..."); listView1.Items.Add("Tcp Relays").SubItems.Add("Loading..."); updateTimer_Tick(null, null); _updateTimer = new Timer(); _updateTimer.Interval = 2000; _updateTimer.Tick += updateTimer_Tick; _updateTimer.Start(); }
public frmShareFileSelection(BitChatNode node, SharedFile sharedFile) { InitializeComponent(); BitChat[] sharedChats = sharedFile.GetChatList(); foreach (BitChat chat in node.GetBitChatList()) { bool found = false; foreach (BitChat sharedChat in sharedChats) { if (sharedChat == chat) { found = true; break; } } if (!found) { checkedListBox1.Items.Add(chat); } } }
private void BitChatNode_InvalidCertificateDetected(BitChatNode node, InvalidCertificateException e) { MessageBox.Show(e.Message + "\r\n\r\nClick OK to logout from this Bit Chat profile.", "Invalid Certificate Detected", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Hide(); this.DialogResult = DialogResult.Ignore; this.Close(); }
private void BitChatNode_BitChatInvitationReceived(BitChatNode node, BitChat chat) { AddChatView(chat); if (lstChats.Controls.Count == 1) { lstChats.SelectItem(lstChats.GetFirstItem()); ShowSelectedChatView(); } }
public frmMain(BitChatProfile profile, string profileFilePath, string cmdLine) { InitializeComponent(); _profile = profile; _profileFilePath = profileFilePath; SecureChannelCryptoOptionFlags cryptoOptions; switch (Environment.OSVersion.Platform) { case PlatformID.Win32NT: if (Environment.OSVersion.Version.Major > 5) { cryptoOptions = SecureChannelCryptoOptionFlags.ECDHE256_RSA_WITH_AES256_CBC_HMAC_SHA256 | SecureChannelCryptoOptionFlags.DHE2048_RSA_WITH_AES256_CBC_HMAC_SHA256; } else { cryptoOptions = SecureChannelCryptoOptionFlags.DHE2048_RSA_WITH_AES256_CBC_HMAC_SHA256; } break; default: cryptoOptions = SecureChannelCryptoOptionFlags.DHE2048_RSA_WITH_AES256_CBC_HMAC_SHA256; break; } //start bitchat client _node = new BitChatNode(profile, Program.TRUSTED_CERTIFICATES, cryptoOptions); _node.InvalidCertificateDetected += BitChatNode_InvalidCertificateDetected; _node.BitChatInvitationReceived += BitChatNode_BitChatInvitationReceived; _node.Start(); }
public frmNetworkInfo(BitChatNode node) { InitializeComponent(); _node = node; }