예제 #1
0
 public AppEntity(string appName, string executePath)
 {
     AppName     = appName;
     ExecutePath = executePath;
     PictureBox  = new TransparentPictureBox()
     {
         Name  = AppName,
         Image = Icon.ExtractAssociatedIcon(executePath).ToBitmap(),
     };
     PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
     SetSize(PictureBox.Image.Size);
 }
예제 #2
0
 public AppEntity(AppEntityJson appJson)
 {
     AppName         = appJson.AppName;
     ExecutePath     = appJson.ExecutePath;
     IsLoggingActive = appJson.IsLoggingActive;
     Logger          = new Logger(appJson.LoggerPath);
     PictureBox      = new TransparentPictureBox()
     {
         Name  = AppName,
         Image = Icon.ExtractAssociatedIcon(ExecutePath).ToBitmap(),
     };
     if (appJson.IsSelected)
     {
         Select();
     }
     else
     {
         Unselect();
     }
     PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
     SetSize(PictureBox.Image.Size);
 }