Customizing Settings Screen Fields

Hide fields in the Settings screen or change their default values.

  1. In Visual Studio, open the CustomizationHelper class in the CustomCode folder.
  2. Override the DefaultServerSettings method.
  3. Initialize the default server settings and return them outside of the DefaultServerSettings method.
  4. For each field you want to remove from the Settings screen, set its value to value to null.
    In this example, the server name field is visible but no default value is assigned; the server port is set to 5001 but the field is hidden:
    public override ServerSettings DefaultServerSettings
    {
      get
      {
        if (m_ServerSettings == null)
        { 
           m_ServerSettings = new ServerSettings();
    
           // Server name will be shown and initialized as empty.
           m_ServerSettings.ServerName.IsVisible = true;
           m_ServerSettings.ServerName.HasValue = false;
    
           // Server port will NOT be shown and initialized as 5001.
           m_ServerSettings.ServerPort.IsVisible = false;
           m_ServerSettings.ServerPort.HasValue = true;
           m_ServerSettings.ServerPort.Value = 5001;
    
           // Other fields will be shown.
        }
        return m_ServerSettings;
      }
    }
    private ServerSettings m_ServerSettings;
    
    Notes:
    • By default, all fields are shown.
    • To hide a field, set its IsVisible property to "false".
    • To change a field's initial value, set HasValue to "true", and specify a value in the Value property.