本文整理汇总了C#中Shadowsocks.Controller.ShadowsocksController.GetCurrentConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C# ShadowsocksController.GetCurrentConfiguration方法的具体用法?C# ShadowsocksController.GetCurrentConfiguration怎么用?C# ShadowsocksController.GetCurrentConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shadowsocks.Controller.ShadowsocksController
的用法示例。
在下文中一共展示了ShadowsocksController.GetCurrentConfiguration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ServerLogForm
public ServerLogForm(ShadowsocksController controller)
{
this.controller = controller;
this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon());
InitializeComponent();
this.Width = 760;
Configuration config = controller.GetCurrentConfiguration();
if (config.configs.Count < 8)
{
this.Height = 300;
}
else if (config.configs.Count < 20)
{
this.Height = 300 + (config.configs.Count - 8) * 16;
}
else
{
this.Height = 500;
}
UpdateTexts();
UpdateLog();
this.contextMenu1 = new ContextMenu(new MenuItem[] {
this.clearItem = CreateMenuItem("&Clear", new EventHandler(this.ClearItem_Click)),
});
ServerDataGrid.ContextMenu = contextMenu1;
controller.ConfigChanged += controller_ConfigChanged;
}
示例2: frmMain
public frmMain(ShadowsocksController sc)
{
InitializeComponent();
//初始化QQWry
var qqwryPath = Environment.CurrentDirectory + "\\qqwry.dat";
if (qqwry == null && File.Exists(qqwryPath)) qqwry = new QQWry(qqwryPath);
controller = sc;
#region i18N
if (System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag.ToLowerInvariant().StartsWith("zh"))
{
Text = "Ping测试";
dgvMain.Columns[0].HeaderText = "地址";
dgvMain.Columns[1].HeaderText = "IP地址";
dgvMain.Columns[2].HeaderText = "备注";
dgvMain.Columns[3].HeaderText = "物理地址";
dgvMain.Columns[4].HeaderText = "最大Ping值";
dgvMain.Columns[5].HeaderText = "最小Ping值";
dgvMain.Columns[6].HeaderText = "平均Ping值";
dgvMain.Columns[7].HeaderText = "失败次数";
dgvMain.Columns[8].HeaderText = "下行速度";
dgvMain.Columns[9].HeaderText = "测速";
tssStatusLabel.Text = "当前状态:";
tssStatus.Text = "准备就绪";
}
#endregion
LoadConfiguration(controller.GetCurrentConfiguration());
if (dgvMain.Rows.Count <= 5)
{
foreach (var row in dgvMain.Rows)
{
var t = new Thread(Ping) { IsBackground = true };
t.Start(row);
}
}
else
{
ChangeStatus("Busy...");
var t = new Thread(Go) { IsBackground = true };
t.Start(dgvMain.Rows);
}
}