public void SetLotIDAndFolder(string lotID, string folderPath, CSAM_ManualRecipe recipe) { try { FolderPath = folderPath; LotID = lotID; LoadedRecipe = recipe; currentPanelState = new PanelState(lotID, LoadedRecipe); if (File.Exists(FolderPath + @"\" + PanelStateFilename)) { currentPanelState = PanelState.Load <PanelState>(FolderPath + @"\" + PanelStateFilename); } if (Directory.Exists(FolderPath)) { fileNameTH = FolderPath + @"\" + recipe.TH_AG1_Filename_Format; this.panelImageBoxTH.LoadImage(fileNameTH, PanelImageSides.TH, currentPanelState, LoadedRecipe); fileNameBH = FolderPath + @"\" + recipe.BH_AG1_Filename_Format; this.panelImageBoxBH.LoadImage(fileNameBH, PanelImageSides.BH, currentPanelState, LoadedRecipe); } } catch (Exception ex) { logger.Error(ex); } }
//public void SetImage(Image image) //{ // iboxPanel.Image = image; //} public void LoadImage(string sFilename, PanelImageSides panelImageSide, PanelState panelState, CSAM_ManualRecipe recipe) { if (File.Exists(sFilename)) { _RawFileName = sFilename; OpenRawImage(); _PanelImageSide = panelImageSide; _PanelState = panelState; this.recipe = recipe; } else { MessageBox.Show("Filename doesn't exist: " + sFilename); } }