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++;
            }
        }
Exemple #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);
         }
     }
 }
Exemple #3
0
 public static bool StartProcess(string fName, string args)
 {
     try
     {
         Process myprocess = new Process();
         myprocess.StartInfo = new ProcessStartInfo(fName, args);
         myprocess.StartInfo.UseShellExecute = false;
         myprocess.Start();
         return(true);
     }
     catch (Exception ex)
     {
         Tools_Others.WriteErrorLog("调用外部程序失败:" + ex.Message);
         return(false);
     }
 }