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


C# ShadowsocksController.GetConfigurationCopy方法代碼示例

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


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

示例1: 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.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.GetConfigurationCopy());

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

示例2: LogForm

        public LogForm(ShadowsocksController controller, string filename)
        {
            this.controller = controller;
            this.filename = filename;
            InitializeComponent();
            Icon = Icon.FromHandle(Resources.ssw128.GetHicon());

            LogViewerConfig config = controller.GetConfigurationCopy().logViewer;
            if (config == null)
            {
                config = new LogViewerConfig();
            }
            else
            {
                topMostTrigger = config.topMost;
                wrapTextTrigger = config.wrapText;
                toolbarTrigger = config.toolbarShown;
                LogMessageTextBox.BackColor = config.GetBackgroundColor();
                LogMessageTextBox.ForeColor = config.GetTextColor();
                LogMessageTextBox.Font = config.GetFont();
            }

            controller.TrafficChanged += controller_TrafficChanged;

            UpdateTexts();
        }
開發者ID:txrtanzi,項目名稱:shadowsocks-windows,代碼行數:26,代碼來源:LogForm.cs

示例3: MenuViewController

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

            LoadMenu();

            controller.ConfigChanged += controller_ConfigChanged;
            controller.ShareOverLANStatusChanged += controller_ShareOverLANStatusChanged;
            controller.Errored += controller_Errored;

            _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.GetConfigurationCopy());

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

示例4: ServerCrawler

        public ServerCrawler(ShadowsocksController controller)
        {
            this.controller = controller;
            configuration = controller.GetConfigurationCopy();

            this.serverList = new List<Server>();
            foreach (var server in configuration.configs)
            {
                if (server.remarks == CRAWLER_REMARKS)
                {
                    this.serverList.Add(server);
                }
            }
        }
開發者ID:nladuo,項目名稱:AutoShadowsocks,代碼行數:14,代碼來源:ServerCrawler.cs

示例5: 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.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.BalloonTipClicked += notifyIcon1_BalloonTipClicked;
            _notifyIcon.MouseClick += notifyIcon1_Click;
            _notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick;
            _notifyIcon.BalloonTipClosed += _notifyIcon_BalloonTipClosed;

            this.updateChecker = new UpdateChecker();
            updateChecker.CheckUpdateCompleted += updateChecker_CheckUpdateCompleted;

            LoadCurrentConfiguration();

            Configuration config = controller.GetConfigurationCopy();

            if (config.autoCheckUpdate)
            {
                _isStartupChecking = true;
                updateChecker.CheckUpdate(config, 3000);
            }

            if (config.isDefault)
            {
                _isFirstRun = true;
                ShowConfigForm();
            }
        }
開發者ID:sammy2012,項目名稱:shadowsocks-windows,代碼行數:44,代碼來源:MenuViewController.cs


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