#region Disclaimer / License // Copyright (C) 2010, Jackie Ng // http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@gmail.com // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // #endregion using System; using System.Collections.Generic; using System.Text; using ICSharpCode.Core; using Props = ICSharpCode.Core.PropertyService; using System.IO; using System.Drawing; namespace Maestro.Base.UI.Preferences { /// /// Configuration property keys for the Maestro base addin /// public static class ConfigProperties { /// /// The locale to preview in /// public const string PreviewLocale = "General.PreviewLocale"; //NOXLATE /// /// The type of viewer to preview /// public const string PreviewViewerType = "General.PreviewViewerType"; //NOXLATE /// /// The user template directory /// public const string UserTemplatesDirectory = "General.UserTemplatesDirectory"; //NOXLATE /// /// Show the messages view /// public const string ShowMessages = "General.ShowMessages"; //NOXLATE /// /// Show the outbound requests view /// public const string ShowOutboundRequests = "General.ShowOutboundRequests"; //NOXLATE /// /// The color for open resources in the Site Explorer /// public const string OpenColor = "General.OpenColor"; //NOXLATE /// /// The color for unsaved resources in the Site Explorer /// public const string DirtyColor = "General.DirtyColor"; //NOXLATE /// /// The path to MgCooker.exe /// public const string MgCookerPath = "General.MgCookerPath"; //NOXLATE /// /// The path to RtMapInspector.exe /// public const string RtMapInspectorPath = "General.RtMapInspectorPath"; //NOXLATE /// /// The path to MaestroFsPreview.exe /// public const string LocalFsPreviewPath = "General.LocalFsPreviewPath"; //NOXLATE /// /// Validate resources when saving /// public const string ValidateOnSave = "General.ValidateResourceOnSave"; //NOXLATE /// /// The path to MapGuide XML schemas /// public const string XsdSchemaPath = "Editor.XsdSchemaPath"; //NOXLATE /// /// Use the local preview using Maestro's Map Viewer component /// public const string UseLocalPreview = "Editor.UseLocalPreview"; //NOXLATE /// /// Show the tip of the day on startup /// public const string ShowTipOfTheDay = "General.ShowTipOfTheDay"; //NOXLATE /// /// The path to Maestro.LiveMapEditor.exe /// public const string LiveMapEditorPath = "General.LiveMapEditorPath"; //NOXLATE internal static void ApplyDefaults() { ApplyGeneralDefaults(); ApplyEditorDefaults(); } internal static void ApplyEditorDefaults() { Props.Set(ConfigProperties.PreviewLocale, DefaultPreviewLocale); Props.Set(ConfigProperties.ValidateOnSave, DefaultValidateOnSave); Props.Set(ConfigProperties.XsdSchemaPath, DefaultXsdSchemaPath); Props.Set(ConfigProperties.UseLocalPreview, DefaultUseLocalPreview); } internal static void ApplyGeneralDefaults() { Props.Set(ConfigProperties.PreviewViewerType, DefaultPreviewViewerType); Props.Set(ConfigProperties.UserTemplatesDirectory, DefaultUserTemplatesDirectory); Props.Set(ConfigProperties.ShowMessages, DefaultShowMessages); Props.Set(ConfigProperties.ShowOutboundRequests, DefaultShowOutboundRequests); Props.Set(ConfigProperties.OpenColor, DefaultOpenColor); Props.Set(ConfigProperties.DirtyColor, DefaultDirtyColor); Props.Set(ConfigProperties.MgCookerPath, DefaultMgCookerPath); Props.Set(ConfigProperties.RtMapInspectorPath, DefaultRtMapInspectorPath); Props.Set(ConfigProperties.LocalFsPreviewPath, DefaultLocalFsPreviewPath); Props.Set(ConfigProperties.ShowTipOfTheDay, DefaultShowTipOfTheDay); Props.Set(ConfigProperties.LiveMapEditorPath, DefaultLiveMapEditorPath); } /// /// Default locale setting for web-based resource previews /// public static string DefaultPreviewLocale { get { return "en"; } } //NOXLATE /// /// Default setting for "Show tip of the day" /// public static bool DefaultShowTipOfTheDay { get { return true; } } /// /// Default path to MgCooker.exe /// public static string DefaultMgCookerPath { get { return Path.Combine(FileUtility.ApplicationRootPath, "MgCooker.exe"); } } //NOXLATE /// /// Default path to MaestroFsPreview.exe /// public static string DefaultLocalFsPreviewPath { get { return Path.Combine(FileUtility.ApplicationRootPath, "MaestroFsPreview.exe"); } } //NOXLATE /// /// Default path to RtMapInspector.exe /// public static string DefaultRtMapInspectorPath { get { return Path.Combine(FileUtility.ApplicationRootPath, "RtMapInspector.exe"); } } //NOXLATE /// /// Default path to Maestro.LiveMapEditor.exe /// public static string DefaultLiveMapEditorPath { get { return Path.Combine(FileUtility.ApplicationRootPath, "Maestro.LiveMapEditor.exe"); } } //NOXLATE /// /// Default setting for using local previews /// public static bool DefaultUseLocalPreview { get { return true; } } /// /// Default color for open resources in the Site Explorer /// public static Color DefaultOpenColor { get { return Color.LightGreen; } } /// /// Default color for unsaved resources in the Site Explorer /// public static Color DefaultDirtyColor { get { return Color.Pink; } } /// /// Default setting for "Show Messages" /// public static bool DefaultShowMessages { get { return true; } } /// /// Default setting for "Show Outbound Requests" /// public static bool DefaultShowOutboundRequests { get { return true; } } /// /// Default setting for "Validate Resources on Save" /// public static bool DefaultValidateOnSave { get { return true; } } /// /// Default MapGuide XML schema path /// public static string DefaultXsdSchemaPath { get { return Path.Combine(FileUtility.ApplicationRootPath, "Schemas"); } } //NOXLATE /// /// Default preview viewer type /// public static string DefaultPreviewViewerType { get { return "AJAX"; } } //NOXLATE /// /// Default user template directory /// public static string DefaultUserTemplatesDirectory { get { return Path.Combine(FileUtility.ApplicationRootPath, "UserTemplates"); } } //NOXLATE } }