Beispiel #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(null);
            }

            SVBitmap bitmap = value as SVBitmap;

            if (bitmap == null)
            {
                return(null);
            }

            String infile = System.IO.Path.Combine(SVProData.IconPath, "icon.proj");
            SVPixmapElementManage manage = new SVPixmapElementManage();

            manage.loadElementFromFile(infile);

            String       file1  = System.IO.Path.Combine(SVProData.IconPath, manage.getFilePathFromName(bitmap.ShowName));
            SVPixmapFile pixmap = new SVPixmapFile();

            pixmap.readPixmapFile(file1);
            System.Drawing.Image  srcImg  = System.Drawing.Image.FromStream(pixmap.Pixmap);
            System.Drawing.Bitmap oBitmap = new System.Drawing.Bitmap(srcImg);

            return(BitmapToBitmapImage(oBitmap));
        }
Beispiel #2
0
        /// <summary>
        /// 判断当前图元管理文件是否存在
        /// 存在就加载具体的管理信息
        /// </summary>
        void loadIconInfo()
        {
            String file = Path.Combine(SVProData.IconPath, "icon.proj");

            if (!File.Exists(file))
            {
                return;
            }

            _pixmapManage.loadElementFromFile(file);
        }
Beispiel #3
0
        public SVWPFBitmapManagerWindow()
        {
            InitializeComponent();

            String file = System.IO.Path.Combine(SVProData.IconPath, "icon.proj");

            if (File.Exists(file))
            {
                _picManager.loadElementFromFile(file);
            }

            _iconData = _picManager.getData();

            BindingList <String> obj = new BindingList <String>();

            foreach (var item in _iconData)
            {
                obj.Add(item.Key);
            }

            classlistView.ItemsSource = obj;
        }