Пример #1
0
        public void SetGridCellContent()
        {
            IGridConfiguration conf = CreateTestConfig();
            IGrid grid = new SquareGrid(conf);

            ICellContent content = Substitute.For <ICellContent>();

            Cell.Cell cell = grid.GetCell(0, 0);
            cell.Content = content;

            Assert.AreEqual(content, grid.GetCell(0, 0).Content);
        }
Пример #2
0
        public _TextCell()
        {
            Tapped += Bubble_Clicked;

            #region
            members = new Dictionary <string, Variable>
            {
                { "Text", new FVariable {
                      ongetvalue = () => new Gstring(Text.ToString()),
                      onsetvalue = (value) =>
                      {
                          Text = value.ToString();
                          return(0);
                      }
                  } },
                { "Detail", new FVariable {
                      ongetvalue = () => new Gstring(Detail.ToString()), onsetvalue = (value) =>
                      {
                          Detail = value.ToString();
                          return(0);
                      }
                  } },
                { "DetailColor", new FVariable
                  {
                      ongetvalue = () => new Gstring(DetailColor.ToString()),
                      onsetvalue = (value) =>
                      {
                          DetailColor = (Color) new ColorTypeConverter().ConvertFromInvariantString(value.ToString());
                          return(0);
                      }
                  } },
                { "Foreground", new FVariable {
                      ongetvalue = () => new Gstring(TextColor.ToString()),
                      onsetvalue = (value) =>
                      {
                          TextColor = (Color) new ColorTypeConverter().ConvertFromInvariantString(value.ToString());
                          return(0);
                      }
                  } },
                { "Clickevent", new FVariable
                  {
                      ongetvalue   = () => event_click as IOBJ
                      , onsetvalue = (value) =>
                      {
                          event_click = value;
                          return(0);
                      }
                  } }
            };
            parent = new Cell.Cell(this);
            #endregion
        }