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]); }
private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e) { MineTrace mine = new MineTrace(); Indata = (string)_sp.ReadExisting(); if (Indata != null) { // mine.MoveMine(); } }
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(); }
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(); }
public Login(MineTrace Parent) { InitializeComponent(); parent = Parent; }