/*
This is the 'settings definition' file. It defined two things; first it specifies the
keynames used in the settings file. This allows you to use
IntelliSence when reading / writing settings.
The second item is the default values. These are used if a config
file is not found or the config file does not contain an entry
for the particular setting.
*/
using System;
namespace SmartClient
{
///
/// Contains setting key names.
///
public class SettingKeys
{
// general
public const string LoginName = "LoginName";
public const string LoginPassword = "LoginPassword";
public const string WorkOnline = "WorkOnline";
public const string UserID = "UserID";
public const string DatabaseCreated = "DatabaseCreated";
// settings page
public const string ServiceLocation = "ServiceLocation";
public const string ServiceLastLocation = "ServiceLastLocation";
public const string ServiceTimeout = "ServiceTimeout";
public const string BackgroundGetTasks = "BackgroundGetTasks";
public const string BackgroundGetTasksSeconds = "BackgroundGetTasksSeconds";
// task page
public const string LastProject = "LastProject";
public const string LastTaskFilter = "LastTaskFilter";
public const string LastCustomFilter = "LastCustomFilter";
public const string DisplayDueDate = "DisplayDueDate";
// details page
public const string LastAssignedTo = "LastAssignedTo";
public const string LastStatus = "LastStatus";
public const string LastProgress = "LastProgress";
public const string LastPriority = "LastPriority";
public const string LastDateDue = "LastDateDue";
}
///
/// Default settings
///
public class SettingDefaults
{
static public string[,] Values =
{
{SettingKeys.LoginName, "USERNAME"},
{SettingKeys.LoginPassword, SimpleEncrypt.Encrypt("PASSWORD")},
{SettingKeys.WorkOnline, "true"},
{SettingKeys.UserID, ""},
{SettingKeys.DatabaseCreated, ""},
{SettingKeys.ServiceLocation, "http://www.yourserver.com/webservice/"},
{SettingKeys.ServiceLastLocation, ""},
{SettingKeys.ServiceTimeout, "120"},
{SettingKeys.BackgroundGetTasks, "false"},
{SettingKeys.BackgroundGetTasksSeconds, "120"},
{SettingKeys.LastProject, ""},
{SettingKeys.LastTaskFilter, "1"},
{SettingKeys.LastCustomFilter, ""},
{SettingKeys.DisplayDueDate, "true"},
{SettingKeys.LastAssignedTo, ""},
{SettingKeys.LastStatus, ""},
{SettingKeys.LastProgress, ""},
{SettingKeys.LastPriority, ""},
{SettingKeys.LastDateDue, ""},
};
}
}
|