Пример #1
0
		public static int Show (string screenMsg, MPFQA.Display display, List<string> displayMsg)
		{
			_response = 0;
			_md = new MessageDialog (null, DialogFlags.DestroyWithParent, MessageType.Other, ButtonsType.OkCancel, screenMsg);
			_md.Response += new ResponseHandler (MessageBoxRespHandler);
			SerialPortLib.ReadHandler rh = display.comm.GetReadHandler;
			display.comm.GetReadHandler = DisplayRespHandler;
			display.SetText (displayMsg);

			_md.ShowNow ();

			while (_response == 0)
			{
		         while (Gtk.Application.EventsPending ())
		              Gtk.Application.RunIteration ();

				System.Threading.Thread.Sleep(50);
			}
			Destroy();

			display.comm.GetReadHandler = rh;

			return _response;
		}