Exemplo n.º 1
0
        private void SetServerDetailsToUI(Server server)
        {
            IPTextBox.Text                = server.server;
            ServerPortTextBox.Text        = server.server_port.ToString();
            PasswordTextBox.Text          = server.password;
            EncryptionSelect.SelectedItem = EncryptorFactory.GetCipherInfo(server.method ?? Server.DefaultMethod);
            PluginTextBox.Text            = server.plugin;
            PluginOptionsTextBox.Text     = server.plugin_opts;
            PluginArgumentsTextBox.Text   = server.plugin_args;

            bool showPluginArgInput = !string.IsNullOrEmpty(server.plugin_args);

            NeedPluginArgCheckBox.Checked = showPluginArgInput;
            ShowHidePluginArgInput(showPluginArgInput);

            RemarksTextBox.Text = server.remarks;
            TimeoutTextBox.Text = server.timeout.ToString();

            GroupTextBox.Text = server.group;

            isChange = false;
        }