Exemple #1
0
        public static void LockInventory(Context ctx, IOperationResult oper, string dataSql, string formId)
        {
            //判断是否已有货审信息
            //List<long> lstIds = new List<long>();

            oper.IsSuccess = true;
            string sql = string.Format(@" select ts.*,isnull(tk.FID,'') as FINVENTORYID
                                        from ( {0} ) ts
                                        LEFT JOIN T_STK_INVENTORY tk on ts.FSTOCKORGID=tk.FSTOCKORGID and tk.FKEEPERTYPEID=ts.FKEEPERTYPEID and tk.FKEEPERID=ts.FKEEPERID
                                        and tk.FOWNERTYPEID=ts.FOWNERTYPEID and tk.FOWNERID=ts.FOWNERID and tk.FSTOCKID=ts.FSTOCKID and tk.FSTOCKLOCID=ts.FSTOCKPLACEID and tk.FAUXPROPID=ts.FAUXPROPERTYID 
                                        and tk.FSTOCKSTATUSID=ts.FSTOCKSTATUSID and tk.FLOT=ts.FLOT and tk.FBOMID=ts.FBOMID and tk.FMTONO=ts.FMTONO and tk.FPROJECTNO=ts.FPROJECTNO                                      
                                        and ISNULL(tk.FPRODUCEDATE, ISNULL(ts.FPRODUCTDATE,'')) = ISNULL(ts.FPRODUCTDATE,'') and ISNULL(tk.FEXPIRYDATE, ISNULL(ts.FVALIDATETO,'')) = ISNULL(ts.FVALIDATETO,'')  
                                        and tk.FBASEUNITID=ts.FBASEUNITID and tk.FSECUNITID=ts.FSECUNITID and tk.FMATERIALID=ts.FMATERIALID 
                                        inner join T_BD_MATERIALSTOCK MS on MS.FMATERIALID=ts.FMATERIALID and MS.FIsLockStock='1'
                                        inner join T_BD_STOCK TSK on TSK.FSTOCKID=ts.FSTOCKID AND TSK.FALLOWLOCK='1'
                                        where NOT EXISTS (SELECT 1 FROM T_PLN_RESERVELINKENTRY TKE 
                                        inner join T_PLN_RESERVELINK TKH on TKE.FID = TKH.FID WHERE TKE.FSUPPLYINTERID<>'' AND 
										TKH.FDEMANDFORMID='{1}' AND TKH.FDEMANDINTERID=ts.FID AND TKH.FDEMANDENTRYID=ts.FENTRYID )
                                ", string.Join(",", dataSql), formId);

            //配方单特殊处理
            if (formId == "PRD_PPBOM")
            {
                sql = dataSql;
            }
            DynamicObjectCollection dyLockInfo = DBUtils.ExecuteDynamicObject(ctx, sql);

            if (dyLockInfo == null || dyLockInfo.Count == 0)
            {
                return;
            }
            List <LockStockArgs> saveList = new List <LockStockArgs>();


            foreach (DynamicObject dynEntry in dyLockInfo)
            {
                if (Convert.ToString(dynEntry["FINVENTORYID"]).IsNullOrEmptyOrWhiteSpace())
                {
                    oper.ValidationErrors.Add(new ValidationErrorInfo("", Convert.ToString(dynEntry["FENTRYID"]), 1, 1, Convert.ToString(dynEntry["FENTRYID"]), "单据" + dynEntry["FBillNo"].ToString() + " 第" + Convert.ToString(dynEntry["FSeq"]) + "行物料库存不足,锁库失败!", ""));

                    continue;
                }

                LockStockArgs item = new LockStockArgs
                {
                    //ObjectId = this.objectId,
                    //BillId-单据头ID
                    ObjectId = formId,
                    BillId   = Convert.ToString(dynEntry["FID"]),
                    //BillDetailID-单据体ID
                    BillDetailID = Convert.ToString(dynEntry["FENTRYID"]),
                    //EntiryKey = this.entiryKey,
                    BillNo           = dynEntry["FBILLNO"].ToString(),
                    BillSEQ          = Convert.ToInt32(dynEntry["FSEQ"]),
                    BillTypeID       = string.Empty,
                    DemandOrgId      = 0,
                    DemandMaterialId = Convert.ToInt64(dynEntry["FMATERIALID"]),
                    StockOrgID       = Convert.ToInt64(dynEntry["FSTOCKORGID"]),
                    MaterialID       = Convert.ToInt64(dynEntry["FMATERIALID"]),
                    STOCKID          = Convert.ToInt64(dynEntry["FSTOCKID"]),
                    LockQty          = Convert.ToDecimal(dynEntry["FQTY"]),
                    Qty            = Convert.ToDecimal(dynEntry["FQTY"]),
                    LockBaseQty    = Convert.ToDecimal(dynEntry["FBASEQTY"]),
                    BaseQty        = Convert.ToDecimal(dynEntry["FBASEQTY"]),
                    UnitID         = Convert.ToInt64(dynEntry["FUNITID"]),
                    LockSecQty     = Convert.ToDecimal(dynEntry["FSECQTY"]),
                    SecQty         = Convert.ToDecimal(dynEntry["FSECQTY"]),
                    DemandPriority = "",
                    FInvDetailID   = Convert.ToString(dynEntry["FINVENTORYID"]),
                    AuxPropId      = Convert.ToInt64(dynEntry["FAUXPROPERTYID"]),
                    BOMID          = Convert.ToInt64(dynEntry["FBOMID"]),
                    KeeperID       = Convert.ToInt64(dynEntry["FKEEPERID"]),
                    KeeperTypeID   = Convert.ToString(dynEntry["FKEEPERTYPEID"]),
                    Lot            = Convert.ToInt64(dynEntry["FLOT"]),
                    MtoNo          = Convert.ToString(dynEntry["FMTONO"]),
                    StockStatusID  = Convert.ToInt64(dynEntry["FSTOCKSTATUSID"]),
                    StockLocID     = Convert.ToInt64(dynEntry["FSTOCKPLACEID"]),
                    SecUnitID      = Convert.ToInt64(dynEntry["FSECUNITID"]),
                    ProjectNo      = Convert.ToString(dynEntry["FPROJECTNO"]),
                    OwnerTypeID    = Convert.ToString(dynEntry["FOWNERTYPEID"]),
                    OwnerID        = Convert.ToInt64(dynEntry["FOWNERID"]),
                    BaseUnitID     = Convert.ToInt64(dynEntry["FBASEUNITID"]),
                    ProduceDate    = Convert.ToDateTime(dynEntry["FPRODUCTDATE"]),
                    ExpiryDate     = Convert.ToDateTime(dynEntry["FVALIDATETO"])
                };
                saveList.Add(item);
            }


            if (saveList.Count > 0)
            {
                DynamicObjectCollection objectResult = Kingdee.K3.SCM.Contracts.ServiceFactory.GetService <IStockLockService>(ctx).SaveLockInfo(ctx, saveList, formId, true);

                if (objectResult.Count > 0)
                {
                    IEnumerable <string> values = (from p in objectResult select string.Format(ResManager.LoadKDString("分录[{1}]不完全锁库(获取锁库不成功!)]原因:{2}", "004072030006502", SubSystemType.SCM, new object[0]), p["FBIZBILLNO"], p["FBILLSEQ"], p["FRESULT"])).Distinct <string>();
                    oper.IsSuccess = false;
                    oper.ValidationErrors.Add(new ValidationErrorInfo("", "", 1, 1, "1", string.Join("\n", values), ""));
                }
                if (!oper.IsSuccess && oper.ValidationErrors.Count > 0)
                {
                    throw new Exception(oper.ValidationErrors[0].Message);
                }
            }
        }
 public AccountManagerValidatior(ApplicationDbContext context, ResManager resManager) : base(context, resManager)
 {
 }
Exemple #3
0
 public override void Validate(ExtendedDataEntity[] dataEntities, ValidateContext validateContext, Context ctx)
 {
     if ((dataEntities != null) && (dataEntities.Length > 0))
     {
         List <string> sampleIdList            = (from entity in dataEntities.ToList <ExtendedDataEntity>() select entity.DataEntity["Id"].ToString()).ToList <string>();
         IDictionary <string, bool> dictionary = new DistributeService().CheckIsSampleDistributed(base.Context, sampleIdList, "");
         foreach (ExtendedDataEntity entity in dataEntities)
         {
             string key  = entity.DataEntity["Id"].ToString();
             string str2 = entity.DataEntity["NUMBER"].ToString();
             if (dictionary.ContainsKey(key) && dictionary[key])
             {
                 validateContext.AddError(entity, new ValidationErrorInfo("Number", "ID", entity.DataEntityIndex, 0, Convert.ToString(entity["ID"]), ResManager.LoadKDString("该模板已经被预算方案引用,不能删除!", "0032056000020512", SubSystemType.FIN, new object[0]), ResManager.LoadKDString("删除:", "0032056000020565", SubSystemType.FIN, new object[0]) + str2, ErrorLevel.Error));
             }
         }
     }
 }
Exemple #4
0
    /// <summary>
    /// 小华拿出我要字卡
    /// </summary>
    void WyXhZka()
    {
        GameObject k = transform.Find("MM_F_4TH_DBY_KA").gameObject;

        if (k != null)
        {
            Destroy(k);
        }

        MM.PlayForward("idle");
        UIManager.Instance.GetUI <Dialog>("Dialog").Show(false);

        List <int> indexList = new List <int> {
            0, 2, 3
        };
        int           index = SentenceExpressionModel.GetInstance().GetIndex(indexList);
        PropsObject   pObj  = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <PropsObject>(); //强化物
        Reinforcement rfc   = new Reinforcement(pObj.pData);                                                    //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                                           //设置强化物
        Debug.Log("GetTukaObject  " + rfc.pData.name);


        XH.transitionTime = 0;
        //XH.Complete += XHTZkaCallback;
        XH.PlayForward("XH_F_4TH_FNN");
        bool pass = true;

        XH.timePointEvent = (a) =>//
        {
            if (a > 613 && a < 617 && pass)
            {
                pass = false;
                XH.timePointEvent = null;
                XH.OnPause();

                WyXhZkaCallback();//mm高亮
            }
        };

        GameObject kaa = transform.Find("XH_F_4TH_FNN_KA").gameObject;

        if (kaa != null)
        {
            DestroyImmediate(kaa);
        }
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/XH_F_4TH_FNN_KA");

        ka.name = "XH_F_4TH_FNN_KA";
        ka.transform.SetParent(transform);
        //ka.name = "XH_F_4TH_FNN_KA";
        //ka.transform.SetParent(transform);

        //我要
        Material matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_02/tuka5").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_woyao.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk10 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka10");

        tk10.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk10.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_03/tuka7").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetTuKa("tuka_" + rfc.pData.name).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk9 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka9");

        tk9.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk9.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        Transform tk8  = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/tuka8");
        Material  mat8 = tk8.GetComponent <MeshRenderer>().materials[1];

        mat8.CopyPropertiesFromMaterial(matSource);

        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();
        bool kpass = true;

        lao.framePointEvent = (a) =>
        {
            if (a >= 613 && a <= 617 && kpass)
            {
                kpass = false;
                lao.framePointEvent = null;
                lao.OnPause();
            }
        };
        //Debug.LogError("ka");
        lao.PlayForward("XH_F_4TH_FNN_KA");
    }
        /// <summary>
        /// Creates and initializes window UI.
        /// </summary>
        private void InitUI()
        {
            this.ClientSize = new Size(392,323);
            this.MinimumSize = new Size(400,350);
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "Add/Edit Mailing List";

            //--- Common UI ----------------------------------//
            m_pTab = new TabControl();
            m_pTab.Size = new Size(393,280);
            m_pTab.Location = new Point(0,5);
            m_pTab.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            m_pTab.TabPages.Add(new TabPage("General"));
            m_pTab.TabPages.Add(new TabPage("Members"));
            m_pTab.TabPages.Add(new TabPage("Access"));

            m_pGroupBox1 = new GroupBox();
            m_pGroupBox1.Size = new Size(385,4);
            m_pGroupBox1.Location = new Point(5,290);
            m_pGroupBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;

            m_pCancel = new Button();
            m_pCancel.Size = new Size(70,20);
            m_pCancel.Location = new Point(245,300);
            m_pCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
            m_pCancel.Text = "Cancel";
            m_pCancel.Click += new EventHandler(m_pCancel_Click);

            m_pOk = new Button();
            m_pOk.Size = new Size(70,20);
            m_pOk.Location = new Point(320,300);
            m_pOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
            m_pOk.Text = "Ok";
            m_pOk.Click += new EventHandler(m_pOk_Click);

            this.Controls.Add(m_pTab);
            this.Controls.Add(m_pGroupBox1);
            this.Controls.Add(m_pCancel);
            this.Controls.Add(m_pOk);
            //-----------------------------------------------//

            //--- General tab UI ----------------------------//
            mt_MailingListName = new Label();
            mt_MailingListName.Size = new Size(200,13);
            mt_MailingListName.Location = new Point(5,10);
            mt_MailingListName.Text = "Name:";

            m_pMailingListName = new TextBox();
            m_pMailingListName.Size = new Size(190,20);
            m_pMailingListName.Location = new Point(5,25);

            mt_At = new Label();
            mt_At.Size = new Size(13,13);
            mt_At.Location = new Point(195,28);
            mt_At.Text = "@";

            m_pDomains = new ComboBox();
            m_pDomains.Size = new Size(170,20);
            m_pDomains.Location = new Point(210,25);
            m_pDomains.DropDownStyle = ComboBoxStyle.DropDownList;

            mt_Description = new Label();
            mt_Description.Size = new Size(200,13);
            mt_Description.Location = new Point(5,55);
            mt_Description.Text = "Description:";

            m_pDescription = new TextBox();
            m_pDescription.Size = new Size(375,20);
            m_pDescription.Location = new Point(5,70);
                        
            m_pEnabled = new CheckBox();
            m_pEnabled.Size = new Size(265,13);
            m_pEnabled.Location = new Point(5,105);
            m_pEnabled.Checked = true;
            m_pEnabled.Text = "Enabled";

            m_pTab.TabPages[0].Controls.Add(mt_MailingListName);
            m_pTab.TabPages[0].Controls.Add(m_pMailingListName);
            m_pTab.TabPages[0].Controls.Add(mt_At);
            m_pTab.TabPages[0].Controls.Add(m_pDomains);
            m_pTab.TabPages[0].Controls.Add(mt_Description);
            m_pTab.TabPages[0].Controls.Add(m_pDescription);
            m_pTab.TabPages[0].Controls.Add(m_pEnabled);
            //-----------------------------------------------//  
        
            //--- Members tab UI ----------------------------//
            mt_Member = new Label();          
            mt_Member.Size = new Size(50,13);
            mt_Member.Location = new Point(5,22);
            mt_Member.TextAlign = ContentAlignment.MiddleRight;
            mt_Member.Text = "Member:";

            m_pMember = new TextBox();            
            m_pMember.Size = new Size(215,20);
            m_pMember.Location = new Point(65,20);

            m_pGetUserOrGroup = new Button();                 
            m_pGetUserOrGroup.Size = new Size(20,20);
            m_pGetUserOrGroup.Location = new Point(285,20);
            m_pGetUserOrGroup.Image = ResManager.GetIcon("group.ico").ToBitmap();
            m_pGetUserOrGroup.Click += new EventHandler(m_pGetUserOrGroup_Click);
            
            m_pMembers = new ListView();
            m_pMembers.Size = new Size(300,200);
            m_pMembers.Location = new Point(5,45);
            m_pMembers.View = View.List;
            m_pMembers.FullRowSelect = true;
            m_pMembers.HideSelection = false;
            m_pMembers.SelectedIndexChanged += new EventHandler(m_pMembers_SelectedIndexChanged);
               
            m_pMembers_Add = new Button();
            m_pMembers_Add.Size = new Size(70,20);
            m_pMembers_Add.Location = new Point(310,20);
            m_pMembers_Add.Text = "Add";
            m_pMembers_Add.Click += new EventHandler(m_pMembers_Add_Click);

            m_pMembers_Remove = new Button();
            m_pMembers_Remove.Size = new Size(70,20);
            m_pMembers_Remove.Location = new Point(310,45);
            m_pMembers_Remove.Text = "Remove";
            m_pMembers_Remove.Click += new EventHandler(m_pMembers_Remove_Click);

            m_pTab.TabPages[1].Controls.Add(mt_Member);
            m_pTab.TabPages[1].Controls.Add(m_pMember);
            m_pTab.TabPages[1].Controls.Add(m_pGetUserOrGroup);
            m_pTab.TabPages[1].Controls.Add(m_pMembers);
            m_pTab.TabPages[1].Controls.Add(m_pMembers_Add);
            m_pTab.TabPages[1].Controls.Add(m_pMembers_Remove);
            //-----------------------------------------------//

            //--- Access tab UI -----------------------------//
            m_pAccessImages = new ImageList();
            m_pAccessImages.Images.Add(ResManager.GetIcon("user.ico"));
            m_pAccessImages.Images.Add(ResManager.GetIcon("group.ico"));

            m_pAccess = new ListView();
            m_pAccess.Size = new Size(300,220);
            m_pAccess.Location = new Point(5,20);
            m_pAccess.View = View.List;
            m_pAccess.FullRowSelect = true;
            m_pAccess.HideSelection = false;
            m_pAccess.SmallImageList = m_pAccessImages;
            m_pAccess.SelectedIndexChanged += new EventHandler(m_pAccess_SelectedIndexChanged);

            m_pAccess_Add = new Button();
            m_pAccess_Add.Size = new Size(70,20);
            m_pAccess_Add.Location = new Point(310,20);
            m_pAccess_Add.Text = "Add";
            m_pAccess_Add.Click += new EventHandler(m_pAccess_Add_Click);

            m_pAccess_Remove = new Button();
            m_pAccess_Remove.Size = new Size(70,20);
            m_pAccess_Remove.Location = new Point(310,45);
            m_pAccess_Remove.Text = "Remove";
            m_pAccess_Remove.Click += new EventHandler(m_pAccess_Remove_Click);

            m_pTab.TabPages[2].Controls.Add(m_pAccess);
            m_pTab.TabPages[2].Controls.Add(m_pAccess_Add);
            m_pTab.TabPages[2].Controls.Add(m_pAccess_Remove);
            //-----------------------------------------------//
        }
        private string ReturnPriodName(int periodYear, int Period, int PeriodType, int LCID)
        {
            string str = string.Empty;

            switch (PeriodType)
            {
            case 0:
                if (LCID != 0)
                {
                    return(string.Format("{0}Y", periodYear));
                }
                return(string.Format(ResManager.LoadKDString("{0}年", "0032060000019092", SubSystemType.FIN, new object[0]), periodYear));

            case 1:
                if (LCID != 0)
                {
                    return(string.Format("0{0}HY", Period));
                }
                if (Period != 1)
                {
                    return(ResManager.LoadKDString("下半年", "0032060000019091", SubSystemType.FIN, new object[0]));
                }
                return(ResManager.LoadKDString("上半年", "0032060000019086", SubSystemType.FIN, new object[0]));

            case 2:
                if (LCID != 0)
                {
                    return(string.Format("0{0}Q", Period));
                }
                return(string.Format(ResManager.LoadKDString("0{0}季", "0032060000019087", SubSystemType.FIN, new object[0]), Period));

            case 3:
                if (LCID != 0)
                {
                    return(string.Format("{0}M", (Period == 0) ? 12 : Period));
                }
                return(string.Format(ResManager.LoadKDString("{0}月", "0032060000019088", SubSystemType.FIN, new object[0]), (Period == 0) ? 12 : Period));

            case 4:
                if (LCID != 0)
                {
                    return(string.Format("{0}X", Period));
                }
                return(Enum.GetName(typeof(TenDayType), Period));

            case 5:
                if (LCID != 0)
                {
                    return(string.Format("{0}W", Period));
                }
                return(string.Format(ResManager.LoadKDString("{0}周", "0032060000019089", SubSystemType.FIN, new object[0]), Period));

            case 6:
                if (LCID != 0)
                {
                    return(string.Format("{0}D", Period));
                }
                return(string.Format(ResManager.LoadKDString("{0}日", "0032060000019090", SubSystemType.FIN, new object[0]), Period));
            }
            return(str);
        }
    IEnumerator PreStartCheck()
    {
        if (GLog.IsLogInfoEnabled)
        {
            GLog.LogInfo("PreStartCheck run 0");
        }
        string ready = LuaEvent.TrigClrEvent <string>("SDK_READY_TO_START");

        if (GLog.IsLogInfoEnabled)
        {
            GLog.LogInfo("PreStartCheck run 1");
        }
        if (!string.IsNullOrEmpty(ready))
        {
            if (GLog.IsLogInfoEnabled)
            {
                GLog.LogInfo("PreStartCheck run 2");
            }
            while (ready != "ready")
            {
                yield return(null);

                if (GLog.IsLogInfoEnabled)
                {
                    GLog.LogInfo("PreStartCheck run 3");
                }
                ready = LuaEvent.TrigClrEvent <string>("SDK_READY_TO_START");
            }
        }

#if EFUN_SDK_EN || EFUN_SDK_TW
        // obb
        ResManager.Init();
#endif

        if (GLog.IsLogInfoEnabled)
        {
            GLog.LogInfo("PreStartCheck run 4");
        }
        var workpending = ResManager.MovePendingUpdate(LoadingReport);
        if (workpending != null)
        {
            while (workpending.MoveNext())
            {
                yield return(workpending.Current);

                if (GLog.IsLogInfoEnabled)
                {
                    GLog.LogInfo("PreStartCheck run 5");
                }
            }
        }

#if UNITY_EDITOR && !USE_CLIENT_RES_MANAGER
        ResManager.RecordCacheVersion("editor", int.MaxValue);
#else
        IEnumerator work = null;
        try
        {
            SetLoadingPhaseAmount(3);
            SetLoadingPhase(0);
            work = ResManager.DecompressScriptBundle("default", LoadingReport);
        }
        catch (Exception e)
        {
            if (GLog.IsLogErrorEnabled)
            {
                GLog.LogException(e);
            }
            LoadingReportError();
            yield break;
        }
        if (work != null)
        {
            while (true)
            {
                try
                {
                    if (!work.MoveNext())
                    {
                        break;
                    }
                }
                catch (Exception e)
                {
                    if (GLog.IsLogErrorEnabled)
                    {
                        GLog.LogException(e);
                    }
                    LoadingReportError();
                    yield break;
                }
                yield return(work.Current);
            }
        }
        foreach (var flag in ResManager.GetDistributeFlags())
        {
            try
            {
                //SetLoadingPhase(loadingPhase + 1);
                work = ResManager.DecompressScriptBundle("distribute/" + flag, LoadingReport);
            }
            catch (Exception e)
            {
                if (GLog.IsLogErrorEnabled)
                {
                    GLog.LogException(e);
                }
                LoadingReportError();
                yield break;
            }
            if (work != null)
            {
                while (true)
                {
                    try
                    {
                        if (!work.MoveNext())
                        {
                            break;
                        }
                    }
                    catch (Exception e)
                    {
                        if (GLog.IsLogErrorEnabled)
                        {
                            GLog.LogException(e);
                        }
                        LoadingReportError();
                        yield break;
                    }
                    yield return(work.Current);
                }
            }
        }
        try
        {
            SetLoadingPhase(loadingPhase + 1);
            work = ResManager.UpdateResourceBundleLocalAll(LoadingReport);
        }
        catch (Exception e)
        {
            if (GLog.IsLogErrorEnabled)
            {
                GLog.LogException(e);
            }
            LoadingReportError();
            yield break;
        }
        if (work != null)
        {
            while (true)
            {
                try
                {
                    if (!work.MoveNext())
                    {
                        break;
                    }
                }
                catch (Exception e)
                {
                    if (GLog.IsLogErrorEnabled)
                    {
                        GLog.LogException(e);
                    }
                    LoadingReportError();
                    yield break;
                }
                yield return(work.Current);
            }
        }
        try
        {
            SetLoadingPhase(loadingPhase + 1);
            work = ResManager.SplitResIndexAsyncAll(LoadingReport);
        }
        catch (Exception e)
        {
            if (GLog.IsLogErrorEnabled)
            {
                GLog.LogException(e);
            }
            LoadingReportError();
            yield break;
        }
        if (work != null)
        {
            while (true)
            {
                try
                {
                    if (!work.MoveNext())
                    {
                        break;
                    }
                }
                catch (Exception e)
                {
                    if (GLog.IsLogErrorEnabled)
                    {
                        GLog.LogException(e);
                    }
                    LoadingReportError();
                    yield break;
                }
                yield return(work.Current);
            }
        }
        yield return(new WaitForEndOfFrame());

        if (ResManager.TryGetAssetDesc("Assets/CapstonesRes/Common/Fonts/CapstonesPlaceHolder.otf") != null)
        {
            ResManager.MarkPermanent("Assets/CapstonesRes/Common/Fonts/DistributeFontInfo.fi.txt");
            ResManager.MarkPermanent("Assets/CapstonesRes/Common/Fonts/CapstonesPlaceHolder.otf");
            ResManager.LoadRes("Assets/CapstonesRes/Common/Fonts/DistributeFontInfo.fi.txt");
            ResManager.LoadRes("Assets/CapstonesRes/Common/Fonts/CapstonesPlaceHolder.otf");
        }
#endif

        LoadingReport("WaitForBiReport", null);
        yield return(new WaitForEndOfFrame());

        try
        {
            //ResManager.UnloadAllRes();
            GC.Collect();
            //GC.WaitForPendingFinalizers();
        }
        catch (Exception e)
        {
            if (GLog.IsLogErrorEnabled)
            {
                GLog.LogException(e);
            }
            LoadingReportError();
            yield break;
        }

        //LuaBehaviour.luaEnv.DoString("require 'main'");
        UnityEngine.SceneManagement.SceneManager.LoadScene("DemoEntry");

        yield break;
    }
Exemple #8
0
 void OnDestroy()
 {
     ResManager.ClearMahjongPaiPool();
 }
        private bool RunLogic(IList <T_LogicStep> steps, out String msg)
        {
            msg = null;
            var seque_root = Sequence.create();
            var seque      = Sequence.create();
            var resmanager = ResManager.getInstance();
            var generater  = ActionGenerater.getInstance();
            int loop_times = 0;

            foreach (var step in steps)
            {
                switch (step.StepEnum)
                {
                case LogicStepEnum.Alert:
                    seque.AddAction(SkCallBackFun.create((ActionBase act_tem) =>
                    {
                        ErrorSystem.WriteActError(step.Parameters, true, false, 9999);
                        return(true);
                    }));
                    break;

                case LogicStepEnum.InitAll:
                    var act_init = opDevice.InitAllDevice();
                    seque.AddAction(act_init);
                    break;

                case LogicStepEnum.Centrifuge:
                {
                    CommonAction action = Convert2T <CommonAction>(step.Parameters);
                    var          cen    = cenMrg.GetCentrifugeByCode(action.Code);
                    if (cen != null)
                    {
                        if (action.DoAction == 0)        //正常离心程序
                        {
                            int hspeed  = (int)cen.Centrifugem.HightSpeed.SetValue;
                            int lspeed  = (int)cen.Centrifugem.LowSpeed.SetValue;
                            int htime   = (int)cen.Centrifugem.HightSpeedTime.SetValue;
                            int ltime   = (int)cen.Centrifugem.LowSpeedTime.SetValue;
                            int uphtime = (int)cen.Centrifugem.AddHSpeedTime.SetValue;
                            int upltime = (int)cen.Centrifugem.AddLSpeedTime.SetValue;
                            int stime   = (int)cen.Centrifugem.StopSpeedTime.SetValue;
                            var act     = CentrifugeStart.create(cen, 3000000, hspeed, lspeed, htime, ltime, uphtime, upltime, stime);
                            seque.AddAction(act);
                        }
                        else if (action.DoAction == 1)        //移动指定卡位
                        {
                            var resinfo = ResManager.getInstance().SearchGelCard("T_BJ_Centrifuge", action.Code, "", (int)action.SeatIndex);
                            var act     = MoveTo.create(cen, 30000, -1, -1, resinfo.CenGelP[resinfo.CountX], 5);
                            seque.AddAction(act);
                        }
                        else if (action.DoAction == 2)        //开舱门
                        {
                            var act = HandOpenCloseDoor.create(handDevice, 3000, action.Code, true);
                            seque.AddAction(act);
                        }
                        else if (action.DoAction == 3)        //关舱门
                        {
                            var act = HandOpenCloseDoor.create(handDevice, 3000, action.Code, false);
                            seque.AddAction(act);
                        }
                        else if (action.DoAction == 4)        //初始化
                        {
                            var act = InitXyz.create(cen, 3000, false, false, true);
                            seque.AddAction(act);
                        }
                    }
                    else
                    {
                        ErrorSystem.WriteActError("找不到指定离心机", true, false, 9999);
                    }
                }
                break;

                case LogicStepEnum.Couveuse:
                {
                }
                break;

                case LogicStepEnum.Delay:
                {
                    int DelayTime = Convert.ToInt32(step.Parameters);
                    seque.AddAction(SKSleep.create(DelayTime));
                }
                break;

                case LogicStepEnum.DetectSquid:
                {
                    DetectAction      action   = Convert2T <DetectAction>(step.Parameters);
                    List <Enterclose> iinjects = new List <Enterclose>();
                    foreach (var entindex in action.Indexs)
                    {
                        iinjects.Add(injDevice.Injector.Entercloses[entindex]);
                    }
                    seque.AddAction(InjectDetector.create(3000, iinjects.ToArray(), IMask.Gen((int)action.Start), IMask.Gen((int)action.ZLimit), IMask.Gen(0)));
                }
                break;

                case LogicStepEnum.SimpleAction:
                {
                    SimpleAction      action = Convert2T <SimpleAction>(step.Parameters);
                    AbstractCanDevice device = null;
                    switch (action.Device)
                    {
                    case "加样器":
                        device = injDevice;
                        break;

                    case "机械手":
                        device = handDevice;
                        break;

                    case "卡仓":
                        device = gelwareDevice;
                        break;

                    case "破孔器":
                        device = gelwareDevice;
                        break;
                    }
                    if (action.Action == "移动")
                    {
                        ActionBase act_move = null;
                        int        x        = action.Direction == "X" ? (int)action.Value : -1;
                        int        y        = action.Direction == "Y" ? (int)action.Value : -1;
                        int        z        = action.Direction == "Z"? (int)action.Value:-1;
                        if (action.Direction == "XYZ")
                        {
                            x = y = z = (int)action.Value;
                        }
                        if (device is InjectorDevice)
                        {
                            act_move = InjectMoveTo.create(device, 3000, injDevice.Injector.Entercloses, x, IMask.Gen(y), IMask.Gen(z));
                        }
                        else
                        {
                            act_move = MoveTo.create(device, 3000, x, y, z);
                        }
                        seque.AddAction(act_move);
                    }
                    else if (action.Action == "初始化")
                    {
                        ActionBase act_move = null;
                        bool       x        = action.Direction == "X" ? true : false;
                        bool       y        = action.Direction == "Y" ? true : false;
                        bool       z        = action.Direction == "Z" ? true : false;
                        if (action.Direction == "XYZ")
                        {
                            x = y = z = true;
                        }
                        if (device is InjectorDevice)
                        {
                            act_move = InitXyz.create(device, 30000, injDevice.Injector.Entercloses, x, y, z);
                        }
                        else
                        {
                            act_move = InitXyz.create(device, 30000, x, y, z);
                        }
                        seque.AddAction(act_move);
                    }
                }
                break;

                case LogicStepEnum.TakeAndPutDownGel:
                {
                    GelAction[] actions = Convert2T <GelAction[]>(step.Parameters);
                    seque.AddAction(MoveTo.create(handDevice, 3000, -1, -1, 0));
                    ResInfoData take_seat = null;
                    if (actions[0].BJType == "T_BJ_GelSeat")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_GelSeat", "", "", actions[0].Index, 0, true, actions[0].BJName);
                        generater.GenerateTakeGelFromNormal(take_seat, ref seque);
                    }
                    else if (actions[0].BJType == "T_BJ_Centrifuge")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_Centrifuge", "", "", actions[0].Index, 0, true, actions[0].BJName);
                        var act = generater.GenerateTakeGelFromCent(take_seat, "", ref seque);
                    }
                    else if (actions[0].BJType == "T_BJ_GelWarehouse")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_GelWarehouse", "", "", actions[0].Index, 0, true, actions[0].BJName);
                        var act = generater.GenerateTakeGelFromWare(take_seat, ref seque);
                    }

                    if (actions[1].BJType == "T_BJ_GelSeat")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_GelSeat", "", "", actions[1].Index, 0, true, actions[1].BJName);
                        generater.GeneratePutGelToNormal(put_seat, take_seat, ref seque);
                    }
                    else if (actions[1].BJType == "T_BJ_Centrifuge")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_Centrifuge", "", "", actions[1].Index, 0, true, actions[1].BJName);
                        generater.GeneratePutGelToCent(put_seat.CenCode, put_seat, take_seat, ref seque);
                    }
                    else if (actions[1].BJType == "T_BJ_GelWarehouse")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_GelWarehouse", "", "", actions[1].Index, 0, true, actions[1].BJName);
                        generater.GeneratePutGelToWare(put_seat, take_seat, ref seque);
                    }
                }
                break;

                case LogicStepEnum.TakeGel:
                {
                    GelAction   action    = Convert2T <GelAction>(step.Parameters);
                    ResInfoData take_seat = null;
                    if (action.BJType == "T_BJ_GelSeat")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_GelSeat", "", "", action.Index, 0, true, action.BJName);
                        generater.GenerateTakeGelFromNormal(take_seat, ref seque);
                    }
                    else if (action.BJType == "T_BJ_Centrifuge")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_Centrifuge", "", "", action.Index, 0, true, action.BJName);
                        var act = generater.GenerateTakeGelFromCent(take_seat, "", ref seque);
                    }
                    else if (action.BJType == "T_BJ_GelWarehouse")
                    {
                        take_seat = resmanager.SearchGelCard("T_BJ_GelWarehouse", "", "", action.Index, 0, true, action.BJName);
                        var act = generater.GenerateTakeGelFromWare(take_seat, ref seque);
                    }
                    break;
                }

                case LogicStepEnum.PutDownGel:
                {
                    GelAction   action    = Convert2T <GelAction>(step.Parameters);
                    ResInfoData take_seat = resmanager.handseat_resinfo;
                    if (action.BJType == "T_BJ_GelSeat")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_GelSeat", "", "", action.Index, 0, true, action.BJName);
                        generater.GeneratePutGelToNormal(put_seat, take_seat, ref seque);
                    }
                    else if (action.BJType == "T_BJ_Centrifuge")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_Centrifuge", "", "", action.Index, 0, true, action.BJName);
                        generater.GeneratePutGelToCent(put_seat.CenCode, put_seat, take_seat, ref seque);
                    }
                    else if (action.BJType == "T_BJ_GelWarehouse")
                    {
                        var put_seat = resmanager.SearchGelCard("T_BJ_GelWarehouse", "", "", action.Index, 0, true, action.BJName);
                        generater.GeneratePutGelToWare(put_seat, take_seat, ref seque);
                    }
                    break;
                }

                case LogicStepEnum.TakeTip:
                {
                    TakeTipAction      action   = Convert2T <TakeTipAction>(step.Parameters);
                    var                ents     = injDevice.Injector.Entercloses.Where(ent => ent.Valid && action.Indexs.Contains(ent.Index)).ToArray();
                    var                tipseat  = Constants.BJDict[typeof(T_BJ_Tip).Name].Where(item => item.Name == action.TipBoxName).FirstOrDefault() as T_BJ_Tip;
                    List <ActionPoint> tip_seat = new List <ActionPoint>();
                    foreach (var ent in ents)
                    {
                        int x     = (int)(tipseat.X - action.C * tipseat.GapX);
                        int y     = (int)(tipseat.Y + action.R * tipseat.GapY);
                        var point = new ActionPoint();
                        point.x     = x;
                        point.y     = y;
                        point.z     = (int)tipseat.Limit;
                        point.type  = TestStepEnum.JXZT;
                        point.index = ent.Index;
                        tip_seat.Add(point);
                    }
                    var sequ_taketip = Sequence.create();
                    var move_act     = InjectMoveActs.create(injDevice, 3000, tip_seat.ToArray(), false);
                    sequ_taketip.AddAction(InjectMoveTo.create(injDevice, 3000, ents, -1, IMask.Gen(-1), IMask.Gen(0)));
                    sequ_taketip.AddAction(move_act);
                    seque.AddAction(sequ_taketip);
                }
                break;

                case LogicStepEnum.OutTip:
                {
                    TakeTipAction      action        = Convert2T <TakeTipAction>(step.Parameters);
                    var                ents          = injDevice.Injector.Entercloses.Where(ent => ent.Valid && action.Indexs.Contains(ent.Index)).ToArray();
                    var                sequ_puttip   = Sequence.create();
                    List <ActionPoint> unload_seat   = new List <ActionPoint>();
                    var                inject_unload = resmanager.unload_list;
                    if (inject_unload.Count() == 1)
                    {
                        var unloader = inject_unload[0];
                        for (int i = 0; i < 4; i++)
                        {
                            var unload_point = new ActionPoint((int)unloader.X, (int)unloader.Y + i * (int)unloader.FZ, (int)unloader.Z, TestStepEnum.JXZT);
                            unload_point.puttip_x = (int)unloader.FirstX;
                            unload_seat.Add(unload_point);
                        }
                        sequ_puttip.AddAction(InjectMoveTo.create(injDevice, 3000, ents, -1, IMask.Gen(-1), IMask.Gen(0)));
                        sequ_puttip.AddAction(InjectMoveActs.create(injDevice, 3000, unload_seat.ToArray(), true));
                        seque.AddAction(sequ_puttip);
                    }
                }
                break;

                case LogicStepEnum.Piercer:
                {
                    var paper_seat = resmanager.GetResByCode("", "T_BJ_GelSeat", "", "4");
                    seque.AddAction(PaperCard.create(pieDevice, 3000, paper_seat, 0));
                }
                break;

                case LogicStepEnum.LoopStart:
                {
                    LogicLoop logicLoop = Convert2T <LogicLoop>(step.Parameters);
                    loop_times = logicLoop.Count;
                    seque_root.AddAction(seque);
                    seque = Sequence.create();
                }
                break;

                case LogicStepEnum.LoopEnd:
                {
                    var act_repat = Repeat.create(seque, loop_times);
                    seque_root.AddAction(act_repat);
                    seque      = Sequence.create();
                    loop_times = 0;
                }
                break;
                }
            }
            seque_root.AddAction(seque);
            seque_root.runAction(opDevice);
            return(true);
        }
Exemple #10
0
    /********************************************************/
    /******************** 以下是内部函数 *********************/
    /********************************************************/

    void OnDestroy()
    {
        DestroyAll(true);

        instance = null;
    }
Exemple #11
0
        /// <summary>
        /// ������壬������Դ������
        /// </summary>
        /// <param name="type"></param>
        public void CreatePanel(string name, LuaFunction func = null)
        {
            string assetName = name + "Panel";
            string abName    = name.ToLower() + AppConst.ExtName;

            //Debug.LogError("name: " + name + "  "+ Parent.name);
            if (Parent.Find(name) != null)
            {
                return;
            }

#if UNITY_EDITOR
            // Debug.LogError("Editor");
            GameObject go = Game.ResManager.LoadPrefab(assetName, EnumAssetType.UIPrefab, func);
#elif ASYNC_MODE
            Debug.LogError("异步模式");
            ResManager.LoadPrefab(abName, assetName, delegate(UnityEngine.Object[] objs) {
                if (objs.Length == 0)
                {
                    return;
                }
                GameObject prefab = objs[0] as GameObject;
                if (prefab == null)
                {
                    return;
                }

                go       = Instantiate(prefab) as GameObject;
                go.name  = assetName;
                go.layer = LayerMask.NameToLayer("Default");
                go.transform.SetParent(Parent);
                go.transform.localScale    = Vector3.one;
                go.transform.localPosition = Vector3.zero;
                go.AddComponent <LuaBehaviour>();

                if (func != null)
                {
                    func.Call(go);
                }
                Debug.LogWarning("CreatePanel::>> " + name + " " + prefab);
            });
#else
            GameObject prefab = ResManager.LoadAsset <GameObject>(name, assetName);
            if (prefab == null)
            {
                return;
            }

            go      = Instantiate(prefab) as GameObject;
            go.name = assetName;
#endif
            go.layer = LayerMask.NameToLayer("Default");
            go.transform.SetParent(Parent);
            go.transform.localScale    = Vector3.one;
            go.transform.localPosition = Vector3.zero;
            go.AddComponent <LuaBehaviour>();

            if (func != null)
            {
                func.Call(go);
            }
            Debug.LogWarning("CreatePanel::>> " + name + " ");
        }
Exemple #12
0
    /// <summary>
    /// 小华贴字体动画
    /// </summary>
    void XHTZka()
    {
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/XH_F_4TH_FNN_KA");

        ka.name = "XH_F_4TH_FNN_KA";
        ka.transform.SetParent(transform);
        //我看见
        Material matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_02/tuka5").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_wokanjian.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk10 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka10");

        Transform Wrist_L = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L");//拿卡
        Material  matk6   = Wrist_L.Find("tuka6").GetComponent <MeshRenderer>().materials[1];

        matk6.CopyPropertiesFromMaterial(matSource);

        Material mattk4 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_01/tuka4").GetComponent <MeshRenderer>().materials[1];

        mattk4.CopyPropertiesFromMaterial(matSource);


        tk10.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk10.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        //实物
        index = Random.Range(101, 1001) % 3 + 25;
        Debug.Log(index);
        matTar    = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_R/Shoulder_R/ShoulderPart1_R/ShoulderPart2_R/Elbow_R/Wrist_R/goutongben/goutongben_03/tuka7").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        Transform tk9 = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai4/tuka9");

        tk9.localEulerAngles = new Vector3(0, -90, 0);
        matTar = tk9.GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);

        Transform tk8  = ka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/tuka8");
        Material  mat8 = tk8.GetComponent <MeshRenderer>().materials[1];

        mat8.CopyPropertiesFromMaterial(matSource);

        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(index).GetComponent <PropsObject>();
        Reinforcement rfc  = new Reinforcement(pObj.pData);           //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc; //设置强化物
        Debug.Log(rfc.pData.name_cn);

        XH.transitionTime = 0;
        //XH.Complete += XHTZkaCallback;
        XH.OnContinue();
        XH.timePointEvent = (a) =>//
        {
            if (a >= 615 && a <= 617)
            {
                XH.timePointEvent = null;
                XH.OnPause();
                //Debug.LogError("pause");
                XHTZkaCallback();//mm高亮
            }
        };

        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();
        bool pass = true;

        lao.framePointEvent = (a) =>
        {
            if (a >= 615 && a <= 617 && pass)
            {
                lao.framePointEvent = null;
                pass = false;
                lao.OnPause();
            }
        };
        lao.PlayForward("XH_F_4TH_FNN_KA");
    }
Exemple #13
0
    void MMGiveObj()//接卡给物
    {
        GameObject ka = ResManager.GetPrefab("Prefabs/AnimationKa/MM_F_4TH_DBY_KA");

        ka.name = "MM_F_4TH_DBY_KA";
        ka.transform.SetParent(transform);

        string name = SentenceExpressionModel.GetInstance().CurReinforcement.pData.name;

        //Debug.LogError(name);
        ka.transform.Find("judai/tuka1").localEulerAngles = new Vector3(0, -90, 0);
        Material matTar    = ka.transform.Find("judai/tuka1").GetComponent <MeshRenderer>().materials[1];
        Material matSource = SentenceExpressionModel.GetInstance().GetTuKa(PropsTag.judai_woyao.ToString()).GetComponent <MeshRenderer>().materials[1];

        matTar.CopyPropertiesFromMaterial(matSource);

        ka.transform.Find("judai/tuka").localEulerAngles = new Vector3(0, -90, 0);
        matTar    = ka.transform.Find("judai/tuka").GetComponent <MeshRenderer>().materials[1];
        matSource = SentenceExpressionModel.GetInstance().GetTuKa("tuka_" + name).GetComponent <MeshRenderer>().materials[1];
        matTar.CopyPropertiesFromMaterial(matSource);
        ka.transform.Find("Group/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L/judai3").gameObject.SetActive(false);

        ka.gameObject.SetActive(true);
        LegacyAnimationOper lao = ka.GetLegacyAnimationOper();

        bool passxh = true;
        bool passmm = true;
        bool pass   = true;

        MM.timePointEvent = (a) =>
        {
            if (a >= 38 && a <= 40 && passxh)
            {
                passxh = false;
                XH.OnContinue();
                Transform fnnka = transform.Find("XH_F_4TH_FNN_KA");
                fnnka.GetComponent <LegacyAnimationOper>().OnContinue();
                fnnka.gameObject.SetActive(false);
                fnnka.gameObject.SetActive(true);
                Transform xhr1 = XH.GetComponent <XHCtrl>().XH_R2.transform.parent.Find("XH_R1");
                fnnka.SetParent(xhr1);
                fnnka.transform.Find("Group1/Main/DeformationSystem/Root_M/Spine1_M/Chest_M/Scapula_L/Shoulder_L/ShoulderPart1_L/ShoulderPart2_L/Elbow_L/Wrist_L").gameObject.SetActive(false);
                //transform.Find("XH_F_4TH_FNN_KA").gameObject.SetActive(false);
            }
            if (a >= 72 && a <= 75 && pass)
            {
                pass = false;
                MM.OnPause();
                lao.OnPause();
                //Debug.LogError("WYXhBYTip");
                WYXhBYTip();
            }
            if (a >= 160 && a <= 162 && passmm)
            {
                passmm            = false;
                MM.timePointEvent = null;
                MM.OnPause();
                //MMGiveObjCallback();
                WyGiveClickMMHandTip();
            }
        };
        MM.PlayForward("MM_F_4TH_DBY");
        lao.PlayForward("MM_F_4TH_DBY_KA");
    }
Exemple #14
0
 private void InitializeComponent()
 {
     base.MinimizeBox                             = false;
     base.StartPosition                           = FormStartPosition.CenterParent;
     base.ClientSize                              = new Size(442, 273);
     this.Text                                    = "Shared Folders Add/Edit Root folder";
     base.FormBorderStyle                         = FormBorderStyle.FixedDialog;
     base.MaximizeBox                             = false;
     base.MinimizeBox                             = true;
     base.Icon                                    = ResManager.GetIcon("share32.ico");
     this.m_pIcon                                 = new PictureBox();
     this.m_pIcon.Size                            = new Size(32, 32);
     this.m_pIcon.Location                        = new Point(10, 10);
     this.m_pIcon.Image                           = ResManager.GetIcon("share32.ico").ToBitmap();
     this.mt_Info                                 = new Label();
     this.mt_Info.Size                            = new Size(200, 32);
     this.mt_Info.Location                        = new Point(50, 10);
     this.mt_Info.TextAlign                       = ContentAlignment.MiddleLeft;
     this.mt_Info.Text                            = "Specify share information.";
     this.m_pSeparator1                           = new GroupBox();
     this.m_pSeparator1.Size                      = new Size(432, 3);
     this.m_pSeparator1.Location                  = new Point(7, 50);
     this.m_pEnabled                              = new CheckBox();
     this.m_pEnabled.Size                         = new Size(300, 20);
     this.m_pEnabled.Location                     = new Point(125, 65);
     this.m_pEnabled.Text                         = "Enabled";
     this.m_pEnabled.Checked                      = true;
     this.mt_RootFolderName                       = new Label();
     this.mt_RootFolderName.Size                  = new Size(120, 20);
     this.mt_RootFolderName.Location              = new Point(0, 90);
     this.mt_RootFolderName.TextAlign             = ContentAlignment.MiddleRight;
     this.mt_RootFolderName.Text                  = "Root Folder Name:";
     this.m_pRootFolderName                       = new TextBox();
     this.m_pRootFolderName.Size                  = new Size(310, 20);
     this.m_pRootFolderName.Location              = new Point(125, 90);
     this.mt_Description                          = new Label();
     this.mt_Description.Size                     = new Size(120, 20);
     this.mt_Description.Location                 = new Point(0, 115);
     this.mt_Description.TextAlign                = ContentAlignment.MiddleRight;
     this.mt_Description.Text                     = "Description:";
     this.m_pDescription                          = new TextBox();
     this.m_pDescription.Size                     = new Size(310, 20);
     this.m_pDescription.Location                 = new Point(125, 115);
     this.mt_RootFolderType                       = new Label();
     this.mt_RootFolderType.Size                  = new Size(120, 20);
     this.mt_RootFolderType.Location              = new Point(0, 140);
     this.mt_RootFolderType.TextAlign             = ContentAlignment.MiddleRight;
     this.mt_RootFolderType.Text                  = "Root Folder Type:";
     this.m_pRootFolderType                       = new ComboBox();
     this.m_pRootFolderType.Size                  = new Size(200, 20);
     this.m_pRootFolderType.Location              = new Point(125, 140);
     this.m_pRootFolderType.DropDownStyle         = ComboBoxStyle.DropDownList;
     this.m_pRootFolderType.SelectedIndexChanged += new EventHandler(this.m_pRootFolderType_SelectedIndexChanged);
     this.m_pRootFolderType.Items.Add(new WComboBoxItem("Bounded Root Folder", SharedFolderRootType.BoundedRootFolder));
     this.m_pRootFolderType.Items.Add(new WComboBoxItem("Users Shared Folder", SharedFolderRootType.UsersSharedFolder));
     this.mt_BoundedUser               = new Label();
     this.mt_BoundedUser.Size          = new Size(120, 20);
     this.mt_BoundedUser.Location      = new Point(0, 170);
     this.mt_BoundedUser.TextAlign     = ContentAlignment.MiddleRight;
     this.mt_BoundedUser.Text          = "Bounded User:"******"...";
     this.m_pGetBoundedUser.Click     += new EventHandler(this.m_pGetBoundedUser_Click);
     this.mt_BoundedFolder             = new Label();
     this.mt_BoundedFolder.Size        = new Size(120, 20);
     this.mt_BoundedFolder.Location    = new Point(0, 195);
     this.mt_BoundedFolder.TextAlign   = ContentAlignment.MiddleRight;
     this.mt_BoundedFolder.Text        = "Bounded User Folder:";
     this.m_pBoundedFolder             = new TextBox();
     this.m_pBoundedFolder.Size        = new Size(280, 20);
     this.m_pBoundedFolder.Location    = new Point(125, 195);
     this.m_pBoundedFolder.ReadOnly    = true;
     this.m_pGetBoundedFolder          = new Button();
     this.m_pGetBoundedFolder.Size     = new Size(25, 20);
     this.m_pGetBoundedFolder.Location = new Point(410, 195);
     this.m_pGetBoundedFolder.Text     = "...";
     this.m_pGetBoundedFolder.Click   += new EventHandler(this.m_pGetBoundedFolder_Click);
     this.m_pSeparator2          = new GroupBox();
     this.m_pSeparator2.Size     = new Size(432, 2);
     this.m_pSeparator2.Location = new Point(7, 235);
     this.m_pCancel          = new Button();
     this.m_pCancel.Size     = new Size(70, 21);
     this.m_pCancel.Location = new Point(290, 248);
     this.m_pCancel.Click   += new EventHandler(this.m_pCancel_Click);
     this.m_pCancel.Text     = "Cancel";
     this.m_Ok          = new Button();
     this.m_Ok.Size     = new Size(70, 21);
     this.m_Ok.Location = new Point(365, 248);
     this.m_Ok.Click   += new EventHandler(this.m_Ok_Click);
     this.m_Ok.Text     = "Ok";
     base.Controls.Add(this.m_pIcon);
     base.Controls.Add(this.mt_Info);
     base.Controls.Add(this.m_pSeparator1);
     base.Controls.Add(this.m_pEnabled);
     base.Controls.Add(this.mt_RootFolderName);
     base.Controls.Add(this.m_pRootFolderName);
     base.Controls.Add(this.mt_Description);
     base.Controls.Add(this.m_pDescription);
     base.Controls.Add(this.mt_RootFolderType);
     base.Controls.Add(this.m_pRootFolderType);
     base.Controls.Add(this.mt_BoundedUser);
     base.Controls.Add(this.m_pBoundedUser);
     base.Controls.Add(this.m_pGetBoundedUser);
     base.Controls.Add(this.mt_BoundedFolder);
     base.Controls.Add(this.m_pBoundedFolder);
     base.Controls.Add(this.m_pGetBoundedFolder);
     base.Controls.Add(this.m_pSeparator2);
     base.Controls.Add(this.m_pCancel);
     base.Controls.Add(this.m_Ok);
 }
 void LoadingReportError()
 {
     LoadingReport("Error", null);
     ResManager.ResetCacheVersion();
 }
Exemple #16
0
        /// <summary>
        /// 启动更新下载,这里只是个思路演示,此处可启动线程下载更新
        /// </summary>
        IEnumerator OnUpdateResource()
        {
            downloadFiles.Clear();

            if (!AppConst.UpdateMode)
            {
                ResManager.initialize(OnResourceInited);
                yield break;
            }
            string dataPath = Util.DataPath;  //数据目录
            string url      = AppConst.WebUrl;
            string random   = DateTime.Now.ToString("yyyymmddhhmmss");
            string listUrl  = url + "files.txt?v=" + random;

            Debug.LogWarning("LoadUpdate---->>>" + listUrl);

            WWW www = new WWW(listUrl); yield return(www);

            if (www.error != null)
            {
                OnUpdateFailed(string.Empty);
                yield break;
            }
            if (!Directory.Exists(dataPath))
            {
                Directory.CreateDirectory(dataPath);
            }
            File.WriteAllBytes(dataPath + "files.txt", www.bytes);

            string filesText = www.text;

            string[] files = filesText.Split('\n');

            string message = string.Empty;

            for (int i = 0; i < files.Length; i++)
            {
                if (string.IsNullOrEmpty(files[i]))
                {
                    continue;
                }
                string[] keyValue  = files[i].Split('|');
                string   f         = keyValue[0];
                string   localfile = (dataPath + f).Trim();
                string   path      = Path.GetDirectoryName(localfile);
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                string fileUrl   = url + keyValue[0] + "?v=" + random;
                bool   canUpdate = !File.Exists(localfile);
                if (!canUpdate)
                {
                    string remoteMd5 = keyValue[1].Trim();
                    string localMd5  = Util.md5file(localfile);
                    canUpdate = !remoteMd5.Equals(localMd5);
                    if (canUpdate)
                    {
                        File.Delete(localfile);
                    }
                }
                if (canUpdate)     //本地缺少文件
                {
                    Debug.Log(fileUrl);
                    message = "downloading>>" + fileUrl;
                    facade.SendMessageCommand(NotiConst.UPDATE_MESSAGE, message);

                    /*
                     * www = new WWW(fileUrl); yield return www;
                     * if (www.error != null) {
                     *  OnUpdateFailed(path);   //
                     *  yield break;
                     * }
                     * File.WriteAllBytes(localfile, www.bytes);
                     * */
                    //这里都是资源文件,用线程下载
                    BeginDownload(fileUrl, localfile);
                    while (!(IsDownOK(localfile)))
                    {
                        yield return(new WaitForEndOfFrame());
                    }
                }
            }
            yield return(new WaitForEndOfFrame());

            message = "更新完成!!";
            facade.SendMessageCommand(NotiConst.UPDATE_MESSAGE, message);

            ResManager.initialize(OnResourceInited);
        }
 public override void Validate(ExtendedDataEntity[] dataEntities, ValidateContext validateContext, Context ctx)
 {
     foreach (ExtendedDataEntity entity in dataEntities)
     {
         if ((Convert.ToString(entity["BUDGETCALENDARTYPE"]) == "1") && !(entity["ACID"] is DynamicObject))
         {
             validateContext.AddError(entity, new ValidationErrorInfo("ACID", "", 0, 0, Convert.ToString(entity["ID"]), ResManager.LoadKDString("日历类型选择会计日历时,会计日历字段必录。", "0032056000017550", SubSystemType.FIN, new object[0]), ResManager.LoadKDString("生成预算期间", "0032056000017551", SubSystemType.FIN, new object[0]), ErrorLevel.Error));
         }
         bool           flag = false;
         IList <string> list = new List <string> {
             "YEAR", "HALFOFYEAR", "SEASON", "MONTH", "TENDAYS", "WEEKS", "DAYS"
         };
         foreach (string str2 in list)
         {
             if (Convert.ToBoolean(entity[str2]))
             {
                 flag = true;
                 break;
             }
         }
         if (!flag)
         {
             validateContext.AddError(entity, new ValidationErrorInfo("ACID", "", 0, 0, Convert.ToString(entity["ID"]), ResManager.LoadKDString("生成预算期间,应当选择至少一个周期类型。", "0032056000017552", SubSystemType.FIN, new object[0]), ResManager.LoadKDString("生成预算期间", "0032056000017551", SubSystemType.FIN, new object[0]), ErrorLevel.Error));
         }
     }
 }
Exemple #18
0
 void OnApplicationQuit()
 {
     ResManager.ClearMahjongPaiPool();
 }
Exemple #19
0
 void ResourceReady()
 {
     ResManager.Init();
     CSVManager.LoadAllCsv();
     sceneMgr.LoadScene("Main", () => { luaMgr.InitStart(); });
 }
Exemple #20
0
 private void InitializeComponent()
 {
     base.ClientSize                    = new Size(435, 390);
     base.StartPosition                 = FormStartPosition.CenterScreen;
     this.Text                          = "Compose:";
     base.Icon                          = ResManager.GetIcon("write.ico");
     base.MaximizeBox                   = false;
     this.mt_From                       = new Label();
     this.mt_From.Size                  = new Size(78, 20);
     this.mt_From.Location              = new Point(10, 10);
     this.mt_From.TextAlign             = ContentAlignment.MiddleRight;
     this.mt_From.Text                  = "From:";
     this.m_pFrom                       = new TextBox();
     this.m_pFrom.Size                  = new Size(336, 20);
     this.m_pFrom.Location              = new Point(90, 10);
     this.m_pFrom.Anchor                = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     this.mt_Subject                    = new Label();
     this.mt_Subject.Size               = new Size(78, 20);
     this.mt_Subject.Location           = new Point(10, 60);
     this.mt_Subject.TextAlign          = ContentAlignment.MiddleRight;
     this.mt_Subject.Text               = "Subject:";
     this.m_pSubject                    = new TextBox();
     this.m_pSubject.Size               = new Size(336, 20);
     this.m_pSubject.Location           = new Point(90, 60);
     this.m_pSubject.Anchor             = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     this.mt_Attachments                = new Label();
     this.mt_Attachments.Size           = new Size(78, 20);
     this.mt_Attachments.Location       = new Point(10, 85);
     this.mt_Attachments.TextAlign      = ContentAlignment.MiddleRight;
     this.mt_Attachments.Text           = "Attachemnts:";
     this.m_pAttachments                = new ListView();
     this.m_pAttachments.Size           = new Size(336, 54);
     this.m_pAttachments.Location       = new Point(90, 85);
     this.m_pAttachments.BorderStyle    = BorderStyle.FixedSingle;
     this.m_pAttachments.View           = View.SmallIcon;
     this.m_pAttachments.SmallImageList = new ImageList();
     this.m_pAttachments.MouseUp       += new MouseEventHandler(this.m_pAttachments_MouseUp);
     this.m_pAttachments.Anchor         = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
     this.m_pText                       = new WRichEditEx();
     this.m_pText.Size                  = new Size(416, 200);
     this.m_pText.Location              = new Point(10, 150);
     this.m_pText.Anchor                = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
     this.m_pSend                       = new Button();
     this.m_pSend.Size                  = new Size(70, 20);
     this.m_pSend.Location              = new Point(280, 360);
     this.m_pSend.Text                  = "Send";
     this.m_pSend.Click                += new EventHandler(this.m_pSend_ButtonPressed);
     this.m_pSend.Anchor                = (AnchorStyles.Bottom | AnchorStyles.Right);
     this.m_pCancel                     = new Button();
     this.m_pCancel.Size                = new Size(70, 20);
     this.m_pCancel.Location            = new Point(355, 360);
     this.m_pCancel.Text                = "Cancel";
     this.m_pCancel.Click              += new EventHandler(this.m_pCancel_ButtonPressed);
     this.m_pCancel.Anchor              = (AnchorStyles.Bottom | AnchorStyles.Right);
     base.Controls.Add(this.mt_From);
     base.Controls.Add(this.m_pFrom);
     base.Controls.Add(this.mt_Subject);
     base.Controls.Add(this.m_pSubject);
     base.Controls.Add(this.mt_Attachments);
     base.Controls.Add(this.m_pAttachments);
     base.Controls.Add(this.m_pText);
     base.Controls.Add(this.m_pSend);
     base.Controls.Add(this.m_pCancel);
 }
Exemple #21
0
 public BaseValidator(ApplicationDbContext context, ResManager resManager)
 {
     this.context    = context;
     this.resManager = resManager;
     errors          = new Dictionary <string, string>();
 }
Exemple #22
0
        /// <summary>
        /// ������壬������Դ������
        /// </summary>
        /// <param name="type"></param>
        public void CreatePanel(string name, int formType, LuaFunction func1 = null, LuaFunction func2 = null)
        {
            string assetName = name + "Panel";
            string abName    = name.ToLower() + AppConst.ExtName;

            if (panelList.ContainsKey(name))
            {
                GameObject panel;
                panelList.TryGetValue(name, out panel);
                if (panel)
                {
                    panel.SetActive(true);
                }
                if (func2 != null)
                {
                    func2.Call();
                }
                return;
            }

#if ASYNC_MODE
            ResManager.LoadPrefab(abName, assetName, delegate(UnityEngine.Object[] objs) {
                if (objs.Length == 0)
                {
                    return;
                }
                GameObject prefab = objs[0] as GameObject;
                if (prefab == null)
                {
                    return;
                }

                GameObject go = Instantiate(prefab) as GameObject;
                go.name       = assetName;
                go.layer      = LayerMask.NameToLayer("Default");
                go.transform.SetParent(SelectForm(formType));
                go.transform.localScale    = Vector3.one;
                go.transform.localPosition = Vector3.zero;
                go.AddComponent <LuaBehaviour>();

                if (func != null)
                {
                    func.Call(go);
                }
                Debug.LogWarning("CreatePanel::>> " + name + " " + prefab);
            });
#else
            GameObject prefab = ResManager.LoadAsset <GameObject>(name, assetName);
            if (prefab == null)
            {
                return;
            }
            GameObject go = Instantiate(prefab) as GameObject;
            go.name  = assetName;
            go.layer = LayerMask.NameToLayer("Default");
            go.transform.SetParent(SelectForm(formType));
            go.transform.localScale    = Vector3.one;
            go.transform.localPosition = Vector3.zero;
            go.GetComponent <RectTransform>().offsetMin = new Vector2(0.0f, 0.0f);
            go.GetComponent <RectTransform>().offsetMax = new Vector2(0.0f, 0.0f);
            go.AddComponent <LuaBehaviour>();
            panelList.Add(name, go);

            if (func1 != null)
            {
                func1.Call(go);
            }
            if (func2 != null)
            {
                func2.Call();
            }
            Debug.LogWarning("CreatePanel::>> " + name + " " + prefab);
#endif
        }
Exemple #23
0
        private void InitializeComponent()
        {
            base.ClientSize                        = new Size(380, 210);
            base.StartPosition                     = FormStartPosition.CenterParent;
            this.Text                              = "Add/Edit Bind info";
            base.FormBorderStyle                   = FormBorderStyle.FixedDialog;
            base.MaximizeBox                       = false;
            this.m_pIcon                           = new PictureBox();
            this.m_pIcon.Size                      = new Size(32, 32);
            this.m_pIcon.Location                  = new Point(10, 10);
            this.m_pIcon.Image                     = ResManager.GetIcon("server.ico").ToBitmap();
            this.mt_Info                           = new Label();
            this.mt_Info.Size                      = new Size(200, 32);
            this.mt_Info.Location                  = new Point(50, 10);
            this.mt_Info.TextAlign                 = ContentAlignment.MiddleLeft;
            this.mt_Info.Text                      = "Specify IP binding information.";
            this.m_pSeparator1                     = new GroupBox();
            this.m_pSeparator1.Size                = new Size(365, 3);
            this.m_pSeparator1.Location            = new Point(10, 50);
            this.mt_HostName                       = new Label();
            this.mt_HostName.Size                  = new Size(100, 20);
            this.mt_HostName.Location              = new Point(0, 60);
            this.mt_HostName.TextAlign             = ContentAlignment.MiddleRight;
            this.mt_HostName.Text                  = "Host Name:";
            this.m_pHostName                       = new TextBox();
            this.m_pHostName.Size                  = new Size(270, 20);
            this.m_pHostName.Location              = new Point(105, 60);
            this.mt_Protocol                       = new Label();
            this.mt_Protocol.Size                  = new Size(100, 20);
            this.mt_Protocol.Location              = new Point(0, 85);
            this.mt_Protocol.TextAlign             = ContentAlignment.MiddleRight;
            this.mt_Protocol.Text                  = "Protocol:";
            this.m_pProtocol                       = new ComboBox();
            this.m_pProtocol.Size                  = new Size(60, 20);
            this.m_pProtocol.Location              = new Point(105, 85);
            this.m_pProtocol.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.m_pProtocol.SelectedIndexChanged += new EventHandler(this.m_pProtocol_SelectedIndexChanged);
            this.mt_IpEndPoint                     = new Label();
            this.mt_IpEndPoint.Size                = new Size(100, 20);
            this.mt_IpEndPoint.Location            = new Point(0, 110);
            this.mt_IpEndPoint.TextAlign           = ContentAlignment.MiddleRight;
            this.mt_IpEndPoint.Text                = "IP EndPoint:";
            this.m_pIP                             = new ComboBox();
            this.m_pIP.Size                        = new Size(200, 20);
            this.m_pIP.Location                    = new Point(105, 110);
            this.m_pIP.DropDownStyle               = ComboBoxStyle.DropDownList;
            this.m_pPort                           = new NumericUpDown();
            this.m_pPort.Size                      = new Size(63, 20);
            this.m_pPort.Location                  = new Point(310, 110);
            this.m_pPort.Minimum                   = 0m;
            this.m_pPort.Maximum                   = 99999m;
            this.mt_SslMode                        = new Label();
            this.mt_SslMode.Size                   = new Size(100, 20);
            this.mt_SslMode.Location               = new Point(0, 140);
            this.mt_SslMode.TextAlign              = ContentAlignment.MiddleRight;
            this.mt_SslMode.Text                   = "SSL Mode:";
            this.m_pSslMode                        = new ComboBox();
            this.m_pSslMode.Size                   = new Size(60, 20);
            this.m_pSslMode.Location               = new Point(105, 140);
            this.m_pSslMode.DropDownStyle          = ComboBoxStyle.DropDownList;
            this.m_pSslMode.SelectedIndexChanged  += new EventHandler(this.m_pSslMode_SelectedIndexChanged);
            this.m_pSslMode.Items.Add("None");
            this.m_pSslMode.Items.Add("SSL");
            this.m_pSslMode.Items.Add("TLS");
            this.m_pSslToolbar              = new ToolStrip();
            this.m_pSslToolbar.Size         = new Size(95, 25);
            this.m_pSslToolbar.Location     = new Point(210, 140);
            this.m_pSslToolbar.Dock         = DockStyle.None;
            this.m_pSslToolbar.GripStyle    = ToolStripGripStyle.Hidden;
            this.m_pSslToolbar.BackColor    = this.BackColor;
            this.m_pSslToolbar.Renderer     = new ToolBarRendererEx();
            this.m_pSslToolbar.ItemClicked += new ToolStripItemClickedEventHandler(this.m_pSslToolbar_ItemClicked);
            ToolStripButton toolStripButton = new ToolStripButton();

            toolStripButton.Image       = ResManager.GetIcon("write.ico").ToBitmap();
            toolStripButton.Name        = "create";
            toolStripButton.ToolTipText = "Create SSL certificate.";
            this.m_pSslToolbar.Items.Add(toolStripButton);
            ToolStripButton toolStripButton2 = new ToolStripButton();

            toolStripButton2.Image       = ResManager.GetIcon("add.ico").ToBitmap();
            toolStripButton2.Name        = "add";
            toolStripButton2.ToolTipText = "Add SSL certificate.";
            this.m_pSslToolbar.Items.Add(toolStripButton2);
            ToolStripButton toolStripButton3 = new ToolStripButton();

            toolStripButton3.Enabled     = false;
            toolStripButton3.Image       = ResManager.GetIcon("delete.ico").ToBitmap();
            toolStripButton3.Name        = "delete";
            toolStripButton3.ToolTipText = "Delete SSL certificate.";
            this.m_pSslToolbar.Items.Add(toolStripButton3);
            ToolStripButton toolStripButton4 = new ToolStripButton();

            toolStripButton4.Enabled     = false;
            toolStripButton4.Image       = ResManager.GetIcon("save.ico").ToBitmap();
            toolStripButton4.Name        = "save";
            toolStripButton4.ToolTipText = "Export SSL certificate.";
            this.m_pSslToolbar.Items.Add(toolStripButton4);
            this.m_pSslIcon             = new PictureBox();
            this.m_pSslIcon.Size        = new Size(32, 32);
            this.m_pSslIcon.Location    = new Point(180, 135);
            this.m_pSslIcon.BorderStyle = BorderStyle.None;
            this.m_pSslIcon.SizeMode    = PictureBoxSizeMode.StretchImage;
            this.m_pSslIcon.Image       = ImageUtil.GetGrayImage(ResManager.GetIcon("ssl.ico", new Size(32, 32)).ToBitmap());
            this.m_pSeparator2          = new GroupBox();
            this.m_pSeparator2.Size     = new Size(365, 2);
            this.m_pSeparator2.Location = new Point(5, 175);
            this.m_pCancel          = new Button();
            this.m_pCancel.Size     = new Size(70, 20);
            this.m_pCancel.Location = new Point(225, 185);
            this.m_pCancel.Text     = "Cancel";
            this.m_pCancel.Click   += new EventHandler(this.m_pCancel_Click);
            this.m_pOk          = new Button();
            this.m_pOk.Size     = new Size(70, 20);
            this.m_pOk.Location = new Point(300, 185);
            this.m_pOk.Text     = "Ok";
            this.m_pOk.Click   += new EventHandler(this.m_pOk_Click);
            base.Controls.Add(this.m_pIcon);
            base.Controls.Add(this.mt_Info);
            base.Controls.Add(this.m_pSeparator1);
            base.Controls.Add(this.mt_HostName);
            base.Controls.Add(this.m_pHostName);
            base.Controls.Add(this.mt_Protocol);
            base.Controls.Add(this.m_pProtocol);
            base.Controls.Add(this.mt_IpEndPoint);
            base.Controls.Add(this.m_pIP);
            base.Controls.Add(this.m_pPort);
            base.Controls.Add(this.mt_SslMode);
            base.Controls.Add(this.m_pSslMode);
            base.Controls.Add(this.m_pSslToolbar);
            base.Controls.Add(this.m_pSslIcon);
            base.Controls.Add(this.m_pSeparator2);
            base.Controls.Add(this.m_pCancel);
            base.Controls.Add(this.m_pOk);
        }
Exemple #24
0
        private void InitializeComponent()
        {
            this.m_pTab          = new TabControl();
            this.m_pTab.Size     = new Size(515, 520);
            this.m_pTab.Location = new Point(5, 0);
            this.m_pTab.TabPages.Add(new TabPage("General"));
            this.m_pApply                                   = new Button();
            this.m_pApply.Size                              = new Size(70, 20);
            this.m_pApply.Location                          = new Point(450, 530);
            this.m_pApply.Text                              = "Apply";
            this.m_pApply.Click                            += new EventHandler(this.m_pApply_Click);
            this.m_pEnabled                                 = new CheckBox();
            this.m_pEnabled.Size                            = new Size(70, 20);
            this.m_pEnabled.Location                        = new Point(170, 10);
            this.m_pEnabled.Text                            = "Enabled";
            this.mt_GreetingText                            = new Label();
            this.mt_GreetingText.Size                       = new Size(155, 20);
            this.mt_GreetingText.Location                   = new Point(10, 65);
            this.mt_GreetingText.TextAlign                  = ContentAlignment.MiddleRight;
            this.mt_GreetingText.Text                       = "Greeting Text:";
            this.m_pGreetingText                            = new TextBox();
            this.m_pGreetingText.Size                       = new Size(250, 20);
            this.m_pGreetingText.Location                   = new Point(170, 65);
            this.mt_SessionTimeout                          = new Label();
            this.mt_SessionTimeout.Size                     = new Size(155, 20);
            this.mt_SessionTimeout.Location                 = new Point(10, 130);
            this.mt_SessionTimeout.TextAlign                = ContentAlignment.MiddleRight;
            this.mt_SessionTimeout.Text                     = "Session Idle Timeout:";
            this.m_pSessionTimeout                          = new NumericUpDown();
            this.m_pSessionTimeout.Size                     = new Size(70, 20);
            this.m_pSessionTimeout.Location                 = new Point(170, 130);
            this.m_pSessionTimeout.Minimum                  = 10m;
            this.m_pSessionTimeout.Maximum                  = 99999m;
            this.mt_SessTimeoutSec                          = new Label();
            this.mt_SessTimeoutSec.Size                     = new Size(25, 20);
            this.mt_SessTimeoutSec.Location                 = new Point(245, 130);
            this.mt_SessTimeoutSec.TextAlign                = ContentAlignment.MiddleLeft;
            this.mt_SessTimeoutSec.Text                     = "sec.";
            this.mt_MaxConnections                          = new Label();
            this.mt_MaxConnections.Size                     = new Size(155, 20);
            this.mt_MaxConnections.Location                 = new Point(10, 170);
            this.mt_MaxConnections.TextAlign                = ContentAlignment.MiddleRight;
            this.mt_MaxConnections.Text                     = "Maximum Connections:";
            this.m_pMaxConnections                          = new NumericUpDown();
            this.m_pMaxConnections.Size                     = new Size(70, 20);
            this.m_pMaxConnections.Location                 = new Point(170, 170);
            this.m_pMaxConnections.Minimum                  = 1m;
            this.m_pMaxConnections.Maximum                  = 99999m;
            this.mt_MaxConnsPerIP                           = new Label();
            this.mt_MaxConnsPerIP.Size                      = new Size(164, 20);
            this.mt_MaxConnsPerIP.Location                  = new Point(1, 195);
            this.mt_MaxConnsPerIP.TextAlign                 = ContentAlignment.MiddleRight;
            this.mt_MaxConnsPerIP.Text                      = "Maximum Connections per IP:";
            this.m_pMaxConnsPerIP                           = new NumericUpDown();
            this.m_pMaxConnsPerIP.Size                      = new Size(70, 20);
            this.m_pMaxConnsPerIP.Location                  = new Point(170, 195);
            this.m_pMaxConnsPerIP.Minimum                   = 0m;
            this.m_pMaxConnsPerIP.Maximum                   = 99999m;
            this.mt_MaxConnsPerIP0                          = new Label();
            this.mt_MaxConnsPerIP0.Size                     = new Size(164, 20);
            this.mt_MaxConnsPerIP0.Location                 = new Point(245, 195);
            this.mt_MaxConnsPerIP0.TextAlign                = ContentAlignment.MiddleLeft;
            this.mt_MaxConnsPerIP0.Text                     = "(0 for unlimited)";
            this.mt_MaxBadCommands                          = new Label();
            this.mt_MaxBadCommands.Size                     = new Size(155, 20);
            this.mt_MaxBadCommands.Location                 = new Point(10, 220);
            this.mt_MaxBadCommands.TextAlign                = ContentAlignment.MiddleRight;
            this.mt_MaxBadCommands.Text                     = "Maximum Bad Commands:";
            this.m_pMaxBadCommands                          = new NumericUpDown();
            this.m_pMaxBadCommands.Size                     = new Size(70, 20);
            this.m_pMaxBadCommands.Location                 = new Point(170, 220);
            this.m_pMaxBadCommands.Minimum                  = 1m;
            this.m_pMaxBadCommands.Maximum                  = 99999m;
            this.mt_TabGeneral_Bindings                     = new Label();
            this.mt_TabGeneral_Bindings.Size                = new Size(70, 20);
            this.mt_TabGeneral_Bindings.Location            = new Point(10, 325);
            this.mt_TabGeneral_Bindings.Text                = "IP Bindings:";
            this.m_pTabGeneral_BindingsToolbar              = new ToolStrip();
            this.m_pTabGeneral_BindingsToolbar.Size         = new Size(95, 25);
            this.m_pTabGeneral_BindingsToolbar.Location     = new Point(425, 325);
            this.m_pTabGeneral_BindingsToolbar.Dock         = DockStyle.None;
            this.m_pTabGeneral_BindingsToolbar.GripStyle    = ToolStripGripStyle.Hidden;
            this.m_pTabGeneral_BindingsToolbar.BackColor    = this.BackColor;
            this.m_pTabGeneral_BindingsToolbar.Renderer     = new ToolBarRendererEx();
            this.m_pTabGeneral_BindingsToolbar.ItemClicked += new ToolStripItemClickedEventHandler(this.m_pTabGeneral_BindingsToolbar_ItemClicked);
            ToolStripButton toolStripButton = new ToolStripButton();

            toolStripButton.Image       = ResManager.GetIcon("add.ico").ToBitmap();
            toolStripButton.Tag         = "add";
            toolStripButton.ToolTipText = "Add";
            this.m_pTabGeneral_BindingsToolbar.Items.Add(toolStripButton);
            ToolStripButton toolStripButton2 = new ToolStripButton();

            toolStripButton2.Enabled     = false;
            toolStripButton2.Image       = ResManager.GetIcon("edit.ico").ToBitmap();
            toolStripButton2.Tag         = "edit";
            toolStripButton2.ToolTipText = "edit";
            this.m_pTabGeneral_BindingsToolbar.Items.Add(toolStripButton2);
            ToolStripButton toolStripButton3 = new ToolStripButton();

            toolStripButton3.Enabled     = false;
            toolStripButton3.Image       = ResManager.GetIcon("delete.ico").ToBitmap();
            toolStripButton3.Tag         = "delete";
            toolStripButton3.ToolTipText = "Delete";
            this.m_pTabGeneral_BindingsToolbar.Items.Add(toolStripButton3);
            this.m_pTabGeneral_Bindings                       = new ListView();
            this.m_pTabGeneral_Bindings.Size                  = new Size(485, 100);
            this.m_pTabGeneral_Bindings.Location              = new Point(10, 350);
            this.m_pTabGeneral_Bindings.View                  = View.Details;
            this.m_pTabGeneral_Bindings.HeaderStyle           = ColumnHeaderStyle.Nonclickable;
            this.m_pTabGeneral_Bindings.HideSelection         = false;
            this.m_pTabGeneral_Bindings.FullRowSelect         = true;
            this.m_pTabGeneral_Bindings.MultiSelect           = false;
            this.m_pTabGeneral_Bindings.SelectedIndexChanged += new EventHandler(this.m_pTabGeneral_Bindings_SelectedIndexChanged);
            this.m_pTabGeneral_Bindings.Columns.Add("Host Name", 130, HorizontalAlignment.Left);
            this.m_pTabGeneral_Bindings.Columns.Add("IP", 140, HorizontalAlignment.Left);
            this.m_pTabGeneral_Bindings.Columns.Add("Port", 50, HorizontalAlignment.Left);
            this.m_pTabGeneral_Bindings.Columns.Add("SSL", 50, HorizontalAlignment.Left);
            this.m_pTabGeneral_Bindings.Columns.Add("Certificate", 60, HorizontalAlignment.Left);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pEnabled);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_GreetingText);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pGreetingText);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_SessionTimeout);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pSessionTimeout);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_SessTimeoutSec);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_MaxConnections);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pMaxConnections);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_MaxConnsPerIP);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pMaxConnsPerIP);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_MaxConnsPerIP0);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_MaxBadCommands);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pMaxBadCommands);
            this.m_pTab.TabPages[0].Controls.Add(this.mt_TabGeneral_Bindings);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pTabGeneral_BindingsToolbar);
            this.m_pTab.TabPages[0].Controls.Add(this.m_pTabGeneral_Bindings);
            base.Controls.Add(this.m_pTab);
            base.Controls.Add(this.m_pApply);
        }
Exemple #25
0
    //public bool Finished;
    private void Start()
    {
        GlobalEntity.GetInstance().Dispatch <string>(CommonUI.pEvent.LevelChange, "第四关");

        Transform park = ResManager.GetPrefab("Scenes/park/park").transform;

        park.SetParent(transform);
        GameObject         cam = transform.Find("park(Clone)/Camera").gameObject;
        HighlightingEffect hf  = cam.GetComponent <HighlightingEffect>();

        if (hf == null)
        {
            hf = cam.gameObject.AddComponent <HighlightingEffect>();
            //hf.stencilZBufferDepth = 0;
            //hf.downsampleFactor = 1;
            //hf.iterations = 2;
        }

        if (swapUI == null)
        {
            swapUI = UIManager.Instance.GetUI <SwapUI>("SwapUI");
            //swapUI.chooseEvent += ChooseBtnClickCallback;
            swapUI.speakEvent += SpeakBtnClickCallback;
            swapUI.SetButtonVisiable(SwapUI.BtnName.microButton, false);
            swapUI.SetButtonVisiable(SwapUI.BtnName.chooseButton, false);
        }
        UIManager.Instance.GetUI <Dialog>("Dialog").SetPos(new Vector3(-55, -490, 0));
        MM = ResManager.GetPrefab("Scenes/park/MM").GetAnimatorOper();
        MM.transform.SetParent(park);

        PeopleManager.Instance.Reset();
        PeopleManager.Instance.GetPeople(PeopleTag.FDLS_BD).transform.localPosition = new Vector3(0, 0, 10000);
        PeopleManager.Instance.GetPeople(PeopleTag.LS_BD).transform.localPosition   = new Vector3(0, 0, 10000);
        XH = PeopleManager.Instance.GetPeople(PeopleTag.XH_BD).GetAnimatorOper();
        bool pass = true;

        XH.timePointEvent = (a) =>
        {
            if (a >= 1 && a <= 3 && pass)
            {
                pass = false;
                XH.timePointEvent = null;
                XH.OnPause();
            }
        };
        XH.PlayForward("XH_F_4TH_FNN");

        LegacyAnimationOper dog = ResManager.GetPrefab("Scenes/park/dog").GetLegacyAnimationOper();

        dog.transform.SetParent(park);
        dog.transform.localScale    = Vector3.one * 2;
        dog.transform.localPosition = new Vector3(-1.205f, 0, 0);
        dog.PlayForward("idle");
        dog.SetWrapMode = WrapMode.Loop;

        MM.PlayForward("idle");
        //XH.PlayForward("idle");
        //XH.PlayForward("XH_F_4TH_FNN");
        PropsObject   pObj = SentenceExpressionModel.GetInstance().GetObj(PropsType.neutralStimulator); //中性刺激物
        Reinforcement rfc  = new Reinforcement(pObj.pData);                                             //测试代码

        SentenceExpressionModel.GetInstance().CurReinforcement = rfc;                                   //设置强化物
        Debug.Log("GetTukaObject");

        XHTZka();
        //Invoke("XHTZka", 1);
    }