• 大小: 5.9MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-22
  • 语言: C#
  • 标签: 图形处理  

资源简介

结合C#语言及IDL语言的优势开发的图形处理系统,使用C#构建系统框架,利用IDL源代码编写功能

资源截图

代码片段和文件信息

/*
;+
; 《IDL语言程序设计》
; --数据可视化与ENVI二次开发
;
; 示例程序
;
; 作者: 董彦卿
;
; 联系方式:sdlcdyq@sina.com
;
;-
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//使用注册表操作
using Microsoft.Win32;
using System.IO;


namespace UsingIDLDrawWidget
{
    public partial class Form1 : Form
    {
        //界面间隔参数
        int xSpace = 0;
        int ySpace = 0;
        int initFlag = 0;
        int y = 0;
        //鼠标操作状态
        byte mouseType = 1;
        
        //鼠标按下状态
        byte clickState = 0;
        ToolStripLabel tsl = new ToolStripLabel();
 
        public Form1()
        {
            InitializeComponent();
            //增加滚轮滚动事件
            ((Control)this).MouseWheel+=new MouseEventHandler(Form1_MouseWheel);
        }      
  
        
        
        private void Form1_Load(object sender EventArgs e)
        {
            
            int n;
            //读取注册表获取IDL8.0或IDL7.1或IDL7.0的目录
            RegistryKey rsg = null;
               
            rsg = Registry.LocalMachine.OpenSubKey(“SOFTWARE\\Exelis\\IDL\\8.2“ true);

            if (rsg.GetValue(“InstallDir“) != null) //读取失败返回null
            {                    
                //初始化IDL82路径
                axIDLDrawWidget1.IdlPath = Path.Combine(rsg.GetValue(“InstallDir“).ToString() @“IDL82\bin\bin.x86\idl.dll“);
            }     

            //初始化
            n = axIDLDrawWidget1.InitIDL((int)this.Handle);
            if (n == 0)
            {
                MessageBox.Show(“IDL初始化失败“ “IDL初始化失败,无法继续!“);
                return;
            }

            //对象法程序显示
            axIDLDrawWidget1.GraphicsLevel = 2;
        
            //初始化界面
            axIDLDrawWidget1.CreateDrawWidget();
            //编译IDL功能代码
            axIDLDrawWidget1.ExecuteStr(“.compile “ + “‘imageprocess__define.pro‘“);

              //计算组件偏移量                
            this.xSpace = this.Width - axIDLDrawWidget1.Width;
            this.ySpace = this.Height - axIDLDrawWidget1.Height;
            //添加状态栏鼠标状态信息
            StatusStrip sb = new StatusStrip();
            

            tsl.Text = “ 鼠标状态:“;
            ToolStripItem[] tsi = new ToolStripItem[1];
            tsi[0] = tsl;
            sb.Items.AddRange(tsi);
            this.Controls.Add(sb);

        }

        private void 打开文件OpenFile(object sender EventArgs e)
        {
            string fileName =““;
            //新建打开文件对话框
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = “JPEG文件(*.jpg)|*.jpg|BMP文件(*.bmp)|*.bmp|TIFF文件(*.tif)|*.tif|PNG文件(*.png)|*.png|所有文件(*.*)|*.*“;//设置打开文件类型

            //
            if (ofd.ShowDialog(this) == DialogResult.OK)
            {
                fileName = ofd.FileName;                
            }
            //文件是否存在
            if (!File.Exists(fileName)) return

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-08 15:42  IDLDrawWidget\
     目录           0  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\
     文件         966  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\IDLDrawWidget_ImageProcess.sln
     文件       23040  2013-04-30 15:29  IDLDrawWidget\IDLDrawWidget_ImageProcess\IDLDrawWidget_ImageProcess.suo
     文件        1855  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\UpgradeLog.xml
     目录           0  2013-04-08 15:42  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\
     文件       23040  2012-02-27 12:07  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget.suo
     目录           0  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\
     目录           0  2013-04-11 09:24  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\
     文件       28672  2012-02-27 12:07  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\AxInterop.IDLDRAWX3Lib.dll
     文件       26725  2013-04-30 08:57  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\imageprocess__define.pro
     文件       40960  2013-04-11 09:24  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\Interop.IDLDRAWX3Lib.dll
     文件       36352  2013-04-30 15:34  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\UsingIDLDrawWidget.exe
     文件       42496  2013-04-30 15:34  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\UsingIDLDrawWidget.pdb
     文件       11608  2013-04-30 15:40  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\UsingIDLDrawWidget.vshost.exe
     文件         490  2010-03-17 22:39  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Debug\UsingIDLDrawWidget.vshost.exe.manifest
     目录           0  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\bin\Release\
     文件       14799  2013-04-30 15:33  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\Form1.cs
     文件       36132  2013-04-30 15:34  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\Form1.Designer.cs
     文件       15580  2013-04-30 15:33  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\Form1.resx
     文件        4567  2013-04-08 15:46  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\IDLDrawWidget_ImageProcessing.csproj
     目录           0  2013-04-08 15:42  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\
     目录           0  2013-04-30 15:34  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\
     文件       28672  2012-02-27 12:07  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\AxInterop.IDLDRAWX3Lib.dll
     文件        8336  2013-04-11 09:24  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        5793  2013-04-30 15:34  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        1842  2013-04-30 15:40  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\IDLDrawWidget_ImageProcessing.csproj.FileListAbsolute.txt
     文件         842  2012-02-27 12:07  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\IDLDrawWidget_ImageProcessing.csproj.GenerateResource.Cache
     文件         725  2013-04-11 09:24  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\IDLDrawWidget_ImageProcessing.csproj.ResolveComReference.cache
     文件       40960  2013-04-11 09:24  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\Interop.IDLDRAWX3Lib.dll
     目录           0  2012-08-20 15:18  IDLDrawWidget\IDLDrawWidget_ImageProcess\UsingIDLDrawWidget\obj\Debug\Refactor\
............此处省略241个文件信息

评论

共有 条评论