public void Should_Serialize_AllComponents() { var field = new CE { Identifier = new ST { Value = "CE.Identifier" }, Text = new ST { Value = "CE.Text" }, NameofCodingSystem = new ID { Value = "CE.NameofCodingSystem" }, AlternateIdentifier1 = new ST { Value = "CE.AlternateIdentifier1" }, AlternateText1 = new ST { Value = "CE.AlternateText1" }, NameofAlternateCodingSystem1 = new ID { Value = "CE.NameofAlternateCodingSystem1" }, AlternateIdentifier2 = new ST { Value = "CE.AlternateIdentifier2" }, AlternateText2 = new ST { Value = "CE.AlternateText2" }, NameofAlternateCodingSystem2 = new ID { Value = "CE.NameofAlternateCodingSystem2" } }; Assert.AreEqual(All, field.ToString()); }
// Print raw data from object lists protected string printReport() { string printRes = null; foreach (SalariedEmployee SE in listSE) { //printRes += SE.ToString() + "<br/>"; listEmployee.Add(Convert.ToInt32(SE.getSalary()), SE.ToString() + "<br/>"); } foreach (HourlyEmployee HE in listHE) { //printRes += HE.ToString() + "<br/>"; listEmployee.Add(Convert.ToInt32(HE.getSalary()), HE.ToString() + "<br/>"); } foreach (CommissionEmployee CE in listCE) { //printRes += CE.ToString() + "<br/>"; listEmployee.Add(Convert.ToInt32(CE.getSalary()), CE.ToString() + "<br/>"); } // Sorting employees foreach (var employ in listEmployee.OrderByDescending(key => key.Key)) { printRes += employ.Value; } // Sorting consultants listCons = listCons.OrderByDescending(o => o.payment).ToList(); foreach (Consultant Cons in listCons) { printRes += Cons.ToString() + "<br/>"; } return(printRes); }
public void Should_Serialize_LastComponent() { var field = new CE { NameofAlternateCodingSystem2 = new ID { Value = "CE.NameofAlternateCodingSystem2" } }; Assert.AreEqual(Last, field.ToString()); }
public void Should_Serialize_FirstComponent() { var field = new CE { Identifier = new ST { Value = "CE.Identifier" } }; Assert.AreEqual(First, field.ToString()); }
private void Total() { decimal AN, R, D, CE, PPC, Otro; AN = R = D = CE = PPC = Otro = decimal.Zero; foreach (var item in dgvDatos.Rows) { if (!item.IsFilteredOut) { if (item.Cells["C"].Value.ToString().Equals("ArtÃculo nuevo")) { AN += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } else if (item.Cells["C"].Value.ToString().Equals("Remate")) { R += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } else if (item.Cells["C"].Value.ToString().Equals("Devolución")) { D += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } else if (item.Cells["C"].Value.ToString().Equals("Compra especial")) { CE += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } else if (item.Cells["C"].Value.ToString().Equals("PPC")) { PPC += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } else { Otro += item.Cells["Diferencia ($)"].Value == DBNull.Value ? decimal.Zero : Convert.ToDecimal(item.Cells["Diferencia ($)"].Value); } } } txtAN.Text = AN.ToString("C0"); txtRemate.Text = R.ToString("C0"); txtDevolucion.Text = D.ToString("C0"); txtCE.Text = CE.ToString("C0"); txtPPC.Text = PPC.ToString("C0"); txtOtros.Text = Otro.ToString("C0"); }
private void NidaleeOnDraw(EventArgs args) { if (Target != null) { Utility.DrawCircle(Target.Position, Target.BoundingRadius, Color.Red, 1, 1); } foreach (var spell in cougarList) { var circle = Config.Item("draw" + spell.Slot.ToString()).GetValue <Circle>(); if (circle.Active && Kitty && !Me.IsDead) { Utility.DrawCircle(Me.Position, spell.Range, circle.Color, 1, 1); } } foreach (var spell in humanList) { var circle = Config.Item("draw" + spell.Slot.ToString()).GetValue <Circle>(); if (circle.Active && !Kitty && !Me.IsDead) { Utility.DrawCircle(Me.Position, spell.Range, circle.Color, 1, 1); } } if (!Config.Item("drawcds").GetValue <bool>()) { return; } var wts = Drawing.WorldToScreen(Me.Position); if (!Kitty) // lets show cooldown timers for the opposite form :) { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (CQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + CQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (CW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + CW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (CE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + CE.ToString("0.0")); } } else { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (HQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + HQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (HW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + HW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (HE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + HE.ToString("0.0")); } } }
private static void NidaleeOnDraw(EventArgs args) { if (Target != null && MainMenu.Item("drawline").GetValue <bool>()) { if (Me.IsDead) { return; } Render.Circle.DrawCircle(Target.Position, Target.BoundingRadius - 50, Color.Yellow); } foreach (var spell in CougarList) { var circle = MainMenu.Item("draw" + spell.Slot).GetValue <Circle>(); if (circle.Active && CougarForm && !Me.IsDead) { Render.Circle.DrawCircle(Me.Position, spell.Range, circle.Color, 2); } } foreach (var spell in HumanList) { var circle = MainMenu.Item("draw" + spell.Slot).GetValue <Circle>(); if (circle.Active && !CougarForm && !Me.IsDead) { Render.Circle.DrawCircle(Me.Position, spell.Range, circle.Color, 2); } } if (!MainMenu.Item("drawcds").GetValue <bool>()) { return; } var wts = Drawing.WorldToScreen(Me.Position); if (!CougarForm) // lets show cooldown timers for the opposite form :) { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (CQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + CQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (CW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + CW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (CE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + CE.ToString("0.0")); } } else { if (Me.Spellbook.CanUseSpell(SpellSlot.Q) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Null"); } else if (HQ == 0) { Drawing.DrawText(wts[0] - 80, wts[1], Color.White, "Q: Ready"); } else { Drawing.DrawText(wts[0] - 80, wts[1], Color.Orange, "Q: " + HQ.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.W) == SpellState.NotLearned) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Null"); } else if (HW == 0) { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.White, "W: Ready"); } else { Drawing.DrawText(wts[0] - 30, wts[1] + 30, Color.Orange, "W: " + HW.ToString("0.0")); } if (Me.Spellbook.CanUseSpell(SpellSlot.E) == SpellState.NotLearned) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Null"); } else if (HE == 0) { Drawing.DrawText(wts[0], wts[1], Color.White, "E: Ready"); } else { Drawing.DrawText(wts[0], wts[1], Color.Orange, "E: " + HE.ToString("0.0")); } } }