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

C# Locations类代码示例

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

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



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


示例16: IsResultOfOp

        /// <summary>
        /// This method will handle arguments of Location.NULL correctly.
        /// </summary>
        /// <returns><c>true</c> if the locations correspond to the opCode.</returns>
        public static bool IsResultOfOp(Locations loc0, Locations loc1, SpatialFunctions opCode)
        {
            if (loc0 == Locations.Boundary) 
                loc0 = Locations.Interior;
            if (loc1 == Locations.Boundary) 
                loc1 = Locations.Interior;
            
            switch (opCode) 
            {
                case SpatialFunctions.Intersection:
                    return loc0 == Locations.Interior && loc1 == Locations.Interior;
                case SpatialFunctions.Union:
                    return loc0 == Locations.Interior || loc1 == Locations.Interior;
                case SpatialFunctions.Difference:
                    return loc0 == Locations.Interior && loc1 != Locations.Interior;
                case SpatialFunctions.SymDifference:
                    return   (loc0 == Locations.Interior &&  loc1 != Locations.Interior)
                          || (loc0 != Locations.Interior &&  loc1 == Locations.Interior);
	            default:
                    return false;
            }            
        }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:26,代码来源:OverlayOp.cs


示例17: Add

 /// <summary>
 /// 
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="posIndex"></param>
 /// <param name="location"></param>
 public void Add(int geomIndex, Positions posIndex, Locations location)
 {
     if (location == Locations.Interior)
         depth[geomIndex, (int)posIndex]++;
 }
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:11,代码来源:Depth.cs


示例18: AddPolygonRing

 /// <summary>
 /// Add an offset curve for a ring.
 /// The side and left and right topological location arguments
 /// assume that the ring is oriented CW.
 /// If the ring is in the opposite orientation,
 /// the left and right locations must be interchanged and the side flipped.
 /// </summary>
 /// <param name="coord">The coordinates of the ring (must not contain repeated points).</param>
 /// <param name="offsetDistance">The distance at which to create the buffer.</param>
 /// <param name="side">The side of the ring on which to construct the buffer line.</param>
 /// <param name="cwLeftLoc">The location on the L side of the ring (if it is CW).</param>
 /// <param name="cwRightLoc">The location on the R side of the ring (if it is CW).</param>
 private void AddPolygonRing(IList<Coordinate> coord, double offsetDistance, Positions side, Locations cwLeftLoc, Locations cwRightLoc)
 {
     Locations leftLoc = cwLeftLoc;
     Locations rightLoc = cwRightLoc;
     if (CGAlgorithms.IsCounterClockwise(coord))
     {
         leftLoc = cwRightLoc;
         rightLoc = cwLeftLoc;
         side = Position.Opposite(side);
     }
     IList lineList = _curveBuilder.GetRingCurve(coord, side, offsetDistance);
     AddCurves(lineList, leftLoc, rightLoc);
 }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:25,代码来源:OffsetCurveSetBuilder.cs


示例19: Locationid

 private Locations Locationid(string ID)
 {
     Locations objLocations = new Locations();
     if (ID != null)
     {
         objLocations.LocationParentId = int.Parse(ID);
     }
     else
     {
         objLocations.LocationParentId = 0;
     }
     return objLocations;
 }
开发者ID:rupendra-sharma07,项目名称:MainTrunk,代码行数:13,代码来源:UserRegistration.aspx.cs


示例20: LocationsBox

        public LocationsBox (Locations locations, UIManager uiManager)
		: this(new Builder("locations_box.ui"))
        {
			Locations = locations;
			
			// create the actions
			Gtk.Action create = new Gtk.Action("createLocation","Create Location","",Stock.Add);
			create.Activated += OnCreateLocation;
			Gtk.Action delete = new Gtk.Action("deleteLocation","Delete Location","",Stock.Remove);
			delete.Activated += OnDeleteLocation;
			Gtk.Action gotoItem = new Gtk.Action("gotoLocationItem","Goto Item","",Stock.GoForward);
			gotoItem.Activated += OnGotoLocationItem;
			Gtk.Action action = new Gtk.Action("location","Location");
			
			ActionGroup group = new ActionGroup("location");
			group.Add(create);
			group.Add(delete);
			group.Add(gotoItem);
			group.Add(action);
			uiManager.InsertActionGroup(group,0);
			
			// create item column with id
			TreeViewColumn col = new TreeViewColumn ();
			locationsItemColumn = col;
			col.Title = "Item";
			col.Expand = true;
			CellRenderer render;
			render = new CellRendererPixbuf ();
			col.PackStart (render, false);
			col.AddAttribute (render, "pixbuf", 1);
			render = new CellRendererText ();
			(render as CellRendererText).Editable = true;
			render.EditingStarted += OnStartLocationItemEdit;
			col.PackStart (render, true);
			col.AddAttribute (render, "text", 2);
			locationsView.AppendColumn(col);
			locationsView.AppendColumn ("ID", new Gtk.CellRendererText (), "text", 3);
			
			// create the labeled column
			col = new TreeViewColumn ();
			col.Title = "Labeled";
			render = new CellRendererToggle ();
			(render as CellRendererToggle).Toggled += OnLabeledToggle;
			col.PackStart (render, false);
			col.AddAttribute (render, "active", 4);
			col.AddAttribute (render, "activatable", 5);
			locationsView.AppendColumn(col);
			
			// create the amount column
			col    = new TreeViewColumn ();
			col.Title = "Amount";
			render = new CellRendererSpin ();
			(render as CellRendererText).Editable = true;
			(render as CellRendererText).Edited += OnAmountEdited;		
			Adjustment adj = new Adjustment(0, 0, 0, 0, 0, 0);  //set all limits etc to 0
			adj.Upper = 1000000000;  // assign some special values, that aren't 0
			adj.PageIncrement = 10;
			adj.StepIncrement = 1;
			(render as CellRendererSpin).Adjustment = adj;
			col.PackStart (render, false);
			col.AddAttribute (render, "text", 6);
			locationsView.AppendColumn (col);
			
			//set model etc
			locations.CollectionChanged += OnLocationCreation;
			TreeModelFilter filter = new LocationsFilter ( new LocationsModel( locations ));
			filter.Model.RowInserted += OnRowInserted;
			filter.VisibleFunc = new TreeModelFilterVisibleFunc (FilterLocations);
	 		locationsView.Model = filter;
			locationsView.Reorderable = true;
			
			// create the items chooser completion
			locationCompletion = new LocationItemChooser();
			TreeModel compModel = new TreeModelAdapter( new ItemsModel(locations.Inventory.Items));
			locationCompletion.Model = compModel;
			locationCompletion.MatchFunc = LocationItemCompletionMatch;
			locationCompletion.MinimumKeyLength = 0;
			// add the item info cell renderer to the completion	
			render = new CellRendererText ();
			locationCompletion.PackStart (render, true);
			locationCompletion.AddAttribute (render, "text", 2);
			
			// create the popups
			uiManager.AddUiFromResource("locations_box_menues.xml");
			locationPopup = (Menu) uiManager.GetWidget("/locationPopup");
	    }
开发者ID:konne88,项目名称:MyInventory,代码行数:86,代码来源:LocationsBox.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Locator类代码示例发布时间:2022-05-24
下一篇:
C# LocationType类代码示例发布时间: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