void DestroyTic() { if (m_CurrentSelectItemsInRightBox.Count > 0) { foreach (TeachHitObjectItem item in m_CurrentSelectItemsInRightBox) { int clickTimes = m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList[item.m_Index - 1].m_CliciTimes; m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList[item.m_Index - 1].m_CliciTimes = 1; if (clickTimes > 1) { for (int i = 1; i < clickTimes; i++) { CO co = new CO(); co.m_CliciTimes = 1; co.m_Index = item.m_Index + i; co.m_Position = m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_HOList[item.m_Index + i - 1].m_Position; m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList.Insert(item.m_Index + i - 1, co); } } } for (int i = 0; i < m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList.Count; i++) { m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList[i].m_Index = i + 1; m_Sentences[m_CurrentSelectSentence.m_Index - 1].m_COList[i].RefreshContent(); } m_CurrentSelectItemsInRightBox.Clear(); ShowOneSentence(); } }
public void CreateSentence() { List <HO> temp = new List <HO>(); while (m_LeftBoxHO.Count > 0 && m_LeftBoxHO[0].m_Index <= m_LeftBoxCurrentItem.m_Index) { temp.Add(m_LeftBoxHO[0]); m_LeftBoxHO.RemoveAt(0); } if (temp.Count > 0) { CleanSentence cs = new CleanSentence(); cs.m_Index = m_Sentences.Count + 1; cs.m_StartTime = temp[0].m_StartTime; cs.m_EndTime = temp[temp.Count - 1].m_StartTime; cs.m_HOList = temp; List <CO> coList = new List <CO>(); for (int i = 0; i < cs.m_HOList.Count; i++) { CO co = new CO(); co.m_Index = i + 1; co.m_CliciTimes = 1; co.m_Position = cs.m_HOList[i].m_Position; coList.Add(co); } cs.m_COList = coList; m_Sentences.Add(cs); } CreateLeftBoxScrollViewContent(); CreateSentenceBoxContent(); }
public void COExamplesTest06() { CO poor = new CO(1); poor.NullFlavor = null; Assert.IsTrue(poor.Validate()); }
public void COExamplesTest02() { CO poor = new CO(1, new CD <String>("1", "2.3.4.5.6.7")); poor.NullFlavor = NullFlavor.Other; Assert.IsFalse(poor.Validate()); }
public void COExamplesTest05() { CO poor = new CO(1); poor.NullFlavor = NullFlavor.Other; Assert.IsFalse(poor.Validate()); }
public void COExamplesTest08() { CO poor = new CO(); poor.NullFlavor = null; Assert.IsFalse(poor.Validate()); }
public void SelectClickColliders() { foreach (ClickableObject CO in gameObject.transform.GetComponentsInChildren <ClickableObject>()) { CO.GetComponent <Renderer>().sharedMaterial = (Material)Resources.Load("Prefabs/Gizmos/Materials/ClickColliderSelected"); } }
private void ResetForm() { try { m_Order = new CO(); m_Order.GetCOAllDetails(OrderNo, (int)Common.OrderStatus.Confirmed); if (m_Order != null && !string.IsNullOrEmpty(m_Order.CustomerOrderNo)) { CODetailList = m_Order.CODetailList; dgvCOItemDetails.DataSource = CODetailList; SetHeaderValue(); //RefreshItemList(); // Get Grid View data string errorMessage = string.Empty; ListBatch = CIBatchDetail.GetDefaultBatch(OrderNo, m_LocationID, ref errorMessage); SetGridView(); dgvCOItemDetails.ClearSelection(); dgvInvoiceDetail.ClearSelection(); } else { // Co Detail not Found ErrorCode = "40009"; } } catch (Exception ex) { throw ex; } }
private void LeftClick() { if (!checkd) // Если флаг - нажать нельзя { if (IsBomb == true && revealed == false) // проверяем на подрыв { Debug.Log("Game Over"); foreach (CellOperator CO in allCells) { CO.RevealMachine(); } for (int i = 0; i < numbersCanvas.transform.childCount; i++) { var child = numbersCanvas.transform.GetChild(i).gameObject; if (child != null) { child.SetActive(true); } } gameManager.GameOverAppears(); } else { RevealMachine(); } IsVictory(); } }
public void DeselectClickColliders() { foreach (ClickableObject CO in gameObject.transform.GetComponentsInChildren <ClickableObject>()) { CO.GetComponent <Renderer>().sharedMaterial = mtlClickCollider; } }
private void EndRace() { //Camera Stuff GameObject[] CamerasToDeact = GameObject.FindGameObjectsWithTag("CameraD"); foreach (GameObject CO in CamerasToDeact) { CO.SetActive(false); } GameObject.FindGameObjectWithTag("CameraA").GetComponent <Camera>().enabled = true; //TODO //Show end screen stuff //Calculate total time decimal totaltime = 0; for (int i = 0; i < TimeList.Length; i++) { totaltime = totaltime + TimeList[i]; } int minutes = (int)totaltime / 60; decimal seconds = totaltime - (minutes * 60); if (!PlayerPrefs.HasKey(StageName + "P")) { PlayerPrefs.SetFloat(StageName + "P", (float)totaltime); } GameObject.FindGameObjectWithTag("PRPTT").GetComponent <TimeTrialResults>().SetResults(TimeList, StageName, totaltime); }
public void COExamplesTest07() { CO poor = new CO(); poor.NullFlavor = NullFlavor.Other; Assert.IsTrue(poor.Validate()); }
public void Graph(System.Xml.XmlWriter s, object o, DatatypeFormatterGraphResult result) { CO instance = (o as ANY).Clone() as CO; // We'll be modifying data instance.Code = (instance.Code ?? new CD <String>()).Clone() as CD <String>; // CO is identical on the wire as a cv in dt r1 CVFormatter formatter = new CVFormatter(); formatter.Host = this.Host; // First, is the instance null? if (instance == null) { return; } else if (instance.IsNull) { if (instance.Code == null) { instance.Code = new CD <string>(); } else if (instance.Code.IsNull) { result.AddResultDetail(new ResultDetail(ResultDetailType.Warning, "NullFlavor from CO instance will overwrite NullFlavor from Code Property", s.ToString(), null)); } instance.Code.NullFlavor = instance.NullFlavor; } else if (instance.Flavor != null) { if (instance.Code == null) { instance.Code = new CD <string>(); } else if (instance.Code.Flavor != null) { result.AddResultDetail(new ResultDetail(ResultDetailType.Warning, "Flavor from CO instance will overwrite Flavor from Code Property", s.ToString(), null)); } instance.Code.Flavor = instance.Flavor; } // Graph formatter.Graph(s, instance.Code, result); // Append details if (instance.Value != null) { result.AddResultDetail(new UnsupportedDatatypeR1PropertyResultDetail(ResultDetailType.Warning, "Value", "CO", s.ToString())); } else if (instance.Code != null && instance.Code.Qualifier != null) { result.AddResultDetail(new UnsupportedDatatypeR1PropertyResultDetail(ResultDetailType.Warning, "Code.Qualifier", "CO", s.ToString())); } else if (instance.Code != null && instance.Code.Translation != null) { result.AddResultDetail(new UnsupportedDatatypeR1PropertyResultDetail(ResultDetailType.Warning, "Code.Translation", "CO", s.ToString())); } }
public void COExamplesTest03() { CO poor = new CO(new CD <String>("1", "2.3.4.5.6.7")); poor.NullFlavor = null; poor.Value = null; Assert.IsTrue(poor.Validate()); }
public void COExamplesTest01() { CO poor = new CO(1, new CD <String>("1", "2.3.4.5.6.7")); poor.Code.DisplayName = "poor"; poor.NullFlavor = null; Assert.IsTrue(poor.Validate()); }
public override string ToString() { return(string.Join(",", ApiKey, Temp.ToString(CultureInfo.InvariantCulture), Hum.ToString(CultureInfo.InvariantCulture), Preassure.ToString(CultureInfo.InvariantCulture), CO2.ToString(CultureInfo.InvariantCulture), LPG.ToString(CultureInfo.InvariantCulture), CO.ToString(CultureInfo.InvariantCulture), CH4.ToString(CultureInfo.InvariantCulture), Dust.ToString(CultureInfo.InvariantCulture), Longitude.ToString(CultureInfo.InvariantCulture), Latitude.ToString(CultureInfo.InvariantCulture))); }
public void COValueCodeNullFlavorTest() { CO co = new CO(); co.NullFlavor = NullFlavor.NotAsked; co.Code = "Hello"; co.Value = 3; Assert.IsFalse(co.Validate()); }
public void DisableClickColliders() { foreach (ClickableObject CO in gameObject.transform.GetComponentsInChildren <ClickableObject>()) { CO.enabled = false; CO.GetComponent <Collider>().enabled = false; CO.GetComponent <Renderer>().enabled = false; } }
public void COToIntTest() { CO foo = new CO() { Value = (Decimal)1.2 }; Assert.AreEqual(1, foo.ToInt()); }
public void CONullFlavorTest() { CO co = new CO(); co.NullFlavor = NullFlavor.NotAsked; co.Code = null; co.Value = null; Assert.IsTrue(co.Validate()); }
public void COValueCodeTest() { CO co = new CO(); co.NullFlavor = null; co.Code = "Hello"; co.Value = 3; Assert.IsTrue(co.Validate()); }
public void R2COBasicSerializationTest() { CO poor = new CO(1, new CD<String>("1", "2.3.4.5.6.7")); poor.Code.DisplayName = "poor"; var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" value=""1""><code code=""1"" codeSystem=""2.3.4.5.6.7""><displayName value=""poor"" language=""en-US""/></code></test>"; var actualXml = R2SerializationHelper.SerializeAsString(poor); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void COToDoubleTest() { CO foo = new CO() { Value = (Decimal)1.2 }; Assert.AreEqual(1.2, foo.ToDouble()); }
public void CONullTest() { CO co = new CO(); co.NullFlavor = null; co.Code = null; co.Value = null; Assert.IsFalse(co.Validate()); }
public void R2COBasicSerializationTest() { CO poor = new CO(1, new CD <String>("1", "2.3.4.5.6.7")); poor.Code.DisplayName = "poor"; var expectedXml = @"<test xmlns=""urn:hl7-org:v3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" value=""1""><code code=""1"" codeSystem=""2.3.4.5.6.7""><displayName value=""poor"" language=""en-US""/></code></test>"; var actualXml = R2SerializationHelper.SerializeAsString(poor); R2SerializationHelper.XmlIsEquivalent(expectedXml, actualXml); }
public void COTypeMismatchEqualityTest() { CO a = new CO() { Value = (Decimal)1.2, Code = "12345" }; Assert.IsFalse(a.Equals(5)); }
private void sbros_Click(object sender, EventArgs e) { button_off(); foreach (DataGridViewRow row in Table.SelectedRows) { row.Selected = false; } NM.Clear(); PAG.Clear(); BO.Clear(); OPI.Clear(); JA.Clear(); CO.Clear(); }
public void COUsingToDoubleOnCOTest() { // create instance assigning value and using the ToDouble() function. // NOTE: the coInstance value does not actually change in memory CO coInstance = new CO(); coInstance.Value = (Decimal)4.5f; // true if the ToDouble method works correctly Assert.IsTrue(coInstance.ToDouble() == 4.5f); // passes }
public void COUsingToIntOnCOTest() { // create instance assigning value and using the ToInt() function. // NOTE: the value of the coInstance object does not change. CO coInstance = new CO(); coInstance.Value = (Decimal)4.5f; // is true if the ToInt() method works correctly. Assert.IsTrue(coInstance.ToInt() == 4); }
private void AcceptEnter() { if (dgvOrderList.SelectedRows[0].Index >= 0) { m_selectedOrder = (CO)dgvOrderList.SelectedRows[0].DataBoundItem; DialogResult = DialogResult.OK; } else { DialogResult = DialogResult.Cancel; } }
private void dgvDistributorList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvOrderList.SelectedRows[0].Index > -1) { m_selectedOrder = (CO)dgvOrderList.SelectedRows[0].DataBoundItem; DialogResult = DialogResult.OK; } else { DialogResult = DialogResult.Cancel; } }
public void COExamplesTest06() { CO poor = new CO(1); poor.NullFlavor = null; Assert.IsTrue(poor.Validate()); }
public void COExamplesTest05() { CO poor = new CO(1); poor.NullFlavor = NullFlavor.Other; Assert.IsFalse(poor.Validate()); }
public void COExamplesTest04() { CO poor = new CO(new CD<String>("1", "2.3.4.5.6.7")); poor.NullFlavor = NullFlavor.Other; poor.Value = null; Assert.IsFalse(poor.Validate()); }
public void COContentSameEqualityTest() { CO a = new CO() { Value = (Decimal)1.2, Code = "12345" }, b = new CO() { Value = (Decimal)1.2, Code = "12345" }; Assert.IsTrue(a.Equals(b)); Assert.IsTrue(b.Equals(a)); }
public void COValueCodeTest() { CO co = new CO(); co.NullFlavor = null; co.Code = "Hello"; co.Value = 3; Assert.IsTrue(co.Validate()); }
public void COToIntTest() { CO foo = new CO() { Value = (Decimal)1.2 }; Assert.AreEqual(1, foo.ToInt()); }
public void COUsingToIntOnCOTest() { // create instance assigning value and using the ToInt() function. // NOTE: the value of the coInstance object does not change. CO coInstance = new CO(); coInstance.Value = (Decimal)4.5f; // is true if the ToInt() method works correctly. Assert.IsTrue(coInstance.ToInt() == 4); }
public void COUsingToDoubleOnCOTest() { // create instance assigning value and using the ToDouble() function. // NOTE: the coInstance value does not actually change in memory CO coInstance = new CO(); coInstance.Value = (Decimal)4.5f; // true if the ToDouble method works correctly Assert.IsTrue(coInstance.ToDouble() == 4.5f); // passes }
public void COExamplesTest07() { CO poor = new CO(); poor.NullFlavor = NullFlavor.Other; Assert.IsTrue(poor.Validate()); }
public void COToDoubleTest() { CO foo = new CO() { Value = (Decimal)1.2 }; Assert.AreEqual(1.2, foo.ToDouble()); }
public void COExamplesTest01() { CO poor = new CO(1, new CD<String>("1","2.3.4.5.6.7")); poor.Code.DisplayName = "poor"; poor.NullFlavor = null; Assert.IsTrue(poor.Validate()); }
public void CONullFlavorTest() { CO co = new CO(); co.NullFlavor = NullFlavor.NotAsked; co.Code = null; co.Value = null; Assert.IsTrue(co.Validate()); }
public void CONullTest() { CO co = new CO(); co.NullFlavor = null; co.Code = null; co.Value = null; Assert.IsFalse(co.Validate()); }
public void COContentDifferentEqualityTest() { CO a = new CO() { Value = (Decimal)1.2, Code = "12345" }, b = new CO() { Value = (Decimal)1.3, Code = "12345" }; Assert.IsFalse(a.Equals(b)); }
public void COExamplesTest08() { CO poor = new CO(); poor.NullFlavor = null; Assert.IsFalse(poor.Validate()); }
public void COValueCodeNullFlavorTest() { CO co = new CO(); co.NullFlavor = NullFlavor.NotAsked; co.Code = "Hello"; co.Value = 3; Assert.IsFalse(co.Validate()); }
/// <summary> /// Parse function /// </summary> /// <param name="s"></param> /// <returns></returns> public object Parse(System.Xml.XmlReader s, DatatypeFormatterParseResult result) { var retVal = CDFormatter.Parse<CD<String>>(s, Host, result); CO instance = new CO(); instance.Code = retVal; // Propogate if (instance.Code != null) { instance.Flavor = instance.Code.Flavor; instance.NullFlavor = instance.Code.NullFlavor; instance.Code.NullFlavor = null; instance.Code.Flavor = null; } ANYFormatter fmtr = new ANYFormatter(); fmtr.Validate(instance, s.ToString(), result); return instance; }
public void COTypeMismatchEqualityTest() { CO a = new CO() { Value = (Decimal)1.2, Code = "12345" }; Assert.IsFalse(a.Equals(5)); }