Esempio n. 1
0
 /// <summary>
 /// Unsubscribe control from current source
 /// </summary>
 public void DetachSource()
 {
     FolderTreeView.Nodes.Clear();
     FileListView.Clear();
     ExplorerHandler = null;
     SelectedFolder  = string.Empty;
     _SelectedFiles  = null;
 }
Esempio n. 2
0
        private void Import_Click(object sender, EventArgs e)
        {
            FileImageList.Images.Clear();
            FileListView.Clear();
            DialogResult importResult = ImportDialoge.ShowDialog();

            if (importResult == System.Windows.Forms.DialogResult.OK)
            {
                FileImageList.Images.Add(Image.FromFile(ImportDialoge.FileName));
                FileListView.Items.Add(ImportDialoge.FileName, 0);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Attach control to object which implement IFileExplorer interface.
        /// </summary>
        /// <param name="source"></param>
        public void AttachSource(IFileExplorer source)
        {
            ExplorerHandler = source;
            FolderTreeView.Nodes.Clear();
            FileListView.Clear();

            TreeNode ptrNode = FolderTreeView.Nodes.Add(ExplorerHandler.Name);

            ptrNode.ImageIndex         = (int)ImageIndexName.Folder;
            ptrNode.Tag                = ExplorerHandler.Root;
            ptrNode.SelectedImageIndex = (int)ImageIndexName.Folder;
            ptrNode.Nodes.Add(" ");
            OnSourceChanged();
        }
Esempio n. 4
0
        private void ConfigureListView()
        {
            FileListView.Clear();

            if (mapping == null)
            {
                mapping = LoadMapping();
            }

            FileListView.Columns.Add("Filename");

            foreach (String line in mapping)
            {
                string[] strings = line.Split(":".ToCharArray());
                if (EK.Capture.Dicom.DicomToolKit.Tag.TryParse(strings[0]))
                {
                    int width = 100;
                    if (Dictionary.Contains(strings[0]))
                    {
                        Tag tag = Dictionary.Instance[strings[0]];
                        switch (tag.VR)
                        {
                        case "PN":
                            width = 200;
                            break;

                        default:
                            break;
                        }
                    }
                    FileListView.Columns.Add((strings.Length > 1) ? strings[1] : Dictionary.Instance[strings[0]].Description, width);
                }
                else
                {
                    Logging.Log(LogLevel.Error, String.Format("Unable to parse, {0}", line));
                }
            }
        }