1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00
Files
MeshAgent/webrtc/C# Sample/StunSettingsForm.cs
2017-10-12 14:28:03 -07:00

48 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WebRTC_Sample
{
public partial class StunSettingsForm : Form
{
public StunSettingsForm()
{
InitializeComponent();
}
public Boolean StunServersInUse
{
get { return stunCheckBox.Checked; }
set { stunTextBox.Enabled = stunCheckBox.Checked = value; }
}
public String[] StunServers
{
get { return stunTextBox.Text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); }
set { stunTextBox.Text = string.Join("\r\n", value); }
}
private void okButton_Click(object sender, EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void cancelButton_Click(object sender, EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.Cancel;
}
private void stunCheckBox_CheckedChanged(object sender, EventArgs e)
{
stunTextBox.Enabled = stunCheckBox.Checked;
}
}
}