The main Configuration class for your RedCritter App. Every RedCritter App must have only one instance of this class at most.

Namespace:  RedCritterV1
Assembly:  RedCritterV1 (in RedCritterV1.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
public class ConfigurationDialog : UserControl
Public Class ConfigurationDialog _
	Inherits UserControl

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
AppID
The AppID of the current App.
BaseURL
The Base URL for the current RedCritter server.
GetProxyURI(String)
Generates a proxy URL given a destination URL. This is useful for accessing cross-domain URI based resources such as REST services or Images (GET method only). The returned proxy url eliminates CrossDomain.xml and ClientAccessPolicy.xml security restrictions.
GetRestProxyURI(String, ConfigurationDialog..::.HttpMethod, String, String, SettingCollection, SettingCollection)
Generates a REST Proxy URI for use in accessing REST resources while bypassing Cross Domain restrictions
IsHTTPS()()()
Determines if the user is connected via HTTPS or HTTP
IsStagingVersion
Will be true if this is a staging assembly, false if in production.
LogException(String, Exception)
Call this method to log errors to your App's Error page.
LogException(String, String, String)
Call this method to log errors to your App's Error page.
OnBeforeSave(Boolean%)
Called before the settings are saved and the dialog is closed. Allows opportunity to validate and cancel the save if necessary.
OnSettingsLoaded(Boolean)
Notify the Configuration Dialog that the Settings have been loaded and are available through the GetSetting() method.
UserChannelAppID
The UserChannelAppID for this combination of User and App.
UserID
The UserID of the current, authenticated User.

Examples

CopyC#
using RedCritterV1;

namespace TestSilverlightApplication1
{
    // <summary>
    // Example of a configuration dialog that loads and saves a setting called 'symbols'
    // </summary>
    public partial class MyConfigurationDialog : ConfigurationDialog
    {

        public MyConfigurationDialog()
        {
            InitializeComponent();
        }

        public override void OnSettingsLoaded(bool success)
        {
            if (success)
            {
                //Fill in the UI with the values retrieved from the server...
                tSymbols.Text = this.GetSetting("symbols","");
            }
            else
            {
                //Log exceptions remotely
                this.LogException("Configuration", "Settings", "Error retrieving settings");
            }
        }

        public override void OnBeforeSave(ref bool cancel)
        {
            //Perform validation if needed
            //Cancel the save event if desired by setting cancel to true

            //Set setting values - the Configuration Dialog class will automatically save these to the server.
            this.SetSetting("symbols", tSymbols.Text);

        }

    }
}

Inheritance Hierarchy

See Also