public Form1() { InitializeComponent(); com = new UDPComm(); com.TextMessageRecieved += Com_MessageRecieved; com.Start(); }
public frmMain() { InitializeComponent(); Tls = new clsTools(this); CommPort = new SerialComm(this, PortID); UDPmodulesConfig = new UDPComm(this, 29900, 28800, 1482); // pcb config CommPort.ModuleConnected += CommPort_ModuleConnected; }
public frmChatWindow() { InitializeComponent(); com = new UDPComm(); Me = new Entities.User(Entities.Properties.Settings.Default.DisplayName, (UserStatus)Entities.Properties.Settings.Default.Status, com.GetMyIPAddress()); com.TextMessageRecieved += Com_MessageRecieved; com.Start(); }
public frmChatWindow(StatusIndicator si) { InitializeComponent(); SI = si; Me = new Entities.User(); com = new UDPComm(); com.TextMessageRecieved += Com_MessageRecieved; com.Start(); }
public frmMain() { InitializeComponent(); frmState = FormState.Maximize; com = new UDPComm(); com.MessageRecieved += Com_MessageRecieved; Me = new User(Entities.Properties.Settings.Default.DisplayName, (UserStatus)Entities.Properties.Settings.Default.Status, com.GetMyIPAddress()); com.Start(); }
private void InitializeVariable() { _constants = new Constants(); imageSourceBackgrounds = new BitmapImage(); imageSource_topBar = new BitmapImage(); videos = new MediaElement[20]; images = new Image[20]; videoPosition = new Label[20]; videoTitleLable = new Label[20]; waitingTB = new TextBlock[20]; periodTB = new TextBlock[20]; videoStates = new int[20]; videoTitle = new int[20]; udpComm = null; tcpComm = null; totalBackgroundImage = 5; num = 0; titleNum = 0; totalTitleNum = 2; currPosD = 0; clientNum = 100; imgNum = 0; playingId = -1; _totalVideoTime_mars = 408747; _totalVideoTime_student = 314048; isColorTest = false; isVideoOnOffVersion = true; isFirst = true; isDragging = false; isReverseTime = false; isPlayBtnClicked = false; fileName = ""; _marsTitle = "우주 생활"; _studentTitle = "중학생의 일상"; _marsFilePath = "Mars.mp4"; _studentFilePath = "Student.mp4"; _playAllMessage = "PlayAll"; _pauseAllMessage = "PauseAll"; serverIP = "192.168.1.10"; getDoublePositionDelimiter = ':'; ipDelimiter = '.'; messageHandlingDelimiter = '_'; }
public MainWindow() { GCLatencyMode oldMode = GCSettings.LatencyMode; // Make sure we can always go to the catch block, // so we can set the latency mode back to `oldMode` RuntimeHelpers.PrepareConstrainedRegions(); try { GCSettings.LatencyMode = GCLatencyMode.LowLatency; // Generation 2 garbage collection is now // deferred, except in extremely low-memory situations } finally { // ALWAYS set the latency mode back GCSettings.LatencyMode = oldMode; } InitializeVariable(); LoadBackgroundImage(); InitializeComponent(); Application.Current.MainWindow.WindowState = WindowState.Maximized; for (int i = 0; i < 20; i++) { videoStates[i] = (int)VideoState.None; videoTitle[i] = (int)VideoTitle.Mars; } Loaded += MainWindow_Loaded; timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += timer_Tick; udpComm = new UDPComm(); udpComm.OnReceiveMessage += new UDPComm.ReceiveMessageHandler(udpComm_OnReceiveMessage); udpThread = new Thread(udpComm.InitUDPSocket); udpThread.IsBackground = true; udpThread.Start(); //udpComm.Start(); }