当前位置: 首页>>代码示例>>C#>>正文


C# Locations类代码示例

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


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

示例1: AddCurves

 /// <summary>
 /// 
 /// </summary>
 /// <param name="lineList"></param>
 /// <param name="leftLoc"></param>
 /// <param name="rightLoc"></param>
 private void AddCurves(IList lineList, Locations leftLoc, Locations rightLoc)
 {
     for (IEnumerator i = lineList.GetEnumerator(); i.MoveNext(); )
     {
         ICoordinate[] coords = (ICoordinate[]) i.Current;
         AddCurve(coords, leftLoc, rightLoc);
     }
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:14,代码来源:OffsetCurveSetBuilder.cs

示例2: TopologyLocation

 /// <summary> 
 /// Constructs a TopologyLocation specifying how points on, to the left of, and to the
 /// right of some GraphComponent relate to some Geometry. Possible values for the
 /// parameters are Location.Null, Location.Exterior, Location.Boundary, 
 /// and Location.Interior.
 /// </summary>        
 /// <param name="on"></param>
 /// <param name="left"></param>
 /// <param name="right"></param>
 public TopologyLocation(Locations on, Locations left, Locations right) 
 {
     Init(3);
     location[(int)Positions.On] = on;
     location[(int)Positions.Left] = left;
     location[(int)Positions.Right] = right;
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:16,代码来源:TopologyLocation.cs

示例3: CloneSlide

        /// <summary>
        ///     Clone an existing slide (make a copy)
        /// </summary>
        /// <param name="presentation">PPT.Presentation object instance</param>
        /// <param name="slide">PPT.Slide instance that is to be cloned</param>
        /// <param name="destination">Destination for the cloned slide</param>
        /// <param name="locationIndex">Optional index for the new slide (slide.Index)</param>
        /// <returns></returns>
        public PPT.SlideRange CloneSlide(
                PPT.Presentation presentation,
                PPT.Slide slide,
                Locations.Location destination,
                int locationIndex = 0)
        {
            PPT.SlideRange dupeSlide = slide.Duplicate();

            switch (destination)
            {
                case Locations.Location.First:
                    dupeSlide.MoveTo(1);
                    break;

                case Locations.Location.Last:
                    dupeSlide.MoveTo((presentation.Slides.Count));
                    break;

                case Locations.Location.Custom:
                    dupeSlide.MoveTo(locationIndex);
                    break;
            }

            return dupeSlide;
        }
开发者ID:prathapkora,项目名称:CodeSharper.PowerPoint.Helper,代码行数:33,代码来源:SlideManager.cs

示例4: AddCurves

 /// <summary>
 /// 
 /// </summary>
 /// <param name="lineList"></param>
 /// <param name="leftLoc"></param>
 /// <param name="rightLoc"></param>
 private void AddCurves(IEnumerable lineList, Locations leftLoc, Locations rightLoc)
 {
     for (IEnumerator i = lineList.GetEnumerator(); i.MoveNext(); )
     {
         AddCurve(i.Current as IList<Coordinate>, leftLoc, rightLoc);
     }
 }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:13,代码来源:OffsetCurveSetBuilder.cs

示例5: DepthFactor

 /// <summary>
 /// Computes the factor for the change in depth when moving from one location to another.
 /// E.g. if crossing from the Interior to the Exterior the depth decreases, so the factor is -1.
 /// </summary>
 public static int DepthFactor(Locations currLocation, Locations nextLocation)
 {
     if (currLocation == Locations.Exterior && nextLocation == Locations.Interior)
         return 1;
     else if (currLocation == Locations.Interior && nextLocation == Locations.Exterior)
         return -1;
     return 0;
 }
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:12,代码来源:DirectedEdge.cs

示例6: AddCurve

 /// <summary>
 /// Creates a {SegmentString} for a coordinate list which is a raw offset curve,
 /// and adds it to the list of buffer curves.
 /// The SegmentString is tagged with a Label giving the topology of the curve.
 /// The curve may be oriented in either direction.
 /// If the curve is oriented CW, the locations will be:
 /// Left: Location.Exterior.
 /// Right: Location.Interior.
 /// </summary>
 private void AddCurve(ICoordinate[] coord, Locations leftLoc, Locations rightLoc)
 {
     // don't add null curves!
     if (coord.Length < 2) return;
     // add the edge for a coordinate list which is a raw offset curve
     SegmentString e = new SegmentString(coord, new Label(0, Locations.Boundary, leftLoc, rightLoc));
     curveList.Add(e);
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:17,代码来源:OffsetCurveSetBuilder.cs

示例7: CanPaginateLocationsTest

        public void CanPaginateLocationsTest()
        {
            Locations locationsBeforePagination = new Locations();
            Locations locationsAfterPagination =
                locationsBeforePagination.Paginate<Location>() as Locations;

            Assert.That(locationsAfterPagination, Is.Not.Null);
        }
开发者ID:jeff-vera,项目名称:C--Extension-Stuff,代码行数:8,代码来源:ListExtensionTests.cs

示例8: GetLocations

        public override void GetLocations(Action<Locations> callback)
        {
            var url = serverUrl + "/locations";

            Get (url,false, data => {
                var l = new Locations (data as string);
                callback(l);
            });
        }
开发者ID:PaceCreativeLabs,项目名称:PaceSafety-App,代码行数:9,代码来源:APIClientIOS.cs

示例9: LocationInfo

 public LocationInfo()
 {
     loc = Locations.NONE;
     isMem = false;
     isReg = false;
     isFlag = false;
     isOffset = false;
     isWide = false;
     val = 0;
 }
开发者ID:Plasmarobo,项目名称:GAPP,代码行数:10,代码来源:LocationInfo.cs

示例10: DepthAtLocation

        /// <summary>
        /// 
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public static int DepthAtLocation(Locations location)
        {
            if (location == Locations.Exterior) 
                return 0;

            if (location == Locations.Interior) 
                return 1;

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

示例11: Get

 /// <summary>
 /// See methods Get(int, int) and Set(int, int, int value)
 /// </summary>         
 public Dimensions this[Locations row, Locations column]
 {
     get
     {
         return Get(row, column);
     }
     set
     {
         Set(row, column, value);
     }
 }
开发者ID:izambakci,项目名称:tf-net,代码行数:14,代码来源:IntersectionMatrix.cs

示例12: onCountryLoad

    /// <summary>
    /// function to load country names to dropdownlist
    /// </summary>
    public void onCountryLoad()
    {
        Locations loc = new Locations();
        loc.LocationParentId = 0;

        ddlCountry.DataSource = _usrmgr.Locations(loc);
        ddlCountry.DataTextField = "LocationName";
        ddlCountry.DataValueField = "LocationId";
        ddlCountry.DataBind();
        ddlCountry.SelectedValue = Convert.ToString(5);
    }
开发者ID:rupendra-sharma07,项目名称:MainTrunk,代码行数:14,代码来源:SignUpPopup.aspx.cs

示例13: GetCountryList

 /// <summary>
 /// This method will call the Tribute Manager class to get the Country list and State list
 /// </summary>
 /// 
 /// <param name="countries">This will pass the parent location (country) for the state and null for the country
 /// </param>
 /// <returns>This method will return the list of location(state, country)</returns>
 public IList<Locations> GetCountryList(Locations countries)
 {
     try
     {
         return FacadeManager.TributeManager.GetCountryList(countries);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:rupendra-sharma07,项目名称:MainTrunk,代码行数:18,代码来源:StoryController.cs

示例14: ToLocationSymbol

 /// <summary>
 /// Converts the location value to a location symbol, for example, <c>EXTERIOR => 'e'</c>.
 /// </summary>
 /// <param name="locationValue"></param>
 /// <returns>Either 'e', 'b', 'i' or '-'.</returns>
 public static char ToLocationSymbol(Locations locationValue)
 {
     switch (locationValue)
     {
         case Locations.Exterior:
             return 'e';
         case Locations.Boundary:
             return 'b';
         case Locations.Interior:
             return 'i';
         case Locations.Null:
             return '-';
     }
     throw new ArgumentException("Unknown location value: " + locationValue);
 }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:20,代码来源:Location.cs

示例15: Insert

        public static int Insert(Location location)
        {
            dynamic table = new Locations();
            var locations = table.Find(user_id: location.UserId, formatted_address: location.FormattedAddress);
            foreach (var item in locations)
            {
                table.Update(new { formatted_address = location.FormattedAddress }, item.id);
                return item.id;
            }
            // do it up - the new ID will be returned from the query
            var results = table.Insert(new
            {
                user_id = location.UserId,
                formatted_address = location.FormattedAddress,
                latitude = location.Latitude,
                longitude = location.Longitude
            });

            return 1;
        }
开发者ID:jgwynn2901,项目名称:FrugalShopper,代码行数:20,代码来源:UserRepository.cs


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