本文整理汇总了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);
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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);
}
示例7: CanPaginateLocationsTest
public void CanPaginateLocationsTest()
{
Locations locationsBeforePagination = new Locations();
Locations locationsAfterPagination =
locationsBeforePagination.Paginate<Location>() as Locations;
Assert.That(locationsAfterPagination, Is.Not.Null);
}
示例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);
});
}
示例9: LocationInfo
public LocationInfo()
{
loc = Locations.NONE;
isMem = false;
isReg = false;
isFlag = false;
isOffset = false;
isWide = false;
val = 0;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
}
示例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);
}
示例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;
}