private void NCCreateNewPictureBox(IConnector connection, ArgNewPictureBox arg) { long clientFakePBID = arg.PictureBoxID; long realEditablePBID = Uid64.CreateNew().Data; arg.PictureBoxID = realEditablePBID; lock (_npbSync) { _newPB.Enqueue(arg.PictureBoxID, arg); _clientServerPictureBoxID[clientFakePBID] = realEditablePBID; } lock (_astSync) { _argsSendToAllClients.Add(arg); } NetLogger.Log("CreatePB from: " + clientFakePBID + " to " + realEditablePBID); }
private PictureBoxObj CreateNewPictureBox(Image img, Point location) { //Create facepictureBox PictureBoxObj pic = new PictureBoxObj(_netClient.ClientID, Uid64.CreateNew().Data, PictureBoxStatus.IsMovable); if (img != null) { pic.Image = img; pic.Width = img.Width; pic.Height = img.Height; } SubscribeControl(pic); pic.BorderStyle = BorderStyle.FixedSingle; pic.BringToFront(); pic.Parent = _canvas.FrontPicture; pic.Location = location; //Send it to serever SendComNewPictureBox(pic); return(pic); }
public TPHostAutorizator(int maxCount) { _maxCount = maxCount; _listener = new ATCPListenModule(Uid64.CreateNew().Data, NetHelper.READ_BUFFER_BIG); _listener.NewConnectionEvent += OnNewConnectionHandler; }