当前位置: 首页>>代码示例>>C#>>正文


C# PlatformType.ToString方法代码示例

本文整理汇总了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;
        }
开发者ID:mccj,项目名称:FOMS,代码行数:20,代码来源:OrderHelper.cs

示例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;
        }
开发者ID:joeiren,项目名称:quant.AidSystem,代码行数:25,代码来源:MQHandlerSync.cs

示例3: getPlatformFromType

		public IPlatform getPlatformFromType(PlatformType platformType)
		{
			if (!platformDictionary.ContainsKey(platformType))
			{
				throw new Exception("PlatformType : " + platformType.ToString() + " is not defined");
			}

			return platformDictionary[platformType];
		}
开发者ID:smclallen,项目名称:Galactic_Parcel_Service,代码行数:9,代码来源:Platforms.cs

示例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();
            }
        }
开发者ID:Cloud33,项目名称:K2.Tasks-Service,代码行数:25,代码来源:WorkflowClientService.cs

示例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;
        }
开发者ID:joeiren,项目名称:quant.AidSystem,代码行数:17,代码来源:LoadResendLog.cs

示例6: GetInstance

 public static HelperBase GetInstance(PlatformType type)
 {
     return GetInstance(type.ToString());
 }
开发者ID:shoy160,项目名称:Shoy.Common,代码行数:4,代码来源:PlatformFactory.cs

示例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 ();
        */
    }
开发者ID:Gheehnest,项目名称:Windows_Programs,代码行数:49,代码来源:packer.cs


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