本文整理汇总了C#中Peer.start方法的典型用法代码示例。如果您正苦于以下问题:C# Peer.start方法的具体用法?C# Peer.start怎么用?C# Peer.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Peer
的用法示例。
在下文中一共展示了Peer.start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: startPeer
private Peer startPeer(String overlay, Boolean isGateway)
{
int port = Int32.Parse(portBox.Text);
bool client = radioClient.IsChecked.Value;
bool bootstrap = bootstrapBox.IsChecked.Value;
bool webServer = webserverActiveBox.IsChecked.Value;
if (webServer == true)
webserverActiveBox.IsChecked = false;
Peer newPeer = new Peer(port, isGateway, client, bootstrap, webServer, overlay);
peerList.Add(newPeer);
TabItem tabView = new TabItem();
RichTextBox textView = new RichTextBox();
textView.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
textView.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
textView.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
// use find button
//textView.TextChanged += new TextChangedEventHandler(LogTextChanged);
tabView.Header = "Joining...";
tabView.Content = textView;
tabView.MouseRightButtonDown += new MouseButtonEventHandler(tabview_context);
tabControl.Items.Add(tabView);
tabControl.SelectedItem = tabView;
newPeer.logTab = tabView;
newPeer.TabID = IDcounter;
//newPeer.OverlayName = OverlayName;
//newPeer.storedDataTree = storedDataTree;
newPeer.window = this;
IDcounter++;
if (autoIncBox.IsChecked == true)
{
portBox.Text = (UInt32.Parse(portBox.Text) + 1).ToString();
}
newPeer.start();
return newPeer;
}