コード例 #1
0
        public ServerInterop(int boards, ObservableCollection <Board> BoardObjs, SetupModel instance)
        {
            this.boards    = boards;
            this.BoardObjs = new ObservableCollection <Board>(BoardObjs);
            myObj          = new ManagedObject(boards); //send number of boards
            this.instance  = instance;

            //metto qui la createsetboardtocheck?

            /*foreach (Board b in BoardObjs)
             * {
             *  myObj.set_board_toCheck(b.MAC.ToCharArray(0, 17));
             * }*/
        }
コード例 #2
0
ファイル: SetupModel.cs プロジェクト: MatteoCultrera/Esp2.1
        private void okClick(object sender)
        {
            switch (screen)
            {
            case 1:
                screen    = 2;
                numBoards = "";
                Title     = "Insert Boards MAC";
                Subtitle  = "";
                NotifyPropertyChanged("colorTextBox");
                NotifyPropertyChanged("textBoxEnabled");
                ButtonEnabled = false;
                for (int i = 1; i <= boards; i++)
                {
                    BoardObjs.Add(new Board("/Resources/Icons/Boards/BoardN.png", "Board " + i.ToString(), false));
                }

                break;

            case 2:
                screen = 3;
                foreach (Board b in BoardObjs)
                {
                    b.macEditable = false;
                }
                Title         = "Connecting";
                Subtitle      = "";
                ButtonEnabled = false;

                //sending data to c++
                ManagedObject myObj = new ManagedObject(boards);


                break;
            }
        }