Exemplo n.º 1
0
        private void DisposeView()
        {
            if (_loaded)
            {
                if (_editorProcess != null)
                {
                    _editorProcess.Dispose();
                    _editorProcess = null;
                }

                if (_propGridSocket != null)
                {
                    _propGridSocket.Dispose();
                    _propGridSocket = null;
                }

                if (_designerSocket != null)
                {
                    _surfaceFrame.Remove(_designerSocket);
                    _designerSocket.Dispose();
                    _designerSocket = null;
                }
                _loaded = false;
            }
        }
Exemplo n.º 2
0
        private void InitializeView()
        {
            _designerSocket = new Gtk.Socket();
            _designerSocket.Show();
            _surfaceFrame.Add(_designerSocket);
            _surfaceFrame.ShowAll();

            _propGridSocket = new Gtk.Socket();
            _propGridSocket.Show();
            _propertyGridFrame.Add(_propGridSocket);

            _editorProcess = (EditorProcess)Runtime.ProcessService.CreateExternalProcessObject(typeof(EditorProcess), false);

            if (_designerSocket.IsRealized)
            {
                _editorProcess.AttachDesigner(_designerSocket.Id);
            }
            if (_propGridSocket.IsRealized)
            {
                _editorProcess.AttachPropertyGrid(_propGridSocket.Id);
            }
            _designerSocket.Realized += delegate { _editorProcess.AttachDesigner(_designerSocket.Id); };
            _propGridSocket.Realized += delegate { _editorProcess.AttachPropertyGrid(_propGridSocket.Id); };

            _editorProcess.Initialize(_designerFile);
        }
		private void DisposeView()
		{			
			if (_loaded) {
				if (_editorProcess != null) {
					_editorProcess.Dispose ();
					_editorProcess = null;
				}

				if (_propGridSocket != null) {
					_propGridSocket.Dispose ();
					_propGridSocket = null;
				}
				
				if (_designerSocket != null) {
					_surfaceFrame.Remove (_designerSocket);
					_designerSocket.Dispose ();
					_designerSocket = null;
				}
				_loaded = false;
			}
		}
		private void InitializeView ()
		{
			_designerSocket = new Gtk.Socket ();
			_designerSocket.Show ();
			_surfaceFrame.Add (_designerSocket);
			_surfaceFrame.ShowAll ();
			
			_propGridSocket = new Gtk.Socket ();
			_propGridSocket.Show ();
			_propertyGridFrame.Add (_propGridSocket);
			
			_editorProcess = (EditorProcess) Runtime.ProcessService.CreateExternalProcessObject (typeof (EditorProcess), false);

			if (_designerSocket.IsRealized)
				_editorProcess.AttachDesigner (_designerSocket.Id);
			if (_propGridSocket.IsRealized)
				_editorProcess.AttachPropertyGrid (_propGridSocket.Id);
			_designerSocket.Realized += delegate { _editorProcess.AttachDesigner (_designerSocket.Id); };
			_propGridSocket.Realized += delegate { _editorProcess.AttachPropertyGrid (_propGridSocket.Id); };

			_editorProcess.Initialize (_designerFile);
		}