Пример #1
0
        public void LoadDirectory(string dir, bool bRecursive)
        {
            string[] files = Directory.GetFiles(dir, "*.esd");

            foreach (string filename in files)
            {
                ClipArtData d = new ClipArtData(filename);
                if (d.Preview())
                {
                    mClipData[d.mFileName] = d;

                    int numVerts = d.mMetadata.mVertCount;
                    if (numVerts != 0 && numVerts < mMinVertValue)
                    {
                        mMinVertValue = numVerts;
                    }
                    if (numVerts != 0 && numVerts > mMaxVertValue)
                    {
                        mMaxVertValue = numVerts;
                    }
                }
            }

            if (bRecursive)
            {
                string[] directories = Directory.GetDirectories(dir);
                foreach (string subdir in directories)
                {
                    LoadDirectory(subdir, bRecursive);
                }
            }
        }
Пример #2
0
            public ClipArtButton(ClipArtPicker parent, ClipArtData data)
            {
                mData   = data;
                mParent = parent;
                Height  = parent.mThumbnailSize;
                Width   = parent.mThumbnailSize;
                Image   = mData.mThumbnail;
                // = mData.mFileName;
                SizeMode = PictureBoxSizeMode.StretchImage;

                //this.DoubleBuffered = true;
            }
Пример #3
0
 public void SetClipArtData(ClipArtData data)
 {
     mData             = data;
     pictureBox1.Image = mData.mThumbnail;
     setExportAll();
 }