Пример #1
0
		public ReferenceCountedObjectBase(ComManager comManager)
		{
			_comManager = comManager;
			_comManager.InterlockedIncrementObjectsCount();

			ComDebug.ReportInfo("{0}.Constructor, NumberOfObjectsInUse={1}", this.GetType().Name, _comManager.ObjectsCount);
		}
Пример #2
0
        public ReferenceCountedObjectBase(ComManager comManager)
        {
            _comManager = comManager;
            _comManager.InterlockedIncrementObjectsCount();

            ComDebug.ReportInfo("{0}.Constructor, NumberOfObjectsInUse={1}", GetType().Name, _comManager.ObjectsCount);
        }
Пример #3
0
        public GraphDocumentEmbeddedComObject(ComManager comManager)
            : base(comManager)
        {
            ComDebug.ReportInfo("{0} constructor.", GetType().Name);

            _dataAdviseHolder = new ManagedDataAdviseHolder();
            _oleAdviseHolder  = new ManagedOleAdviseHolderFM();
        }
Пример #4
0
		public ProjectFileComObject(ComManager comManager)
			: base(comManager)
		{
			// 1. Monitor the change of the project instance
			Current.ProjectService.ProjectChanged += EhCurrentProjectInstanceChanged;

			EhCurrentProjectInstanceChanged(null, null);
		}
Пример #5
0
        public ProjectFileComObject(ComManager comManager)
            : base(comManager)
        {
            // 1. Monitor the change of the project instance
            Current.IProjectService.ProjectChanged += EhCurrentProjectInstanceChanged;

            EhCurrentProjectInstanceChanged(null, null);
        }
		public GraphDocumentEmbeddedComObject(ComManager comManager)
			: base(comManager)
		{
			ComDebug.ReportInfo("{0} constructor.", this.GetType().Name);

			_dataAdviseHolder = new ManagedDataAdviseHolder();
			_oleAdviseHolder = new ManagedOleAdviseHolderFM();
		}
Пример #7
0
		public GraphDocumentLinkedComObject(GraphDocument graphDocument, ProjectFileComObject fileComObject, ComManager comManager)
			: base(comManager)
		{
			ComDebug.ReportInfo("{0} constructor.", this.GetType().Name);

			_dataAdviseHolder = new ManagedDataAdviseHolder();
			_oleAdviseHolder = new ManagedOleAdviseHolderFM();

			Document = graphDocument;

			if (null != fileComObject)
			{
				fileComObject.FileMonikerChanged += EhFileMonikerChanged;
				EhFileMonikerChanged(fileComObject.FileMoniker);
			}
		}
Пример #8
0
		public GraphDocumentDataObject(GraphDocumentBase graphDocument, ProjectFileComObject fileComObject, ComManager comManager)
			: base(comManager)
		{
			ComDebug.ReportInfo("{0} constructor.", this.GetType().Name);
			_dataAdviseHolder = new ManagedDataAdviseHolder();

			_graphDocumentName = graphDocument.Name;
			_graphDocumentSize = graphDocument.Size;

			_graphExportOptions = graphDocument.GetPropertyValue(ClipboardRenderingOptions.PropertyKeyClipboardRenderingOptions, () => new ClipboardRenderingOptions()).Clone();
			var embeddedRenderingOptions = graphDocument.GetPropertyValue(EmbeddedObjectRenderingOptions.PropertyKeyEmbeddedObjectRenderingOptions, () => null);
			if (null != embeddedRenderingOptions)
				_graphExportOptions.CopyFrom(embeddedRenderingOptions); // merge embedded rendering options

			if ((_graphExportOptions.RenderEnhancedMetafile && _graphExportOptions.RenderEnhancedMetafileAsVectorFormat) ||
					(_graphExportOptions.RenderDropFile && _graphExportOptions.DropFileImageFormat == System.Drawing.Imaging.ImageFormat.Emf)
				)
			{
				if (graphDocument is Altaxo.Graph.Gdi.GraphDocument)
					_graphDocumentMetafileImage = GraphDocumentExportActions.RenderAsEnhancedMetafileVectorFormat((Altaxo.Graph.Gdi.GraphDocument)graphDocument, _graphExportOptions);
			}

			if (null == _graphDocumentMetafileImage ||
				_graphExportOptions.RenderBitmap ||
				_graphExportOptions.RenderWindowsMetafile ||
				(_graphExportOptions.RenderEnhancedMetafile && !_graphExportOptions.RenderEnhancedMetafileAsVectorFormat) ||
				_graphExportOptions.RenderDropFile)
			{
				if (graphDocument is Altaxo.Graph.Gdi.GraphDocument)
					_graphDocumentBitmapImage = GraphDocumentExportActions.RenderAsBitmap((Altaxo.Graph.Gdi.GraphDocument)graphDocument, _graphExportOptions.BackgroundBrush, System.Drawing.Imaging.PixelFormat.Format32bppArgb, _graphExportOptions.SourceDpiResolution, _graphExportOptions.SourceDpiResolution / _graphExportOptions.OutputScalingFactor);
				else if (graphDocument is Altaxo.Graph.Graph3D.GraphDocument)
					_graphDocumentBitmapImage = Altaxo.Graph.Graph3D.GraphDocumentExportActions.RenderAsBitmap((Altaxo.Graph.Graph3D.GraphDocument)graphDocument, _graphExportOptions.BackgroundBrush, System.Drawing.Imaging.PixelFormat.Format32bppArgb, _graphExportOptions.SourceDpiResolution, _graphExportOptions.SourceDpiResolution / _graphExportOptions.OutputScalingFactor);
				else
					throw new NotImplementedException();
			}

			if (_graphExportOptions.RenderEmbeddedObject)
			{
				var miniProjectBuilder = new Altaxo.Graph.Procedures.MiniProjectBuilder();
				_altaxoMiniProject = miniProjectBuilder.GetMiniProject(graphDocument, true);
			}
			else
			{
				_altaxoMiniProject = null;
			}
		}
Пример #9
0
 public ClassFactoryBase(ComManager comManager)
 {
     _comManager = comManager;
 }
		public ClassFactory_ProjectFileComObject(ComManager comManager)
			: base(comManager)
		{
		}
Пример #11
0
        public GraphDocumentLinkedComObject(GraphDocument graphDocument, ProjectFileComObject fileComObject, ComManager comManager)
            : base(comManager)
        {
            ComDebug.ReportInfo("{0} constructor.", GetType().Name);

            _dataAdviseHolder = new ManagedDataAdviseHolder();
            _oleAdviseHolder  = new ManagedOleAdviseHolderFM();

            Document = graphDocument;

            if (null != fileComObject)
            {
                fileComObject.FileMonikerChanged += EhFileMonikerChanged;
                EhFileMonikerChanged(fileComObject.FileMoniker);
            }
        }
Пример #12
0
		public DataObjectBase(ComManager comManager)
			: base(comManager)
		{
		}
 public ClassFactory_GraphDocumentEmbeddedComObject(ComManager comManager)
     : base(comManager)
 {
 }
Пример #14
0
 public OleObjectBase(ComManager comManager)
     : base(comManager)
 {
 }
		public ClassFactory_GraphDocumentEmbeddedComObject(ComManager comManager)
			: base(comManager)
		{
		}
 public ClassFactory_ProjectFileComObject(ComManager comManager)
     : base(comManager)
 {
 }
Пример #17
0
 public DataObjectBase(ComManager comManager)
     : base(comManager)
 {
 }
Пример #18
0
		public OleObjectBase(ComManager comManager)
			: base(comManager)
		{
		}
Пример #19
0
		public ClassFactoryBase(ComManager comManager)
		{
			_comManager = comManager;
		}
Пример #20
0
        public GraphDocumentDataObject(GraphDocumentBase graphDocument, ProjectFileComObject fileComObject, ComManager comManager)
            : base(comManager)
        {
            ComDebug.ReportInfo("{0} constructor.", GetType().Name);
            _dataAdviseHolder = new ManagedDataAdviseHolder();

            _graphDocumentName = graphDocument.Name;
            _graphDocumentSize = graphDocument.Size;

            _graphExportOptions = graphDocument.GetPropertyValue(ClipboardRenderingOptions.PropertyKeyClipboardRenderingOptions, () => new ClipboardRenderingOptions()).Clone();
            var embeddedRenderingOptions = graphDocument.GetPropertyValue(EmbeddedObjectRenderingOptions.PropertyKeyEmbeddedObjectRenderingOptions, () => null);

            if (null != embeddedRenderingOptions)
            {
                _graphExportOptions.CopyFrom(embeddedRenderingOptions); // merge embedded rendering options
            }
            if ((_graphExportOptions.RenderEnhancedMetafile && _graphExportOptions.RenderEnhancedMetafileAsVectorFormat) ||
                (_graphExportOptions.RenderDropFile && _graphExportOptions.DropFileImageFormat == System.Drawing.Imaging.ImageFormat.Emf)
                )
            {
                if (graphDocument is Altaxo.Graph.Gdi.GraphDocument)
                {
                    _graphDocumentMetafileImage = GraphDocumentExportActions.RenderAsEnhancedMetafileVectorFormat((Altaxo.Graph.Gdi.GraphDocument)graphDocument, _graphExportOptions);
                }
            }

            if (null == _graphDocumentMetafileImage ||
                _graphExportOptions.RenderBitmap ||
                _graphExportOptions.RenderWindowsMetafile ||
                (_graphExportOptions.RenderEnhancedMetafile && !_graphExportOptions.RenderEnhancedMetafileAsVectorFormat) ||
                _graphExportOptions.RenderDropFile)
            {
                if (graphDocument is Altaxo.Graph.Gdi.GraphDocument)
                {
                    _graphDocumentBitmapImage = GraphDocumentExportActions.RenderAsBitmap((Altaxo.Graph.Gdi.GraphDocument)graphDocument, _graphExportOptions.BackgroundBrush, System.Drawing.Imaging.PixelFormat.Format32bppArgb, _graphExportOptions.SourceDpiResolution, _graphExportOptions.SourceDpiResolution / _graphExportOptions.OutputScalingFactor);
                }
                else if (graphDocument is Altaxo.Graph.Graph3D.GraphDocument)
                {
                    _graphDocumentBitmapImage = Altaxo.Graph.Graph3D.GraphDocumentExportActions.RenderAsBitmap((Altaxo.Graph.Graph3D.GraphDocument)graphDocument, _graphExportOptions.BackgroundBrush, System.Drawing.Imaging.PixelFormat.Format32bppArgb, _graphExportOptions.SourceDpiResolution, _graphExportOptions.SourceDpiResolution / _graphExportOptions.OutputScalingFactor);
                }
                else
                {
                    throw new NotImplementedException();
                }
            }

            if (_graphExportOptions.RenderEmbeddedObject)
            {
                var miniProjectBuilder = new Altaxo.Graph.Procedures.MiniProjectBuilder();
                _altaxoMiniProject = miniProjectBuilder.GetMiniProject(graphDocument, true);
            }
            else
            {
                _altaxoMiniProject = null;
            }
        }