本文整理汇总了C#中Utilities类的典型用法代码示例。如果您正苦于以下问题:C# Utilities类的具体用法?C# Utilities怎么用?C# Utilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Utilities类属于命名空间,在下文中一共展示了Utilities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowGameGroupJoinMockDialog
public void ShowGameGroupJoinMockDialog(
Utilities.Callback<ResultContainer> callback,
string callbackId)
{
var result = MockResults.GetGenericResult(int.Parse(callbackId), this.ResultExtras);
callback(new ResultContainer(result));
}
示例2: hasCrop
public bool hasCrop(Utilities.CropTypes crop_in)
{
if (crops[crop_in].Count != 0)
return true;
else
return false;
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Utilities util = new Utilities();
string eid = Convert.ToString(Session["eid"]);
if (!String.IsNullOrEmpty(Request.QueryString["id"]))
{
int id = Convert.ToInt32(Request.QueryString["id"]);
if (existComment(id))
{
if (util.checkUsersComment(id, eid) || (int)Session["lvl"] == 3)
{
deleteComment(id);
Response.Redirect("/Pictures/?id=" + Session["PictureID"]);
}
}
else
{
Gavan.Global.error = "התגובה אינה נמצאה.";
}
}
else
{
Response.Redirect("../default.aspx");
}
}
示例4: LoadSideNavigationItems
public void LoadSideNavigationItems(Utilities.TopLevelNavigation pageParent, string url)
{
// Create generic list to house side nav items
List<BusinessLogic.SideNavigationItem> sideNavItems = new List<BusinessLogic.SideNavigationItem>();
switch (pageParent)
{
case Utilities.TopLevelNavigation.AboutUs:
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navWhoIsOMS", "aboutus.aspx", "Who is OMS", "/about-us", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navWhereWeServe", "whereweserve.aspx", "Where we Serve", "/where-we-serve", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navOmsHistory", "#", "OMS History", "/one-mission-society-history", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navArticlesOfFaith", "articlesoffaith.aspx", "Articles of Faith", "/articles-of-faith", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("BoardOfTrustees", "#", "Board of Trustees", "/board-of-trustees", false, false));
sideNavItems.First(x => x.URL == url || x.SeoAlias == url).IsActive = true;
break;
case Utilities.TopLevelNavigation.Give:
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToOMS", "Give.aspx", "Give to OMS", "/give", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToAProject", "project.aspx", "Give to a Project", "/give/projects", false, false));
sideNavItems.Add(new BusinessLogic.SideNavigationItem("navGiveToAMissionary", "#", "Give to a Missionary", "/give/missionary", false, false));
var activeNode = sideNavItems.FirstOrDefault(x => x.URL == url || x.SeoAlias == url);
if (activeNode != null) activeNode.IsActive = true;
break;
}
// Add contextual side item
if (this.ContextualSideNavItem != null)
{
sideNavItems.Add(this.ContextualSideNavItem);
}
HttpContext.Current.Session.Add("SideNavigationItems", sideNavItems);
}
示例5: MessageInfo
public MessageInfo(int msgId, int userId, int userChat, Utilities.Common.TYPE type)
{
MessageID = msgId;
UserID = userId;
UserChat = userChat;
Type = type;
}
示例6: Blocker
public Blocker(Utilities.Graphics.AnimatedSprite sprite, Shape colShape, bool isAbovePlayer, float maxSpeed = 0.0f, float mass = 1.0f)
: base(colShape, Single.PositiveInfinity, maxSpeed)
{
IsAbovePlayer = isAbovePlayer;
Sprite = sprite;
Mass = mass;
}
示例7: CurrentObjectives_CollectionChanged
private void CurrentObjectives_CollectionChanged(System.Collections.ICollection source, Utilities.Collections.NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Add)
{
for (int i = 0; i < e.NewItems.Count; i++)
{
if (_ObjectiveImages.Length < i)
return;
_ObjectiveImages[i].Texture = Food.GetFoodImage(((FoodObjective)e.NewItems[i]).FoodType).texture;
objectif = ((FoodObjective)e.NewItems[i]).FoodType;
_ObjectiveImages[i].Show();
((FoodObjective)e.NewItems[i]).PropertyChanged += ObjectivesUIManager_PropertyChanged;
}
}
else if (e.Action == NotifyCollectionChangedAction.Remove)
{
for (int i = 0; i < e.OldItems.Count; i++)
{
((FoodObjective)e.NewItems[i]).PropertyChanged -= ObjectivesUIManager_PropertyChanged;
}
}
else if (e.Action == NotifyCollectionChangedAction.Reset)
{
for (int i = 0; i < e.OldItems.Count; i++)
{
((FoodObjective)e.NewItems[i]).PropertyChanged -= ObjectivesUIManager_PropertyChanged;
}
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Utilities util = new Utilities();
string eid = Convert.ToString(Session["eid"]);
int id = Convert.ToInt32(Request.Form["id"]);
if (Request.Form["id"] != null)
{
if (util.checkUsersPic(id, eid) || (int) Session["lvl"] == 3)
{
int PictureID;
string picname, picdesc;
picname = Request.Form["picname"];
picdesc = Request.Form["description"];
PictureID = Convert.ToInt32(Request.Form["id"]);
this.UpdatePicture(PictureID, picname, picdesc);
Response.Redirect("default.aspx?id=" + PictureID);
}
}
else if(!util.checkUsersPic(id, eid))
{
Gavan.Global.error = "התמונה איננה שלך.";
}
else
{
Response.Redirect("default.aspx");
}
}
示例9: VisitBinaryExpression
private void VisitBinaryExpression(Utilities.ContinuationOperator continuation, BinaryExpression binExpr, bool neg)
{
ExpressionType oper = binExpr.NodeType;
ExpressionType[] AndOperators = { ExpressionType.And, ExpressionType.AndAlso };
ExpressionType[] OrOperators = { ExpressionType.Or, ExpressionType.OrElse };
ExpressionType[] binOperators = AndOperators.Concat(OrOperators).ToArray();
if (binOperators.Contains(binExpr.NodeType))
{
VisitExpression(continuation, binExpr.Left, neg);
if (binOperators.Contains(binExpr.Left.NodeType) & binOperators.Contains(binExpr.Right.NodeType))
{
if (AndOperators.Contains(binExpr.NodeType))
_encodedQuery += "NQ";
if (OrOperators.Contains(binExpr.NodeType))
_encodedQuery += "^NQ";
}
VisitExpression((Utilities.ContinuationOperator)binExpr.NodeType, binExpr.Right, neg);
}
else
VisitSimpleExpression(continuation, binExpr, neg);
}
示例10: VoicemailScriptProcessor
public VoicemailScriptProcessor(WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension, VoicemailService vmService, PBXRegistrarService registrarService, Utilities.PluginManagement.PluginManager pluginManager)
{
this.extension = extension;
this.vmService = vmService;
this.registrarService = registrarService;
this.pluginManager = pluginManager;
}
示例11: EncoreClient
public EncoreClient()
{
encoreClient = new Utilities();
encoreInstance = new Instance();
encoreLogDetail = new LogDetail();
encoreLang = new Language();
}
示例12: size
public void size(Utilities.Vec2Int size)
{
didBackgroundUpdate = true;
_background.resize(size);
_size = _background.size();
}
示例13: SetSizeProfile
private void SetSizeProfile(Utilities.WAPackIaaS.DataContract.VirtualMachine vm)
{
vm.CPUCount = VMSizeProfile.CPUCount;
vm.Memory = VMSizeProfile.Memory;
vm.DynamicMemoryEnabled = VMSizeProfile.DynamicMemoryEnabled;
vm.DynamicMemoryMaximumMB = VMSizeProfile.DynamicMemoryMaximumMB;
vm.DynamicMemoryMinimumMB = VMSizeProfile.DynamicMemoryMinimumMB;
}
示例14: ShowLoginMockDialog
public void ShowLoginMockDialog(
Utilities.Callback<ResultContainer> callback,
string callbackId,
string permissions)
{
var result = MockResults.GetLoginResult(int.Parse(callbackId), permissions, this.ResultExtras);
callback(new ResultContainer(result));
}
示例15: createTile
public static void createTile(QuadNode<Tile> node, Utilities.Vec2Int pos)
{
if (_defaultFloorTex == null)
_defaultFloorTex = Resources.Load<Texture2D>("Textures/Game Environment/Tile");
Tile tile = new Tile(node, null, pos);
tile.setFloorTexture(_defaultFloorTex);
}