#region Disclaimer / License
// Copyright (C) 2009, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// 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 Disclaimer / License
using OSGeo.MapGuide.ObjectModels;
using System;
namespace OSGeo.MapGuide.MaestroAPI
{
///
/// Commonly used string constants for MapGuide
///
public static class StringConstants
{
///
/// The root resource identifier
///
public const string RootIdentifier = "Library://"; //NOXLATE
///
/// A thumbnail dwf resource role
///
public const string Thumbnail = nameof(Thumbnail);
///
/// The username login placeholder token
///
public const string MgUsernamePlaceholder = "%MG_USERNAME%"; //NOXLATE
///
/// The password login placeholder token
///
public const string MgPasswordPlaceholder = "%MG_PASSWORD%"; //NOXLATE
///
/// The placeholder token that resolves to the path containing resource data
///
public const string MgDataFilePath = "%MG_DATA_FILE_PATH%"; //NOXLATE
///
/// The name of the resource data item containing the secured Feature Source credentials
///
public const string MgUserCredentialsResourceData = "MG_USER_CREDENTIALS"; //NOXLATE
///
/// The file picker filter for all files
///
public static string AllFilesFilter
{
get
{
return string.Format(Strings.GenericFilter, Strings.PickAll, "*");
}
}
}
///
/// Represents a method involving a resource id
///
///
///
public delegate void ResourceEventHandler(object sender, ResourceEventArgs e);
///
/// Contains the resource id
///
public class ResourceEventArgs : EventArgs
{
///
/// Constructor
///
///
public ResourceEventArgs(string resourceID)
{
this.ResourceID = resourceID;
}
///
/// Gets or sets the resource id
///
public string ResourceID { get; set; }
}
///
/// Helper class to filter into the ones that are
/// editable
///
public static class SiteResourceType
{
private static readonly ResourceTypes[] _resTypes;
static SiteResourceType()
{
_resTypes = (ResourceTypes[])Enum.GetValues(typeof(ResourceTypes));
}
///
/// Returns an array of all editable values
///
///
public static ResourceTypes[] All()
{
return _resTypes;
}
}
///
/// Flags that can be used for the QueryMapFeatures operation
///
[Flags]
public enum QueryMapFeaturesLayerAttributes : int
{
///
/// All layers
///
AllLayers = 0,
///
/// Only visible
///
OnlyVisible = 1,
///
/// Only selectable
///
OnlySelectable = 2,
///
/// Default
///
Default = 3,
///
/// Only with tooltips
///
OnlyWithToolTips = 4,
///
/// Visible with tooltips
///
VisibleWithToolTips = 5
}
///
/// Defines the types of unmananged data
///
public enum UnmanagedDataTypes : int
{
///
/// Files
///
Files,
///
/// Folders
///
Folders,
///
/// Files and Folders
///
Both
}
}