Пример #1
0
        private void IntializeAnnContainer()
        {
             SuspendLayout();

            imageViewer = new RasterImageViewer();
             imageViewer.Dock = DockStyle.Fill;
             imageViewer.EnableScrollingInterface = true;
             this.imageViewer.KeyDown += new System.Windows.Forms.KeyEventHandler(this.imageViewer_KeyDown);
             this.imageViewer.DoubleClick += new System.EventHandler(this.imageViewer_Clicked);
            // this.imageViewer.MouseMove += new System.Windows.Forms.MouseEventHandler(this._viewer_MouseMove);
             
             this.Controls.Add(imageViewer);

            

            _automationManager = new AnnAutomationManager();
            _annAutomation = new AnnAutomation(_automationManager, this.imageViewer);
            _annAutomation.Active = true;
            this.imageViewer.BringToFront();
            
            //imageViewer.
            
           
      
            _codec = new RasterCodecs();
            CodecsTxtLoadOptions txtOption = _codec.Options.Txt.Load;
            txtOption.Enabled = true;

            _automationManager.RasterCodecs = _codec;
            _automationManager.RedactionRealizePassword = "";
            _automationManager.CreateDefaultObjects();
            CustomizeObjectProperty();

             
            PropertyForm propForm = new PropertyForm();
            
            _automationManager.ObjectPropertiesDialogType = propForm.GetType();
         //   _automationManager.ObjectPropertiesDialogType = null;
            AddCheckMark(_automationManager);

            _automationManager.CreateToolBar();
            _automationManager.ToolBar.BringToFront();
            imageToolBar = new ImageToolBar();
            this.imageToolBar.TifEditor = this;
            toolBar = imageToolBar.GetExtendedToolBar(_automationManager.ToolBar);
            toolBar.Dock = DockStyle.Bottom;

            this.Controls.Add(_automationManager.ToolBar);




            topToolBar = imageToolBar.AddCustomToolBar(topToolBar);

            
            imageToolBar.UpdateToolBar();
            ResumeLayout();

            RasterPaintProperties prop = imageViewer.PaintProperties;
           // prop.PaintDisplayMode |= RasterPaintDisplayModeFlags.ScaleToGray | RasterPaintDisplayModeFlags.Bicubic;
            prop.PaintDisplayMode = RasterPaintDisplayModeFlags.ScaleToGray;
            imageViewer.PaintProperties = prop;
            

            
            InitialzeEdit();


        }
Пример #2
0
        private void IntializeAnnContainer()
        {
            SuspendLayout();

            imageViewer      = new RasterImageViewer();
            imageViewer.Dock = DockStyle.Fill;
            imageViewer.EnableScrollingInterface = true;
            this.imageViewer.KeyDown            += new System.Windows.Forms.KeyEventHandler(this.imageViewer_KeyDown);
            this.imageViewer.DoubleClick        += new System.EventHandler(this.imageViewer_Clicked);
            // this.imageViewer.MouseMove += new System.Windows.Forms.MouseEventHandler(this._viewer_MouseMove);

            this.Controls.Add(imageViewer);



            _automationManager    = new AnnAutomationManager();
            _annAutomation        = new AnnAutomation(_automationManager, this.imageViewer);
            _annAutomation.Active = true;
            this.imageViewer.BringToFront();

            //imageViewer.



            _codec = new RasterCodecs();
            CodecsTxtLoadOptions txtOption = _codec.Options.Txt.Load;

            txtOption.Enabled = true;

            _automationManager.RasterCodecs             = _codec;
            _automationManager.RedactionRealizePassword = "";
            _automationManager.CreateDefaultObjects();
            CustomizeObjectProperty();


            PropertyForm propForm = new PropertyForm();

            _automationManager.ObjectPropertiesDialogType = propForm.GetType();
            //   _automationManager.ObjectPropertiesDialogType = null;
            AddCheckMark(_automationManager);

            _automationManager.CreateToolBar();
            _automationManager.ToolBar.BringToFront();
            imageToolBar = new ImageToolBar();
            this.imageToolBar.TifEditor = this;
            toolBar      = imageToolBar.GetExtendedToolBar(_automationManager.ToolBar);
            toolBar.Dock = DockStyle.Bottom;

            this.Controls.Add(_automationManager.ToolBar);



            topToolBar = imageToolBar.AddCustomToolBar(topToolBar);


            imageToolBar.UpdateToolBar();
            ResumeLayout();

            RasterPaintProperties prop = imageViewer.PaintProperties;

            // prop.PaintDisplayMode |= RasterPaintDisplayModeFlags.ScaleToGray | RasterPaintDisplayModeFlags.Bicubic;
            prop.PaintDisplayMode       = RasterPaintDisplayModeFlags.ScaleToGray;
            imageViewer.PaintProperties = prop;



            InitialzeEdit();
        }