當前位置: 首頁>>代碼示例>>C#>>正文


C# ShadowsocksController.GetConfiguration方法代碼示例

本文整理匯總了C#中Shadowsocks.Controller.ShadowsocksController.GetConfiguration方法的典型用法代碼示例。如果您正苦於以下問題:C# ShadowsocksController.GetConfiguration方法的具體用法?C# ShadowsocksController.GetConfiguration怎麽用?C# ShadowsocksController.GetConfiguration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Shadowsocks.Controller.ShadowsocksController的用法示例。


在下文中一共展示了ShadowsocksController.GetConfiguration方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MenuViewController

        public MenuViewController(ShadowsocksController controller)
        {
            this.controller = controller;

            LoadMenu();

            controller.EnableStatusChanged += controller_EnableStatusChanged;
            controller.ConfigChanged += controller_ConfigChanged;
            controller.PACFileReadyToOpen += controller_PACFileReadyToOpen;
            controller.ShareOverLANStatusChanged += controller_ShareOverLANStatusChanged;
            controller.EnableGlobalChanged += controller_EnableGlobalChanged;
            controller.Errored += controller_Errored;
            controller.UpdatePACFromGFWListCompleted += controller_UpdatePACFromGFWListCompleted;
            controller.UpdatePACFromGFWListError += controller_UpdatePACFromGFWListError;

            _notifyIcon = new NotifyIcon();
            UpdateTrayIcon();
            _notifyIcon.Visible = true;
            _notifyIcon.ContextMenu = contextMenu1;
            _notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;

            this.updateChecker = new UpdateChecker();
            updateChecker.NewVersionFound += updateChecker_NewVersionFound;

            LoadCurrentConfiguration();

            updateChecker.CheckUpdate(controller.GetConfiguration());

            if (controller.GetConfiguration().isDefault)
            {
                _isFirstRun = true;
                ShowConfigForm();
            }
        }
開發者ID:WinterXMQ,項目名稱:shadowsocks-csharp,代碼行數:34,代碼來源:MenuViewController.cs

示例2: MenuViewController

        public MenuViewController(ShadowsocksController controller)
        {
            LoadMenu();
            LoadTrayIcon();

            this.controller = controller;
            controller.EnableStatusChanged += controller_EnableStatusChanged;
            controller.ConfigChanged += controller_ConfigChanged;
            controller.PACFileReadyToOpen += controller_PACFileReadyToOpen;
            controller.ShareOverLANStatusChanged += controller_ShareOverLANStatusChanged;
            controller.EnableGlobalChanged += controller_EnableGlobalChanged;
            controller.Errored += controller_Errored;

            this.updateChecker = new UpdateChecker();
            updateChecker.NewVersionFound += updateChecker_NewVersionFound;

            LoadCurrentConfiguration();

            updateChecker.CheckUpdate();

            if (controller.GetConfiguration().isDefault)
            {
                _isFirstRun = true;
                ShowConfigForm();
            }
        }
開發者ID:wushukai,項目名稱:shadowsocks-csharp,代碼行數:26,代碼來源:MenuViewController.cs

示例3: PingForm

        public PingForm(ShadowsocksController sc)
        {
            InitializeComponent();

            var qqwryPath = Environment.CurrentDirectory + "\\qqwry.dat";
            if (Util.Utils.qqwry == null && File.Exists(qqwryPath)) Util.Utils.qqwry = new QQWry(qqwryPath);

            controller = sc;

            Font = Util.Utils.GetFont();

            PerformLayout();

            UpdateTexts();

            Icon = Icon.FromHandle(Resources.ssw128.GetHicon());

            LoadConfiguration(controller.GetConfiguration());

            if (dgvMain.Rows.Count <= 5)
            {
                foreach (var row in dgvMain.Rows)
                {
                    var t = new Thread(Ping) { IsBackground = true };
                    t.Start(row);
                }
            }
            else
            {
                ChangeStatus(I18N.GetString("DoSomething"));
                var t = new Thread(Go) { IsBackground = true };
                t.Start(dgvMain.Rows);
            }
        }
開發者ID:jackton,項目名稱:shadowsocks-csharp-withping,代碼行數:34,代碼來源:PingForm.cs

示例4: MenuViewController

        public MenuViewController(ShadowsocksController controller)
        {
            this.controller = controller;

            LoadMenu();

            controller.EnableStatusChanged += controller_EnableStatusChanged;
            controller.ConfigChanged += controller_ConfigChanged;
            controller.PACFileReadyToOpen += controller_FileReadyToOpen;
            controller.UserRuleFileReadyToOpen += controller_FileReadyToOpen;
            controller.ShareOverLANStatusChanged += controller_ShareOverLANStatusChanged;
            controller.SelectRandomStatusChanged += controller_SelectRandomStatusChanged;
            controller.EnableGlobalChanged += controller_EnableGlobalChanged;
            controller.Errored += controller_Errored;
            controller.UpdatePACFromGFWListCompleted += controller_UpdatePACFromGFWListCompleted;
            controller.UpdatePACFromGFWListError += controller_UpdatePACFromGFWListError;
            controller.ShowConfigFormEvent += Config_Click;

            _notifyIcon = new NotifyIcon();
            UpdateTrayIcon();
            _notifyIcon.Visible = true;
            _notifyIcon.ContextMenu = contextMenu1;
            _notifyIcon.MouseClick += notifyIcon1_Click;
            _notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;

            this.updateChecker = new UpdateChecker();
            updateChecker.NewVersionFound += updateChecker_NewVersionFound;

            LoadCurrentConfiguration();

            if (controller.GetConfiguration().isDefault)
            {
                _isFirstRun = true;
                ShowConfigForm();
            }

            //timerDelayCheckUpdate = new System.Timers.Timer(1000 * 10.0);
            //timerDelayCheckUpdate.Elapsed += timer_Elapsed;
            //timerDelayCheckUpdate.Start();
        }
開發者ID:hitrust,項目名稱:shadowsocks-csharp,代碼行數:40,代碼來源:MenuViewController.cs


注:本文中的Shadowsocks.Controller.ShadowsocksController.GetConfiguration方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。