Beispiel #1
0
 public void PreViewSymbol(string imgPath, bool bl)
 {
     try
     {
         var name = Path.GetFileNameWithoutExtension(imgPath);
         imgPath = string.Format("{0}\\自定义模版图片\\{1}.jpg", DBEntityFinder.Instance.SymbolPicturePath, name);
         if (File.Exists(imgPath))
         {
             if (ps == null)
             {
                 if (bl)
                 {
                     ps = new PreviewSymbol(imgPath);
                     Application.ShowModelessDialog(ps);
                 }
             }
             else
             {
                 ps.pictureBox1.Load(imgPath);
             }
         }
     }
     catch (Exception ex)
     {
         PublicMethod.Instance.ShowMessage(ex.Message);
     }
 }
Beispiel #2
0
 private void listView1_MouseLeave(object sender, EventArgs e)
 {
     if (ps == null)
     {
         return;
     }
     ps.Close();
     ps = null;
 }