Beispiel #1
0
 private void LoadCurrentConfiguration()
 {
     _modifiedConfiguration = controller.GetConfiguration();
     LoadConfiguration(_modifiedConfiguration);
     _oldSelectedIndex            = _modifiedConfiguration.index;
     ServersListBox.SelectedIndex = _modifiedConfiguration.index;
     LoadSelectedServer();
 }
        public SSForwardView(ForwarderController controller)
        {
            _controller = controller;
            LoadMenu();

            _controller.EnableStatusChanged += _controller_EnableStatusChanged;
            _controller.ConfigChanged       += _controller_ConfigChanged;
            _controller.Errored             += _controller_Errored;

            _notifyIcon = new NotifyIcon();
            UpdateTrayIcon();
            _notifyIcon.Visible     = true;
            _notifyIcon.ContextMenu = _contextMenu;

            LoadCurrentConfiguration();
            if (controller.GetConfiguration().isDefault)
            {
                _isFirstRun = true;
                ShowConfigForm();
            }
        }
 private void _controller_EnableStatusChanged(object sender, EventArgs e)
 {
     _enableItem.Checked = _controller.GetConfiguration().enabled;
 }