예제 #1
0
        private void files_Tree_Click(object sender, EventArgs e)
        {
            //节点选择判断
            if (files_Tree.SelectedNode == null)
            {
                return;
            }

            if (tagTest.Equals(this.files_Tree.SelectedNode.Tag))
            {
                return;
            }
            else
            {
                tagTest = this.files_Tree.SelectedNode.Tag;
            }

            //显示图像
            this.pic_FlowPal.Controls.Clear();

            ArrayList filesPath = new ArrayList();

            Tools_Others.GetNodesFiles(filesPath, this.files_Tree.SelectedNode);

            int i      = 0;
            int width  = this.pic_FlowPal.Width - 25;
            int height = width / 2 * 3;


            foreach (Info_MedicalRecords imr in filesPath)
            {
                Image image;
                try
                {
                    image = Image.FromFile(GlobalSettings.BrowsePath + @"\" + imr.FileName);
                }
                catch (Exception ex)
                {
                    image = null;
                }
                Col_FilePicShow pic = new Col_FilePicShow();
                pic.Image = image;
                //pic.ReFreshing();

                //pic.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                //        | System.Windows.Forms.AnchorStyles.Left)
                //        | System.Windows.Forms.AnchorStyles.Right)));

                this.pic_FlowPal.Controls.Add(pic);
                pic.Location = new Point(15, (height + 10) * i + 10);

                pic.Size = new Size(width, height);

                i++;
            }
        }
예제 #2
0
 public static void GetNodesFiles(ArrayList filesName, Node node)
 {
     if (node.Nodes.Count < 1)
     {
         filesName.Add(node.Tag);
         return;
     }
     else
     {
         foreach (Node temp in node.Nodes)
         {
             Tools_Others.GetNodesFiles(filesName, temp);
         }
     }
 }