예제 #1
0
파일: Main.cs 프로젝트: cjswin/SiK
		/// <summary>
		/// Called when the monitor window is closed.
		/// </summary>
		/// <param name='obj'>
		/// Object.
		/// </param>
		/// <param name='args'>
		/// Arguments.
		/// </param>
		private void end_monitor (object sender, DeleteEventArgs args)
		{
			// forget about the monitor
			mon = null;
		}
예제 #2
0
 /// <summary>
 /// Called when the monitor window is closed.
 /// </summary>
 /// <param name='obj'>
 /// Object.
 /// </param>
 /// <param name='args'>
 /// Arguments.
 /// </param>
 private void end_monitor(object sender, DeleteEventArgs args)
 {
     // forget about the monitor
     mon = null;
 }
예제 #3
0
파일: Main.cs 프로젝트: cjswin/SiK
		/// <summary>
		/// Create a serial port monitor for the supplied port name, in response
		/// to an event generated by the main window.
		/// </summary>
		/// <param name='portname'>
		/// Name of the serial port to open.
		/// </param>
		private void show_monitor (string portname)
		{
			// ignore monitor activation requests while uploading
			if (upload_in_progress)
				return;
			
			// set/switch port assignment
			set_port (portname);
			
			// create the monitor if it's not already open
			if (mon == null) {
				
				// create a new monitor
				mon = new Mon (port);
				//mon.QuitEvent += end_monitor; ??
				mon.DeleteEvent += end_monitor;
				mon.LogEvent += log;
				
				// and connect it to the port
				mon.connect (port);
				
			} else {
				
				// bring the window to the front
				mon.Present ();
			}
		}