public frmChatProperties(BitChat chat) { InitializeComponent(); _chat = chat; if (_chat.NetworkType == BitChatClient.Network.BitChatNetworkType.PrivateChat) { label1.Text = "Peer's Email Address"; txtNetwork.Text = chat.PeerEmailAddress.Address; } else { txtNetwork.Text = chat.NetworkName; } foreach (TrackerClient tracker in _chat.GetTrackers()) { ListViewItem item = lstTrackerInfo.Items.Add(tracker.TrackerUri.AbsoluteUri); item.Tag = tracker; item.SubItems.Add(""); item.SubItems.Add(""); item.SubItems.Add(""); } _timer = new Timer(); _timer.Interval = 1000; _timer.Tick += _timer_Tick; _timer.Start(); }
public frmChatProperties(BitChat chat, BitChatProfile profile) { InitializeComponent(); _chat = chat; _profile = profile; this.Text = _chat.NetworkDisplayName + " - Properties"; chkLANChat.Checked = !_chat.EnableTracking; chkLANChat.CheckedChanged += chkLANChat_CheckedChanged; txtNetwork.Text = chat.NetworkName; if (chat.NetworkName == null) { txtSecret.ReadOnly = true; } txtSecret.Text = _chat.SharedSecret; if (_chat.NetworkType == BitChatCore.Network.BitChatNetworkType.PrivateChat) { label1.Text = "Peer's Email Address"; } ListViewItem dhtItem = lstTrackerInfo.Items.Add("DHT"); dhtItem.SubItems.Add(""); dhtItem.SubItems.Add(""); dhtItem.SubItems.Add(""); foreach (TrackerClient tracker in _chat.GetTrackers()) { ListViewItem item = lstTrackerInfo.Items.Add(tracker.TrackerUri.AbsoluteUri); item.Tag = tracker; item.SubItems.Add(""); item.SubItems.Add(""); item.SubItems.Add(""); } _timer = new Timer(); _timer.Interval = 1000; _timer.Tick += timer_Tick; _timer.Start(); }