Esempio n. 1
0
 private static void CloneRow(IGrindOMeterTrackingRow targetRow, IGrindOMeterTrackingRow templateRow)
 {
     targetRow.Id = templateRow.Id;
     targetRow.Name.SetText(templateRow.Name.GetText());
     targetRow.IconTexture.SetTexture(templateRow.IconTexture.GetTexture());
     targetRow.Amount.SetText(templateRow.Amount.GetText());
     targetRow.Velocity.SetText(templateRow.Velocity.GetText());
 }
Esempio n. 2
0
        private static void ValidateAnchor(IFrame expectedAnchorContainer, IGrindOMeterTrackingRow row)
        {
            Assert.AreEqual(2, row.GetNumPoints());

            var point1 = row.GetPoint(1);

            Assert.AreEqual(FramePoint.TOPLEFT, point1.Value1);
            Assert.AreEqual(expectedAnchorContainer, point1.Value2);
            Assert.AreEqual(FramePoint.TOPLEFT, point1.Value3);
            Assert.AreEqual(0, point1.Value4);
            Assert.AreEqual(0, point1.Value5);

            var point2 = row.GetPoint(2);

            Assert.AreEqual(FramePoint.TOPRIGHT, point2.Value1);
            Assert.AreEqual(expectedAnchorContainer, point1.Value2);
            Assert.AreEqual(FramePoint.TOPRIGHT, point2.Value3);
            Assert.AreEqual(0, point2.Value4);
            Assert.AreEqual(0, point2.Value5);
        }
Esempio n. 3
0
        private void ApplyTrackingEntityHandlersToRow(IGrindOMeterTrackingRow row)
        {
            var parent = (IGrindOMeterTrackingRow)row.ResetButton.GetParent();

            row.ResetButton.SetScript(ButtonHandler.OnClick, (button) =>
            {
                if (this.onReset != null)
                {
                    this.onReset(parent.Id);
                }
            });

            row.RemoveButton.SetScript(ButtonHandler.OnClick, (button) =>
            {
                if (this.onRemove != null)
                {
                    this.onRemove(parent.Id);
                }
            });
        }