本文整理汇总了C#中PlatformType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PlatformType.ToString方法的具体用法?C# PlatformType.ToString怎么用?C# PlatformType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlatformType
的用法示例。
在下文中一共展示了PlatformType.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBuyer
public static int GetBuyer(string BuyerCode, PlatformType platformType)
{
OMS.Core.DoMain.BuyerType bt = OMS.Core.DoMain.BuyerType.find("BuyerCode='" + BuyerCode + "' and PlatformCode ='" + platformType.ToString() + "'").first();
if (bt == null)
{
bt = new Core.DoMain.BuyerType();
//不存在是的操作
bt.BuyerCode = BuyerCode;
bt.PlatformCode = platformType.ToString();
bt.BuyCount++;
bt.insert();
}
else
{
bt.BuyCount++;
bt.update();
}
return bt.Id;
}
示例2: GetMessage
///// <summary>
/////
///// </summary>
///// <returns></returns>
private MQMessage GetMessage(String msgId, Guid id, PlatformType targetSys, bool isSinglePkg, String sourceIP, String definedError)
{
MQMessage msg = new MQMessage();
msg.HeaderUser.UserServiceId.Value = msgId;
msg.HeaderMcd.McdType = MQMessage.MQHeaderMcd.Request;
//msg.HeaderUser.UserBaseDate.Value = DateTimeHelper.NowDateToString;
//msg.HeaderUser.UserServiceId.Value = id.ToString();
msg.HeaderUser.UserServiceStatus.Value = "0";
msg.HeaderUser.UserServiceGuage.Value = "0";
msg.HeaderUser.UserServiceGuageInfo.Value = "";
msg.HeaderUser.UserTaskCode.Value = "";
msg.HeaderUser.UserUserId.Value = "";
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("TARGETSYS", targetSys.ToString()));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("PKGTYPE", isSinglePkg.ToString()));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("GUID", id.ToString()));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("ERROR", definedError));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("IP", sourceIP));
return msg;
}
示例3: getPlatformFromType
public IPlatform getPlatformFromType(PlatformType platformType)
{
if (!platformDictionary.ContainsKey(platformType))
{
throw new Exception("PlatformType : " + platformType.ToString() + " is not defined");
}
return platformDictionary[platformType];
}
示例4: OpenWorklistItem
public WorklistItem OpenWorklistItem(string userName, string shareUser, string sn, PlatformType platform, bool allocated)
{
try
{
ServiceContext context = new ServiceContext();
context.UserName = K2User.ApplySecurityLabel(shareUser);
GetK2OpenConnection(context.UserName);
SourceCode.Workflow.Client.WorklistItem clientItem = null;
if (!string.IsNullOrEmpty(shareUser))
clientItem = conn.OpenSharedWorklistItem(shareUser, string.Empty, sn, platform.ToString(), allocated);
else
clientItem = conn.OpenWorklistItem(sn, platform.ToString(), allocated);
WorklistItem item = ObjectConverter.ConvertToWFWorklistItem(context, clientItem);
return item;
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}
示例5: GetMessage
private MQMessage GetMessage(String msgId, Guid id, PlatformType targetSys, bool isSinglePkg)
{
MQMessage msg = new MQMessage();
msg.HeaderUser.UserServiceId.Value = msgId;
msg.HeaderMcd.McdType = MQMessage.MQHeaderMcd.Request;
msg.HeaderUser.UserServiceStatus.Value = "0";
msg.HeaderUser.UserServiceGuage.Value = "0";
msg.HeaderUser.UserServiceGuageInfo.Value = "";
msg.HeaderUser.UserTaskCode.Value = "";
//msg.HeaderUser.UserUserId.Value = USER_CODE;
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("TARGETSYS", targetSys.ToString()));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("PKGTYPE", isSinglePkg.ToString()));
msg.HeaderUser.UserDefined.Add(new MQParameter<string>("GUID", id.ToString()));
return msg;
}
示例6: GetInstance
public static HelperBase GetInstance(PlatformType type)
{
return GetInstance(type.ToString());
}
示例7: MakeAtlas
private void MakeAtlas(PlatformType pt)
{
Texture2D[] texs = new Texture2D[_tex.Count];
int area = 0;
for(int i =0; i < _tex.Count; i++)
{
texs[i] = _tex[i];
area += (texs[i].width * texs[i].height);
}
int imageSize = Mathf.ClosestPowerOfTwo((int)Mathf.Sqrt((int)(area * 1.15f)));
Texture2D imgAtlas = new Texture2D (0, 0);
AtlasInfo info = new AtlasInfo ();
if(pt == PlatformType.ios)
{
imgAtlas = new Texture2D(imageSize,imageSize,TextureFormat.PVRTC_RGBA4,false);
info = new AtlasInfo( imgAtlas.PackTextures(texs,2,imageSize));
}
else if(pt == PlatformType.android)
{
imgAtlas = new Texture2D(imageSize,imageSize, TextureFormat.ASTC_RGBA_8x8,false);
info = new AtlasInfo( imgAtlas.PackTextures(texs,2,imageSize));
}
else if(pt == PlatformType.pc)
{
imgAtlas = new Texture2D(imageSize,imageSize, TextureFormat.DXT5,false);
info = new AtlasInfo( imgAtlas.PackTextures(texs,2,imageSize));
}
byte[] bytes = imgAtlas.EncodeToPNG();
if(!Directory.Exists(ProcessInfo.Path + "/" + pt.ToString()))
{
Directory.CreateDirectory (ProcessInfo.Path + "/" + pt.ToString());
}
if(File.Exists(ProcessInfo.Path + "/" + pt.ToString() + "/" + ProcessInfo.FileName + ".png"))
{
File.Delete(ProcessInfo.Path + "/" + pt.ToString() + "/" + ProcessInfo.FileName + ".png");
}
File.WriteAllBytes(ProcessInfo.Path + "/" + pt.ToString() + "/" + ProcessInfo.FileName + ".png", bytes);
string infoJSON = JsonConvert.SerializeObject (info);
/*StreamWriter sw = new StreamWriter (ProcessInfo.Path + "/" + pt.ToString() + "/" + ProcessInfo.FileName + ".txt");
sw.Write (infoJSON);
sw.Close ();
*/
}