コード例 #1
0
        public void moveMine(int adress)
        {
            MineTrace mine = new MineTrace();
            int       x    = 0;
            int       y    = 0;

            x = adress / 7;
            y = adress / 7;
            mine.pBMine.Location = new Point(mine.pBMine.Location.X + minePositionX[x], mine.pBMine.Location.Y + minePositionY[y]);
        }
コード例 #2
0
        private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
        {
            MineTrace mine = new MineTrace();

            Indata = (string)_sp.ReadExisting();
            if (Indata != null)
            {
                // mine.MoveMine();
            }
        }
コード例 #3
0
ファイル: UDPSocket.cs プロジェクト: Charma95/Pri-US
        public void Client(string address, int port)
        {
            MineTrace mine = new MineTrace();

            _socket.Connect(IPAddress.Parse(address), port);
            if (_socket.Connected)
            {
                mine.rtbOutput.Text = "Connected to Pri-US";
            }
            Receive();
        }
コード例 #4
0
ファイル: UDPSocket.cs プロジェクト: Charma95/Pri-US
        public void Server(string address, int port)
        {
            MineTrace mine = new MineTrace();

            _socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.ReuseAddress, true);
            _socket.Bind(new IPEndPoint(IPAddress.Parse(address), port));
            bool part1 = _socket.Poll(1000, SelectMode.SelectRead);
            bool part2 = _socket.Available == 0;

            if (part1 && part2)
            {
                mine.rtbOutput.Text = " Connected to Pri-us";
            }
            Receive();
        }
コード例 #5
0
ファイル: Login.cs プロジェクト: Charma95/Pri-US
 public Login(MineTrace Parent)
 {
     InitializeComponent();
     parent = Parent;
 }