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

C# InfoType类代码示例

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

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



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

示例1: prettyPrintInfoType

		public static String prettyPrintInfoType(InfoType uglybuggly)
			{
				String res = "None";
				switch (uglybuggly)
				{
				case InfoType.DEFIBRELLATOR: 
					res = "Defibrellator";
					break;
				case InfoType.FIRE_EXTINGUISHER:
					res = "Fire Extinguisher";
					break;
				case InfoType.FIRST_AID_KIT:
					res = "First Aid Kit";
					break;
				case InfoType.OFFICE:
					res = "Office";
					break;
				case InfoType.TOILET:
					res = "Toilet";
					break;
				case InfoType.FOOD:
					res = "Food";
					break;
				case InfoType.LECTURE_ROOM:
					res = "Lecture Room";
					break;	
				default: 
					res = "None";
					break;
				}
				return res;
			}
开发者ID:jiangxianliang,项目名称:SmartCampusAAU,代码行数:32,代码来源:SymbolicLocation.cs


示例2: OnPlayerInfoChanged

	//当主角信息发生改变的时候,会触发这个方法
	void OnPlayerInfoChanged(InfoType type)
	{
		if(type == InfoType.All || type == InfoType.Name || type == InfoType.HeadPortrait || type == InfoType.Level || type == InfoType.Energy || type == InfoType.Toughen)
		{
			UpdateShow();
		}
	}
开发者ID:vin120,项目名称:TaiDou,代码行数:8,代码来源:PlayerBar.cs


示例3: OnPlayerInfoChanged

 void OnPlayerInfoChanged(InfoType type)
 {
     if (type == InfoType.All || type == InfoType.Hp || type == InfoType.Damage || type == InfoType.Exp||type==InfoType.Equip)
     {
         UpdateShow();
     }
 }
开发者ID:1510649869,项目名称:ARPG_project,代码行数:7,代码来源:KnapspackRole.cs


示例4: SignUpInfo

 public SignUpInfo(InfoType type, string subtitle)
 {
     Type = type;
     Subtitle = subtitle;
     Info = new List<int>();
     HidesKeyboard = true;
 }
开发者ID:prozum,项目名称:solitude,代码行数:7,代码来源:SignUpInfo.cs


示例5: GetNextLevelUp

        public static void GetNextLevelUp(ref InfoType infoType, ref int objectID)
        {
            switch (infoType)
            {
                case InfoType.Category:
                    infoType = InfoType.None;
                    break;

                case InfoType.CategoryCity:
                    objectID = InfoDL.FindID(infoType, objectID);
                    infoType = InfoType.Category;
                    break;

                case InfoType.CategoryArea:
                    objectID = InfoDL.FindID(infoType, objectID);
                    infoType = InfoType.CategoryCity;
                    break;

                case InfoType.ContractorCategory:
                    infoType = InfoType.None;
                    break;

                case InfoType.ContractorCategoryCity:
                    objectID = InfoDL.FindID(infoType, objectID);
                    infoType = InfoType.ContractorCategory;
                    break;

                case InfoType.ContractorCategoryArea:
                    objectID = InfoDL.FindID(infoType, objectID);
                    infoType = InfoType.ContractorCategoryCity;
                    break;
            }
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:33,代码来源:InfoTypeDL.cs


示例6: OnPlayerInfoChanged

	void OnPlayerInfoChanged(InfoType type)
	{
		if(type == InfoType.All || type ==InfoType.Coin || type == InfoType .Diamond)
		{
			UpdateShow();
		}
	}
开发者ID:vin120,项目名称:TaiDou,代码行数:7,代码来源:TopBar.cs


示例7: NodeInfo

 /// <param name="name">Element name</param>
 /// <param name="description">Description for current element</param>
 /// <param name="type">Element type</param>
 /// <param name="displaying">Displays element over the 'Name' property</param>
 public NodeInfo(string name, string description, InfoType type = InfoType.Unspecified, string displaying = null)
 {
     Name            = name;
     Description     = description;
     this.type       = type;
     this.displaying = displaying;
 }
开发者ID:hilbertdu,项目名称:vsSolutionBuildEvent,代码行数:11,代码来源:NodeInfo.cs


示例8: GetAddressInfoAsync

        public async Task<ServiceResponse<int>> GetAddressInfoAsync(DistanceMatrixParameters parameters, InfoType info)
        {
            var result = new ServiceResponse<int>()
            {
                Success = false,
                Message = "Failed to get Buration data from service"
            };

            var response = await GetResponseAsync(parameters);

            if (response.Success)
            {
                var json = JsonConvert.DeserializeObject<DistanceMatrixResponse>(response.Value);

                var elem = json.Rows[0].Elements[0];

                var propName = Enum.GetName(typeof(InfoType), (int)info);

                var item = elem.GetType().GetProperty(propName).GetValue(elem);

                var value = item.GetType().GetProperty("Value").GetValue(item);

                result.Value = (int)value;
                result.Success = true;
                result.Message = "";
            }
            else
            {
                throw new Exception(response.Message, new Exception(response.Value));
            }

            return result;
        }
开发者ID:ChenKKaminsky,项目名称:Route-Planner,代码行数:33,代码来源:DistanceMatrixApi.cs


示例9: OnPlayerInfoChanged

	void OnPlayerInfoChanged(InfoType type)
	{
		if(type == InfoType.All)
		{
			UpdateShow();
		}
	}
开发者ID:xiaopan1991,项目名称:TaidouARPGProject,代码行数:7,代码来源:PlayerStatus.cs


示例10: GetInfo

 public String GetInfo(InfoType type)
 {
     return _stream.MediaInfo.GetParameterInfo(_stream.Type,
         _stream.Number,
         _index,
         type);
 }
开发者ID:anelson,项目名称:panoply,代码行数:7,代码来源:Parameter.cs


示例11: infoParsing

        private string infoParsing(string str, InfoType infoType)
        {
            try
            {
                StringBuilder sb = new StringBuilder();

                if (infoType == InfoType.Header)
                {
                    string[] split = str.Split(';');

                    foreach (var item in split)
                    {
                        int equalCount = item.IndexOf('=');

                        if (item != "")
                        {
                            sb.Append(item.Substring(0, equalCount) + ";");
                        }

                    }

                }
                else if (infoType == InfoType.Value)
                {
                    string[] split = str.Split(';');

                    foreach (var item in split)
                    {
                        int equalCount = item.IndexOf('=');

                        if (item != "")
                        {

                            sb.Append(item.Substring(equalCount + 1, item.Length - (equalCount + 1)) + ";");
                        }

                    }
                }
                else if (infoType == InfoType.Header_Value)
                {
                    sb.Append(str);
                }
                else
                {

                }

                return sb.ToString();

            }
            catch (Exception e)
            {
                return "add fail : " + e.Message;
            }
        }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:55,代码来源:Result.cs


示例12: FindID

        public static int FindID(InfoType infoType, int objectID)
        {
            int newID = 0;

            SqlConnection conn = new SqlConnection(BWConfig.ConnectionString);

            string strSQL = "";
            switch (infoType)
            {
                case InfoType.CategoryCity:
                    strSQL = @"SELECT C.CategoryID FROM CategoryCity CC JOIN Category C ON (C.CategoryID = CC.CategoryID) WHERE CC.CategoryCityID = @ID";
                    break;
                case InfoType.CategoryArea:
                    strSQL = @"SELECT CC.CategoryCityID
                                FROM CategoryArea CA
                                    JOIN CategoryCity CC ON (CA.CategoryID = CC.CategoryID)
                                    JOIN Area A ON (CA.AreaID = A.AreaID AND CC.CityID = A.CityID)
                                WHERE CA.CategoryAreaID = @ID";
                    break;
                case InfoType.ContractorCategoryCity:
                    strSQL = @"SELECT CC.ContractorCategoryID
                                FROM ContractorCategoryCity CCC
                                    JOIN ContractorCategory CC ON (CCC.ContractorCategoryID = CC.ContractorCategoryID)
                                WHERE CCC.ContractorCategoryCityID = @ID";
                    break;
                case InfoType.ContractorCategoryArea:
                    strSQL = @"SELECT CCC.contractorCategoryCityID
                                FROM ContractorCategoryArea CCA
                                    JOIN ContractorCategoryCity CCC ON  (CCA.ContractorCategoryID = CCC.ContractorCategoryID)
                                    JOIN Area A ON (CCA.AreaID = A.AreaID AND (CCC.CityID = A.CityID) )
                                WHERE (CCA.ContractorCategoryAreaID = @ID)";
                    break;
            }

            try
            {
                conn.Open();

                SqlCommand sqlCommand = new SqlCommand(strSQL, conn);
                sqlCommand.CommandType = CommandType.Text;
                sqlCommand.Parameters.Add("ID", SqlDbType.Int).Value = objectID;
                newID = Convert.ToInt32(sqlCommand.ExecuteScalar());
            }
            finally
            {
                if (conn != null)
                {
                    if (conn.State == ConnectionState.Open)
                        conn.Close();
                    conn.Dispose();
                }
            }

            return newID;
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:55,代码来源:InfoDL.cs


示例13: GetColumnName

 public static string GetColumnName(InfoType t)
 {
     switch (t)
     {
         case InfoType.Category: return "CategoryID";
         case InfoType.CategoryCity: return "CategoryCityID";
         case InfoType.CategoryArea: return "CategoryAreaID";
         case InfoType.ContractorCategory: return "ContractorCategoryID";
         case InfoType.ContractorCategoryCity: return "ContractorCategoryCityID";
         case InfoType.ContractorCategoryArea: return "ContractorCategoryAreaID";
         default: return "";
     }
 }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:13,代码来源:InfoTypeDL.cs


示例14: Get

 public async Task<IHttpActionResult> Get(InfoType id)
 {
     switch (id)
     {
         case InfoType.LANGUAGE:
             return Ok(await DB.GetUserLanguage(UserId));
         case InfoType.INTEREST:
             return Ok(await DB.GetUserInterest(UserId));
         case InfoType.FOODHABIT:
             return Ok(await DB.GetUserFoodHabit(UserId));
         default:
             return BadRequest("Invalid information type.");
     }
 }
开发者ID:prozum,项目名称:solitude,代码行数:14,代码来源:InfoController.cs


示例15: InfoWindow

 public InfoWindow(string msg, InfoType type = InfoType.Loading)
 {
     InitializeComponent();
     this.infoLabel.Text = msg;
     switch (type)
     {
         case InfoType.Loading:
             infoIcon.Size = new Size(24, 24);
             infoIcon.Image = DTWrapper.GUI.Properties.Resources.loading;
             ImageAnimator.Animate(infoIcon.Image, new EventHandler(this.OnFrameChanged));
             break;
         default:
             infoIcon.Size = new Size(0, 0);
             break;
     }
 }
开发者ID:cyrosy,项目名称:DTWrapper,代码行数:16,代码来源:InfoWindow.cs


示例16: FindInfoRecord

        /// <summary>
        /// Attempts to find the info record associated with the given InfoType and object ID.  The first available match will
        /// be used... area, city, global
        /// </summary>
        /// <returns>
        /// Returns the Info table's DataRow object if an Info record is found
        /// </returns>
        public DataRow FindInfoRecord(InfoType infoType, int objectID, ref InfoLevel infoLevel, ref bool isPrimary)
        {
            InfoType n = infoType;
            string field = "";
            string sql = "";

            // See if this is the primary area
            if (n == InfoType.CategoryArea)
            {
                sql = "SELECT isprimary FROM CategoryArea WHERE (categoryareaid = @ID)";
                object o = Data.ExecuteScalar(sql, new SqlParameter("@ID", objectID));
                if (o != null && o.ToString() != "")
                    isPrimary = (o.ToString().ToLower() == "true");
            }
            else if (n == InfoType.ContractorCategoryArea)
            {
                sql = "SELECT isprimary FROM ContractorCategoryArea WHERE (contractorcategoryareaid = @ID)";
                object o = Data.ExecuteScalar(sql, new SqlParameter("@ID", objectID));
                if (o != null && o.ToString() != "")
                    isPrimary = (o.ToString().ToLower() == "true");
            }

            // Initialize table and field values
            SetField(infoType, ref field);
            while (n != InfoType.None)
            {
                sql = "SELECT * FROM Info, " + n.ToString() + " WHERE (" + field + " = @ID) AND " +
                    "(Info.InfoID = " + n.ToString() + ".InfoID)";
                // There will be no Info record if this is an add
                DataTable dt = Data.ExecuteDataset(sql, new SqlParameter("@ID", objectID)).Tables[0];
                if (dt.Rows.Count == 1)
                    return dt.Rows[0];

                n = RevertInfoType(n, ref objectID, ref infoLevel, ref field);
            }

            return null;
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:45,代码来源:DataAccessHelper.cs


示例17: AttributedObject

        /// <summary>
        /// provides a simple access to an object with its attribute
        /// </summary>
        /// <param name="parentType">the parent type of the object. If the object is not static please use the AttributedObject(object, string, Attribute) constructor.</param>
        /// <param name="objectName">the name of the object</param>
        /// <param name="attribute">the attribute of the object</param>
        public AttributedObject(Type parentType, string objectName, Attribute attribute)
        {
            Attribute = attribute;
            ParentType = parentType;
            ObjectName = objectName;
            _parent = null;

            FieldInfo fieldInfo = parentType.GetField(ObjectName);
            if (fieldInfo != null)
            {
                _infoType = InfoType.FieldInfo;
                IsStatic = fieldInfo.IsStatic;
            }
            else
            {
                PropertyInfo propertyInfo = parentType.GetProperty(ObjectName);
                if (propertyInfo != null)
                {
                    _infoType = InfoType.PropertyInfo;
                    IsStatic = propertyInfo.GetGetMethod().IsStatic;
                }
            }
        }
开发者ID:ChristianHemann,项目名称:ImportantClasses,代码行数:29,代码来源:AttributedObject.cs


示例18: get_underlyingGreekPositionInfo

        public string get_underlyingGreekPositionInfo(int underCount, InfoType infoType)
        {
            try
            {
                string vba_desc = ResultVM_.Excel_greekResultViewModel_.Excel_greekUnderlyingViewModel_[underCount].vba_description_greekPositionCalc(ResultVM_.Notional_);

                return this.infoParsing(vba_desc, infoType);
            }
            catch (Exception e)
            {
                return "not implemented : " + e.Message;
            }
        }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:13,代码来源:Result.cs


示例19: SetField

 /// <summary>
 /// Sets the table and field based on the InfoType
 /// </summary>
 private void SetField(InfoType t, ref string field)
 {
     switch (t)
     {
         case InfoType.Category:
             field = "CategoryID";
             break;
         case InfoType.CategoryCity:
             field = "CategoryCityID";
             break;
         case InfoType.CategoryArea:
             field = "CategoryAreaID";
             break;
         case InfoType.ContractorCategory:
             field = "ContractorCategoryID";
             break;
         case InfoType.ContractorCategoryCity:
             field = "ContractorCategoryCityID";
             break;
         case InfoType.ContractorCategoryArea:
             field = "ContractorCategoryAreaID";
             break;
     }
 }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:27,代码来源:DataAccessHelper.cs


示例20: RevertInfoType

        /// <summary>
        /// Revert the specified InfoType to a higher level and adjust table and field accordingly
        /// </summary>
        private InfoType RevertInfoType(InfoType t, ref int refID, ref InfoLevel infoLevel, ref string field)
        {
            InfoType n = t;

            switch (t)
            {
                case InfoType.Category:
                    n = InfoType.None;
                    break;
                case InfoType.CategoryCity:
                    n = InfoType.Category;
                    infoLevel = InfoLevel.Global;
                    refID = FindRevertedRefID(t, refID);
                    field = "CategoryID";
                    break;
                case InfoType.CategoryArea:
                    n = InfoType.CategoryCity;
                    infoLevel = InfoLevel.City;
                    refID = FindRevertedRefID(t, refID);
                    field = "CategoryCityID";
                    break;

                case InfoType.ContractorCategory:
                    n = InfoType.None;
                    break;
                case InfoType.ContractorCategoryCity:
                    n = InfoType.ContractorCategory;
                    infoLevel = InfoLevel.Global;
                    refID = FindRevertedRefID(t, refID);
                    field = "ContractorCategoryID";
                    break;
                case InfoType.ContractorCategoryArea:
                    n = InfoType.ContractorCategoryCity;
                    infoLevel = InfoLevel.City;
                    refID = FindRevertedRefID(t, refID);
                    field = "ContractorCategoryCityID";
                    break;
            }

            return n;
        }
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:44,代码来源:DataAccessHelper.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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