// Update is called once per frame void Update() { if (Pathea.PeCreature.Instance.mainPlayer == null || m_Creator == null) { m_WorkMode = EWorkType.UnKnown; } else if (m_Creator.Assembly == null) { m_WorkMode = EWorkType.NoAssembly; } else { Vector3 playerPos = Pathea.PeCreature.Instance.mainPlayer.position; Vector3 assmPos = m_Creator.Assembly.Position; if ((playerPos - assmPos).sqrMagnitude < WorkDistance * WorkDistance) { m_WorkMode = EWorkType.Working; } else { m_WorkMode = EWorkType.OutOfDistance; } } UpdatePerson(); //if (CSMain.HasCSAssembly()) // mMachinePos = CSMain.GetAssemblyEntity().gameObject.GetComponent<CSAssemblyObject>().transform.GetComponentInParent<PeEntity>().transform.position; //离开基地球,关闭基地UI //if (null != GameUI.Instance.mMainPlayer && CSMain.HasCSAssembly()) //{ // if (!CSMain.GetAssemblyEntity().InRange(GameUI.Instance.mMainPlayer.position)) // OnClose(); //} }
private void Load(Int64 recipeNo, EWorkType type) { reportSet.Select(recipeNo, type); Count = reportSet.RowCount; for (int i = 0; i < reportSet.RowCount; i++) { reportSet.Fetch(i); ReportWorkItem item = new ReportWorkItem(); item.RecNo = reportSet.RecNo; item.RecipeNo = reportSet.RecipeNo; item.Type = reportSet.Type; item.Index = reportSet.Index; item.ItemCode = reportSet.ItemCode; item.ItemName = reportSet.ItemName; item.ItemRef = reportSet.ItemRef; item.BiasCH = reportSet.BiasCH; item.Rank = reportSet.Rank; item.Lower = reportSet.Lower; item.Upper = reportSet.Upper; indexes.Add(item.Index, item); names.Add(item.ItemName, item); } }
protected void DoWork(EWorkType eWork) { this.m_WorkMutex.WaitOne(); this.m_WorkType = eWork; this.m_WaitEvent.Set(); this.m_WorkMutex.ReleaseMutex(); Thread.Sleep(100); }
public DialogBinFormulaEdit(Int64 recipeNo, EWorkType type, string formula) { this.recipeNo = recipeNo; this.type = type; InitializeComponent(); Initialize(formula); }
public ReportWorkList(Int64 recipeNo, EWorkType type) { reportSet = new ReportWorkDataSet(AppRes.DB.Connect, null, null); indexes = new Dictionary <int, ReportWorkItem>(); names = new Dictionary <string, ReportWorkItem>(); Load(recipeNo, type); }
private void Load(Int64 recipeNo, EWorkType type) { testSet.Select(recipeNo, type); Count = testSet.RowCount; for (int i = 0; i < Count; i++) { testSet.Fetch(i); TestWorkItem item = new TestWorkItem(); item.RecNo = testSet.RecNo; item.RecipeNo = testSet.RecipeNo; item.SlavePatternNo = testSet.SlavePatternNo; item.Type = testSet.Type; item.Index = testSet.Index; item.ItemCode = testSet.ItemCode; item.ItemName = testSet.ItemName; item.ItemRef = testSet.ItemRef; item.TestPattern = testSet.TestPattern; item.BiasValue = testSet.BiasValue; item.BiasRange = testSet.BiasRange; item.BiasCH = testSet.BiasCH; item.ApplyTime = testSet.ApplyTime; item.TransientTime = testSet.TransientTime; item.HumCount = testSet.HumCount; item.Optical = testSet.Optical; item.IntegVL = testSet.IntegVL; item.IntegX1 = testSet.IntegX1; item.IntegX2 = testSet.IntegX2; item.IntegZ = testSet.IntegZ; item.Gain = testSet.Gain; item.Offset = testSet.Offset; indexes.Add(item.Index, item); names.Add(item.ItemName, item); } }
public WorkItem(Int64 recipeNo, EWorkType type) { Tests = new TestWorkList(recipeNo, type); Reports = new ReportWorkList(recipeNo, type); }