• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FeatureType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FeatureType的典型用法代码示例。如果您正苦于以下问题:C# FeatureType类的具体用法?C# FeatureType怎么用?C# FeatureType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FeatureType类属于命名空间,在下文中一共展示了FeatureType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateNew

        /// <summary>
        /// This create new method implies that this provider has the priority for creating a new file.
        /// An instance of the dataset should be created and then returned.  By this time, the fileName
        /// will already be checked to see if it exists, and deleted if the user wants to overwrite it.
        /// </summary>
        /// <param name="fileName">The string fileName for the new instance</param>
        /// <param name="featureType">Point, Line, Polygon etc.  Sometimes this will be specified, sometimes it will be "Unspecified"</param>
        /// <param name="inRam">Boolean, true if the dataset should attempt to store data entirely in ram</param>
        /// <param name="progressHandler">An IProgressHandler for status messages.</param>
        /// <returns>An IRaster</returns>
        public virtual IFeatureSet CreateNew(string fileName, FeatureType featureType, bool inRam, IProgressHandler progressHandler)
        {
            if (featureType == FeatureType.Point)
            {
                PointShapefile ps = new PointShapefile();
                ps.Filename = fileName;
                return ps;
            }
            else if (featureType == FeatureType.Line)
            {
                LineShapefile ls = new LineShapefile();
                ls.Filename = fileName;
                return ls;
            }
            else if (featureType == FeatureType.Polygon)
            {
                PolygonShapefile ps = new PolygonShapefile();
                ps.Filename = fileName;
                return ps;
            }
            else if (featureType == FeatureType.MultiPoint)
            {
                MultiPointShapefile mps = new MultiPointShapefile();
                mps.Filename = fileName;
                return mps;
            }

            return null;
        }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:39,代码来源:ShapefileDataProvider.cs


示例2: GetFeatureInfo

 public EnableFeatureInfoRec GetFeatureInfo(DBManager dbManager, FeatureType type, string subType)
 {
     using (IDBProvider dbInstance = SP.DB.GetInstance(dbManager))
     {
         return dbInstance._<EnableFeatureAccessor>().SelectInfoByType(GetFeatureTypeKey(type, subType));
     }
 }
开发者ID:danni95,项目名称:Core,代码行数:7,代码来源:FeatureProvider.cs


示例3: GetLinkColor

        public string GetLinkColor(FeatureType featureType)
        {
            DgmlColorConfiguration dgmlColor = new DgmlColorConfiguration();
            string color = string.Empty;
            switch (featureType)
            {
                case FeatureType.Feature:
                case FeatureType.NeededFeature:
                    color = dgmlColor.FeatureColor;
                    break;
                case FeatureType.NeededExtensions:
                    color = dgmlColor.NeededExtensionsColor;
                    break;
                case FeatureType.Module:
                    color = dgmlColor.ModuleColor;
                    break;
                case FeatureType.BindingInterface:
                    color = dgmlColor.BindingInterfaceColor;
                    break;
                case FeatureType.BindingImpl:
                    color = dgmlColor.BindingImplColor;
                    break;
            }

            return color;
        }
开发者ID:DominikLindemann,项目名称:ninject.features,代码行数:26,代码来源:ColorSelector.cs


示例4: Feature

 public Feature(string name, FeatureType featureType)
 {
     Name = name;
     FType = featureType;
     MinRound = Rounds.PREFLOP;
     MaxRound = Rounds.RIVER;
 }
开发者ID:tansey,项目名称:holdem_features,代码行数:7,代码来源:Feature.cs


示例5: GetFeatures

  public DataTable GetFeatures(FeatureType featureType, IGeometry spatialConstraint)
  {
    DataTable table = null;

    string layerId = featureType == FeatureType.Selection ? _appState.SelectionLayer : _appState.TargetLayer;

    if (layerId.Length > 0)
    {
      Configuration config = AppContext.GetConfiguration();
      Configuration.LayerRow layerRow = config.Layer.FindByLayerID(layerId);

      CommonDataFrame dataFrame = AppContext.GetDataFrame(_appState.MapTab);
      CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, layerRow.LayerName, true) == 0);

      string query = GetQuery(featureType, layerRow, layer);

      if (query != null)
      {
        CommonField keyField = layer.FindField(layerRow.KeyField);

        if (spatialConstraint == null)
        {
          table = layer.GetFeatureTable(String.Format("{0},{1}", layer.GeometryField.Name, keyField.Name), query);
        }
        else
        {
          table = layer.GetFeatureTable(String.Format("{0},{1}", layer.GeometryField.Name, keyField.Name), query, spatialConstraint);
        }
      }
    }

    return table;
  }
开发者ID:ClaireBrill,项目名称:GPV,代码行数:33,代码来源:SelectionManager.cs


示例6: GetExtent

  public Envelope GetExtent(FeatureType featureType)
  {
    Envelope extent = new Envelope();

    string layerId = featureType == FeatureType.Selection ? _appState.SelectionLayer : _appState.TargetLayer;

    Configuration config = AppContext.GetConfiguration();
    Configuration.LayerRow layerRow = config.Layer.FindByLayerID(layerId);

    CommonDataFrame dataFrame = AppContext.GetDataFrame(_appState.MapTab);
    CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, layerRow.LayerName, true) == 0);

    string query = GetQuery(featureType, layerRow, layer);

    if (query != null)
    {
      extent = layer.GetFeatureExtent(query);
    }

    if (!extent.IsNull && extent.Width == 0 && extent.Height == 0)
    {
      extent = new Envelope(new Coordinate(extent.MinX - 50, extent.MinY - 50), new Coordinate(extent.MaxX + 50, extent.MaxY + 50));
    }

    return extent;
  }
开发者ID:ClaireBrill,项目名称:GPV,代码行数:26,代码来源:SelectionManager.cs


示例7: EnergyEventStatus

 public EnergyEventStatus(DeviceBase device, FeatureType featureType, uint featureId, int frequency, ObservableCollection<DeviceEventSettings> emitEvents)
     : base(device, featureType, featureId, frequency, emitEvents)
 {
     EnergyTotal = 0.0;
     EventPower = 0;
     LastPowerEmitted = 0;
     LastEnergyEmitted = 0.0;
 }
开发者ID:alberthoekstra,项目名称:PVBeanCounter,代码行数:8,代码来源:EventStatus.cs


示例8: Feature

 /// CHECKED
 /// <summary>
 /// 
 /// </summary>
 /// <param name="type"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <param name="w"></param>
 /// <param name="h"></param>
 public Feature(FeatureType type, int x, int y, int w, int h)
 {
     this.type = type;
     this.x = x;
     this.y = y;
     this.w = w;
     this.h = h;
 }
开发者ID:misael86,项目名称:ViolaJones-CS,代码行数:17,代码来源:Feature.cs


示例9: Shapefile

 /// <summary>
 /// Creates a new instance of a shapefile based on a fileName
 /// </summary>
 /// <param name="fileName">File name</param>
 /// <param name="featureType">Feature type</param>
 protected Shapefile(string fileName, FeatureType featureType)
     : base(featureType)
 {
     Attributes = new AttributeTable();
     Header = new ShapefileHeader();
     
     Open(fileName, null);
 }
开发者ID:hanchao,项目名称:DotSpatial,代码行数:13,代码来源:Shapefile.cs


示例10: FeatureInfo

 public FeatureInfo(Type feature, [AllowNull]Type factory, [AllowNull]IEnumerable<Type> dependencies, FeatureType featureType)
 {
     this.Id = Guid.NewGuid().ToString();
     this.Feature = feature;
     this.Factory = factory;
     this.Dependencies = dependencies;
     this.FeatureType = featureType;
     this.dependenciesInfo = new List<FeatureInfo>();
     this.BindingTarget = BindingTarget.Self;
 }
开发者ID:DominikLindemann,项目名称:ninject.features,代码行数:10,代码来源:Features.cs


示例11: FeatureInfo

 public FeatureInfo(System.Type feature, [NullGuard.AllowNull]System.Type factory, [NullGuard.AllowNull] System.Collections.Generic.IEnumerable<System.Type> dependencies, FeatureType featureType)
 {
     this.Id = System.Guid.NewGuid().ToString();
     this.Feature = feature;
     this.Factory = factory;
     this.Dependencies = dependencies;
     this.FeatureType = featureType;
     this.dependenciesInfo = new System.Collections.Generic.List<FeatureInfo>();
     this.BindingTarget = Planning.Bindings.BindingTarget.Self;
 }
开发者ID:ursenzler,项目名称:ninject.features,代码行数:10,代码来源:FeatureInfo.cs


示例12: Enable

 public bool Enable(DBManager dbManager, FeatureType type, string subType, bool isManually, string command, string text)
 {
     return DoUpdate(dbManager,
         new EnableFeatureRec
         {
             Type = GetFeatureTypeKey(type, subType),
             IsEnabled = true,
             IsManually = isManually,
             AuthorUserID = SP.SessionContext.UserID,
             Command = command,
             Text = text,
             Upd = DateTime.Now,
         });
 }
开发者ID:danni95,项目名称:Core,代码行数:14,代码来源:FeatureProvider.cs


示例13: featureTypeSubKey

        private string featureTypeSubKey(FeatureType featureType)
        {
            switch (featureType)
            { 
                case FeatureType.Point:
                    return "points";
                case FeatureType.Polyline:
                    return "polylines";
                case FeatureType.Polygon:
                    return "polygons";
            }

            return string.Empty;
        }
开发者ID:gkrsu,项目名称:maparound.core,代码行数:14,代码来源:Caching.cs


示例14: GenerateLink

        public XElement GenerateLink(string sourceElementId, FeatureInfo targetElement, FeatureType featureType)
        {
            string color = this.colorSelector.GetLinkColor(featureType);

            XAttribute label =
                string.IsNullOrEmpty(targetElement.BindingTarget.ToString())
                ? new XAttribute("Label", featureType)
                : new XAttribute("Label", "Binding " + targetElement.BindingTarget);

            var link = new XElement(
                this.nameSpace + "Link",
                new XAttribute("Source", sourceElementId),
                new XAttribute("Target", targetElement.Id),
                new XAttribute("Stroke", color),
                new XAttribute("StrokeDashArray", "3"),
                label);

            return link;
        }
开发者ID:DominikLindemann,项目名称:ninject.features,代码行数:19,代码来源:XElementCreater.cs


示例15: CreateNew

        /// <summary>
        /// Not Implemented yet
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="featureType"></param>
        /// <param name="inRam"></param>
        /// <param name="container"></param>
        /// <param name="progressHandler"></param>
        /// <returns></returns>
        public IFeatureLayer CreateNew(string fileName, FeatureType featureType, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler)
        {
            ShapefileDataProvider dp = new ShapefileDataProvider();
            IFeatureSet fs = dp.CreateNew(fileName, featureType, inRam, progressHandler);
            if (progressHandler == null) progressHandler = LayerManager.DefaultLayerManager.ProgressHandler;

            if (fs.FeatureType == FeatureType.Line)
            {
                return new MapLineLayer(fs, container);
            }
            if (fs.FeatureType == FeatureType.Polygon)
            {
                return new MapPolygonLayer(fs, container);
            }
            if (fs.FeatureType == FeatureType.Point || fs.FeatureType == FeatureType.MultiPoint)
            {
                return new MapPointLayer(fs, container);
            }
            return null;
        }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:29,代码来源:ShapefileLayerProvider.cs


示例16: EventStatus

        public EventStatus(DeviceBase device, FeatureType featureType, uint featureId, int frequency, ObservableCollection<DeviceEventSettings> emitEvents)
        {
            Device = device;
            FeatureType = featureType;
            FeatureId = featureId;
            Frequency = frequency;
            ToDeviceLinks = new List<DeviceLink>();
            FromDeviceLinks = new List<DeviceLink>();

            EmitEvents = new List<DeviceEventConfig>();
            foreach(DeviceEventSettings es in device.DeviceManagerDeviceSettings.DeviceEvents)
                if (es.EventFeatureType == FeatureType && es.EventFeatureId == FeatureId)
                    EmitEvents.Add(new DeviceEventConfig(es));
        }
开发者ID:alberthoekstra,项目名称:PVBeanCounter,代码行数:14,代码来源:EventStatus.cs


示例17: AnnotationBasedFacetFactoryAbstract

 protected AnnotationBasedFacetFactoryAbstract(int numericOrder, FeatureType featureTypes)
     : base(numericOrder, featureTypes) {}
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:2,代码来源:AnnotationBasedFacetFactoryAbstract.cs


示例18: FacetFactoryAbstract

 protected FacetFactoryAbstract(int numericOrder, FeatureType featureTypes) {
     NumericOrder = numericOrder;
     this.featureTypes = featureTypes;
 }
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:4,代码来源:FacetFactoryAbstract.cs


示例19: RayTest

		public int RayTest(Vector3 rayFrom, Vector3 rayTo, ref float mint, out FeatureType feature,
			out int index, bool countOnly)
		{
			return btSoftBody_rayTest2(_native, ref rayFrom, ref rayTo, ref mint,
				out feature, out index, countOnly);
		}
开发者ID:rhynodegreat,项目名称:BulletSharpPInvoke,代码行数:6,代码来源:SoftBody.cs


示例20: btSoftBody_rayTest2

		static extern int btSoftBody_rayTest2(IntPtr obj, [In] ref Vector3 rayFrom, [In] ref Vector3 rayTo, ref float mint, out FeatureType feature, out int index, bool bcountonly);
开发者ID:rhynodegreat,项目名称:BulletSharpPInvoke,代码行数:1,代码来源:SoftBody.cs



注:本文中的FeatureType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Features类代码示例发布时间:2022-05-24
下一篇:
C# FeatureLayerClass类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap