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

C# System.Util类代码示例

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

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



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

示例1: Add

 /// <summary>
 /// This adds a LinkedList of objects
 /// </summary>
 /// <param name="actorList">The list of objects</param>
 public void Add(Util.LinkedList actorList)
 {
     foreach(DXMAN.Base.xRenderable obj in xObjects)
     {
         Add(obj);
     }
 }
开发者ID:andrewgbliss,项目名称:CS_DXMAN,代码行数:11,代码来源:xEventManager.cs


示例2: ValidOutcome

		/// <summary>
		/// This method determines whether the outcome is valid for the preceding sequence.  
		/// This can be used to implement constraints on what sequences are valid.  
		/// </summary>
		/// <param name="outcome">
		/// The outcome.
		/// </param>
		/// <param name="sequence">
		/// The preceding sequence of outcome assignments. 
		/// </param>
		/// <returns>
		/// true if the outcome is valid for the sequence, false otherwise.
		/// </returns>
		protected internal override bool ValidOutcome(string outcome, Util.Sequence sequence)
		{
			if (outcome.StartsWith("I-"))
			{
				string[] tags = sequence.Outcomes.ToArray();
				int lastTagIndex = tags.Length - 1;
				if (lastTagIndex == - 1)
				{
					return (false);
				}
				else
				{
					string lastTag = tags[lastTagIndex];
					if (lastTag == "O")
					{
						return false;
					}
					if (lastTag.Substring(2) != outcome.Substring(2))
					{
						return false;
					}
				}
			}
			return true;
		}
开发者ID:gblosser,项目名称:OpenNlp,代码行数:38,代码来源:EnglishTreebankChunker.cs


示例3: FileSystemRepository

 public FileSystemRepository(ILogger logger, ISettings settings, IEncryption encryption, Util.Util util)
 {
     _logger = logger;
     _settings = settings;
     _encryption = encryption;
     _util = util;
 }
开发者ID:ryanpagel,项目名称:OrderEntry,代码行数:7,代码来源:FileSystemRepository.cs


示例4: DHSha

			public DHSha(HashAlgorithm algorithm, Util.Func<Protocol, string> getName) {
				if (algorithm == null) throw new ArgumentNullException("algorithm");
				if (getName == null) throw new ArgumentNullException("getName");

				GetName = getName;
				Algorithm = algorithm;
			}
开发者ID:Belxjander,项目名称:Asuna,代码行数:7,代码来源:DiffieHellmanUtil.cs


示例5: getGraph

        public System.Windows.Controls.Image getGraph(Util.TimeType duration)
        {
            if (currentSearch == null)
                return null;
            try
            {
                string query = currentSearch + CHART_TIME;
                query += timeFilter[duration];

                Uri url = new Uri(CHART_BASE + query);
                //Debugging
                //Console.Write(CHART_BASE + query);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

                //See the response that yahoo creates
                WebResponse response = request.GetResponse();

                Stream sr = response.GetResponseStream();
                System.Drawing.Image chart = System.Drawing.Image.FromStream(sr);

                //Debugging
                //chart.Save("h:\\chartTest" + query + ".bmp");

                sr.Close();
                return convertDrawingImgToWindowImg(chart);

            }
            catch (Exception)
            {
                MessageBox.Show("Error downloading the graph.");
                return null;
            }
        }
开发者ID:akearney,项目名称:Econ-Project,代码行数:33,代码来源:WebInteractor.cs


示例6: Search

        public List<INVITATION> Search(INVITATION Entity, int PageSize, int PageIndex, out int TotalRecords, string OrderExp, Util.SortDirection SortDirection)
        {
            var result = Context.INVITATION.AsQueryable();
            if (Entity != null)
            {
                if (Entity.ID != 0)
                {
                    result = result.Where(b => b.ID == Entity.ID);
                }

                if (Entity.CustomerID.HasValue)
                {
                    result = result.Where(i => i.CustomerID == Entity.CustomerID);
                }

                if (!String.IsNullOrEmpty(Entity.InvitedMail))
                {
                    result = result.Where(i => i.InvitedMail.Contains(Entity.InvitedMail));
                }

                if (Entity.RegistrationDate != null)
                {
                    result = result.Where(i => i.RegistrationDate == (Entity.RegistrationDate));
                }
            }
            TotalRecords = result.Count();

            GenericSorterCaller<INVITATION> sorter = new GenericSorterCaller<INVITATION>();
            result = sorter.Sort(result, string.IsNullOrEmpty(OrderExp) ? DEFAULT_ORDER_EXP : OrderExp, SortDirection);

            // pagination
            return result.Skip(PageIndex * PageSize).Take(PageSize).ToList();
        }
开发者ID:gertgjoka,项目名称:fashion-commerce,代码行数:33,代码来源:InvitationDAO.cs


示例7: SyncServerMessage

        public int SyncServerMessage(Util.DBHelper db)
        {
            var shutdownDoc = db.GetDocument("Server", "Shutdown");
            if (shutdownDoc == null)
            {
                shutdownDoc = db.CreateDocument("Server", "Shutdown",
                    new BsonDocument()
                    {
                        { "Flag", false },
                        { "Message", "" }
                    });
            }
            else
            {
                var flag = shutdownDoc["Flag"].AsBoolean;
                var msg = shutdownDoc["Message"].AsString;

                this.ShutdownFlag = flag;
                this.ShutdownMessage = msg;


                // 메세지가 있고 이전 메세지와 다르면 이벤트 발생
                if (msg.Length > 0 && m_prevShutMsg != msg && this.WhenShutdownMessageChanged != null)
                    this.WhenShutdownMessageChanged(msg, flag);


                m_prevShutMsg = msg;
            }


            return 0;
        }
开发者ID:NeuroWhAI,项目名称:ClickWar,代码行数:32,代码来源:GameMap.cs


示例8: World

 public World(Dictionary<String, Block> bl, String n)
 {
     this.name = n;
        this.blocks = bl;
        this.util = new Util();
        this.xLength = (int)(Game1.graphics.GraphicsDevice.Viewport.Bounds.Width / 32);
        this.yLength = (int)(Game1.graphics.GraphicsDevice.Viewport.Bounds.Height / 32);
 }
开发者ID:patrickfreed,项目名称:SideCraft--Old-,代码行数:8,代码来源:World.cs


示例9: MapDataHeight

        public MapDataHeight(Util.Map.Location map)
        {
            this.map = map;
            this.file = WorldConfig.FILE_HEIGHT;

            byte[] bytes = Load();
            if (bytes!=null) Parse(bytes);
        }
开发者ID:cyanpunk,项目名称:muonline,代码行数:8,代码来源:MapDataHeight.cs


示例10: Button

 public Button(string text, Util.Rect rect, Font font, VisualRectangle vsSelected, VisualRectangle vsUnselected)
 {
     this.font = font;
     this.vsSelected = vsSelected;
     this.vsUnselected = vsUnselected;
     this.rect = rect;
     this.text = text;
 }
开发者ID:lightofanima,项目名称:Polys,代码行数:8,代码来源:Button.cs


示例11: UserControl_Loaded

 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     util = new Util();
     DatabaseConnection dbc = new DatabaseConnection();
     c = dbc.getConnection();
     cmd = c.CreateCommand();
     updatePane();
 }
开发者ID:sijojose210,项目名称:movie-manager-.net,代码行数:8,代码来源:Watched.xaml.cs


示例12: Mention

 public Mention(Util.Span span, Util.Span headSpan, int entityId, IParse parse, string extentType)
 {
     mSpan = span;
     mHeadSpan = headSpan;
     mId = entityId;
     mType = extentType;
     mParse = parse;
 }
开发者ID:ronnyMakhuddin,项目名称:SharperNLP,代码行数:8,代码来源:Mention.cs


示例13: MapTypeInfo

 public MapTypeInfo(Type type, Util.AttributeExtCollection attributes, bool isFwdDeclPossible) {
     if ((type == null) || (attributes == null)) {
         throw new ArgumentException("type and attributes must be != null");
     }
     m_type = type;
     m_attributes = attributes;            
     m_isFwdDeclPossible = isFwdDeclPossible;
 }
开发者ID:JnS-Software-LLC,项目名称:iiop-net,代码行数:8,代码来源:MapTypeInfo.cs


示例14: Process

 public override void Process(Util.Commands.CmdTrigger<ToolCmdArgs> trigger)
 {
     using (var wowFile = new WoWFile(trigger.Text.NextWord()))
     {
         GameObjectTypeExtractor.Extract(wowFile);
     }
     //base.Process(trigger);
 }
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:GODumpCommand.cs


示例15: GetEffect

 protected override Effect GetEffect(Util.FastBitmap source)
 {
     return new ColorTintEffect
     {
         Amount = Amount/100.0,
         RequiredColor = Color
     };
 }
开发者ID:dbre2,项目名称:dynamic-image,代码行数:8,代码来源:ColorTintFilter.cs


示例16: MapDataObjects

        public MapDataObjects(Util.Map.Location map)
        {
            this.map = map;
            this.file = WorldConfig.FILE_OBJECT;

            byte[] bytes = Load();
            if (bytes!=null) Parse(bytes);
        }
开发者ID:cyanpunk,项目名称:muonline,代码行数:8,代码来源:MapDataObjects.cs


示例17: incomeLevel2Str

 public static string incomeLevel2Str(Util.Resource resource, IncomeLevel level)
 {
     switch (level)
     {
         case IncomeLevel.GOOD: return resource.getMsg("good");
         case IncomeLevel.BAD: return resource.getMsg("bad");
         default: return resource.getMsg("good");
     }
 }
开发者ID:lishengtao,项目名称:Anli_Project,代码行数:9,代码来源:TypeConverter.cs


示例18: TableWidget2D

        /// <summary>
        ///	Create Gtk.Table visualising 2D table data.
        /// </summary>
        public TableWidget2D(Util.Coloring coloring, float[] axisX, float[] valuesY, float axisXmin, float axisXmax, float valuesYmin, float valuesYmax)
            : base(coloring, axisX, valuesY, axisXmin, axisXmax, valuesYmin, valuesYmax)
        {
            if (axisX.Length != valuesY.Length)
                throw new ArgumentException ("axisX.Length != valuesY.Length");

            this.cols = DataColLeft + 2 + 1;
            this.rows = this.countX + DataRowTop;
        }
开发者ID:SubaruDieselCrew,项目名称:ScoobyRom,代码行数:12,代码来源:TableWidget2D.cs


示例19: SyncAllRect

        public int SyncAllRect(Util.DBHelper db, Point startIdx, Point endIdx)
        {
            SyncMapSize(db);
            SyncTileRect(db, startIdx, endIdx);
            SyncServerMessage(db);


            return 0;
        }
开发者ID:NeuroWhAI,项目名称:ClickWar,代码行数:9,代码来源:GameMap.cs


示例20: getBoardRectangles

 /**
  * Board GUI Rechtecke beziehen nach Figurpunkten
  */
 public List<Rectangle> getBoardRectangles(Util.Point[] points)
 {
     List<Rectangle> rectangles = new List<Rectangle>();
     foreach (Util.Point point in points)
     {
         rectangles.Add(getRectangleAt(point.X, point.Y));
     }
     return rectangles;
 }
开发者ID:stas-bob,项目名称:Tetris,代码行数:12,代码来源:NormalTetrisView.xaml.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# System.Utils类代码示例发布时间:2022-05-26
下一篇:
C# System.UrlInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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