Beispiel #1
0
        //---> InteractiveView-Steuerung <---//

        public void loadFolderInteractive(string path)
        {
            ImageListInteractive32.Images.Clear();
            InteractiveView.Clear();

            DirectoryInfo di = new DirectoryInfo(path);

            string          filters  = "*.jpg;*.png;*.bmp;";
            List <FileInfo> fileList = new List <FileInfo>();

            string[] extensions = filters.Split(';');
            foreach (string filter in extensions)
            {
                fileList.AddRange(di.GetFiles(filter));
            }
            FileInfo[] files = fileList.ToArray();

            foreach (FileInfo file in files)
            {
                Bitmap bmp = new Bitmap(file.FullName);
                ImageListInteractive32.Images.Add(file.FullName, Editor.Default.getThumbNail(bmp, 32, 32));


                ListViewItem lvi = new ListViewItem();
                lvi.Name        = file.FullName;
                lvi.Text        = file.Name;
                lvi.ImageKey    = file.FullName;
                lvi.Tag         = "InteractiveObject";
                lvi.ToolTipText = file.Name + " (" + bmp.Width.ToString() + " x " + bmp.Height.ToString() + ")";

                InteractiveView.Items.Add(lvi);
            }
        }
Beispiel #2
0
 private void InteractiveView_ItemDrag(object sender, ItemDragEventArgs e)
 {
     InteractiveView.DoDragDrop(e.Item, DragDropEffects.Move);
 }
Beispiel #3
0
 public void Open(InteractiveView interactible)
 {
     _interactible      = interactible;
     transform.position = new Vector3(interactible.transform.position.x, interactible.transform.position.y, transform.position.z);
 }