本文整理汇总了C#中InfoType类的典型用法代码示例。如果您正苦于以下问题:C# InfoType类的具体用法?C# InfoType怎么用?C# InfoType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InfoType类属于命名空间,在下文中一共展示了InfoType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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();
}
}
示例3: OnPlayerInfoChanged
void OnPlayerInfoChanged(InfoType type)
{
if (type == InfoType.All || type == InfoType.Hp || type == InfoType.Damage || type == InfoType.Exp||type==InfoType.Equip)
{
UpdateShow();
}
}
示例4: SignUpInfo
public SignUpInfo(InfoType type, string subtitle)
{
Type = type;
Subtitle = subtitle;
Info = new List<int>();
HidesKeyboard = true;
}
示例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;
}
}
示例6: OnPlayerInfoChanged
void OnPlayerInfoChanged(InfoType type)
{
if(type == InfoType.All || type ==InfoType.Coin || type == InfoType .Diamond)
{
UpdateShow();
}
}
示例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;
}
示例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;
}
示例9: OnPlayerInfoChanged
void OnPlayerInfoChanged(InfoType type)
{
if(type == InfoType.All)
{
UpdateShow();
}
}
示例10: GetInfo
public String GetInfo(InfoType type)
{
return _stream.MediaInfo.GetParameterInfo(_stream.Type,
_stream.Number,
_index,
type);
}
示例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;
}
}
示例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;
}
示例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 "";
}
}
示例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.");
}
}
示例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;
}
}