Esempio n. 1
0
            public NetElementXY([NotNull] NetElement element, [NotNull] IPoint pointTemplate)
            {
                Element = element;
                IPoint point = element.QueryNetPoint(pointTemplate);

                double x, y;

                point.QueryCoords(out x, out y);
                X = x;
                Y = y;
            }
Esempio n. 2
0
        private void AddToValues([NotNull] NetElement netElement,
                                 int tableIndex,
                                 bool addDistinctValues,
                                 [NotNull] ICollection <object> list)
        {
            object value = GetFieldExpressionValue(netElement, tableIndex);

            if (addDistinctValues && list.Contains(value))
            {
                return;
            }

            list.Add(value);
        }
Esempio n. 3
0
 public void ClientConnect()
 {
     try
     {
         localUser = nameText.text;
         socket    = new Client(connectText.text);
         InvokeRepeating("Listen", 0.04f, 0.04f);
         SceneManager.LoadScene("GameScene");
     }
     catch (System.Exception)
     {
         throw;
     }
 }
Esempio n. 4
0
 public void StartServer()
 {
     try
     {
         localUser = nameText.text;
         socket    = new Server();
         InvokeRepeating("Listen", 0.04f, 0.04f);
         SceneManager.LoadScene("GameScene");
     }
     catch (System.Exception)
     {
         return;
     }
 }
Esempio n. 5
0
        private object GetFieldExpressionValue([NotNull] NetElement netElement,
                                               int tableIndex)
        {
            IRow      row       = netElement.Row.Row;
            TableView tableView = _tableViews[tableIndex];

            DataRow helperRow = tableView.Add(row);

            Assert.NotNull(helperRow, "no row returned");

            var directedRow = netElement as DirectedRow;

            if (directedRow != null)
            {
                helperRow[QaConnections.StartsIn] = !directedRow.IsBackward;
            }

            return(helperRow[_expressionFieldName]);
        }