public MainWindow(int myport, string serverIP, int serverport, string clientname, CIPC_CS.CLIENT.MODE mode,int FPS, string title = "CIPCClient") { try { InitializeComponent(); this.TextBlock_TitleName.Text = title; this.TextBlock_ClientName.Text = clientname; this.TextBlock_ClientPort.Text = myport.ToString(); this.TextBlock_ServerIPAdress.Text = serverIP; this.TextBlock_ServerPort.Text = serverport.ToString(); this.TextBlock_Mode.Text = mode.ToString(); this.TextBlock_FPS.Text = FPS.ToString(); this.MouseLeftButtonDown += (s, e) => this.DragMove(); this.TitleName = "CIPCClient"; this.client = new CIPC_CS.CLIENT.CLIENT(myport, serverIP, serverport, clientname, FPS); this.client.Setup(mode); this.client.DataReceived += client_DataReceived; this.Closing += MainWindow_Closing; } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void Setup(CIPC_CS.CLIENT.MODE mode) { try { this.client.Setup(mode); this.client.DataReceived += client_DataReceived; } catch (Exception ex) { Console.WriteLine(ex.Message); } }