public Boolean LoadFromVPPFile(string FileName, CogRecordDisplay mCogRecordDisplay)//檔案參數載入 { string ProcID = System.Reflection.MethodInfo.GetCurrentMethod().Name.ToString(); string TempFileName = (string)FileName; try { //從CogTool裡面讀出來 string strFolderPath = @"D:\VPS_File\Product\LineMaxTool\" + @FileName + @"\"; CogToolBlock ToolBlock1 = new CogToolBlock(); FileName = strFolderPath + FileName + "_LMT.vpp"; ToolBlock1 = (CogToolBlock)CogSerializer.LoadObjectFromFile(FileName);//開啟ToolBlock vpp檔案 //依序載入 mLineMaxTool = (CogLineMaxTool)ToolBlock1.Tools[TempFileName + "_LineMaxTool_"]; this.ROI_Create(mCogRecordDisplay); SaveLog.Msg_("Data of LineMaxTool Loaded : " + @FileName); ToolBlock1 = null; mLineMaxTool_status = true; return(true); } catch (Exception ex) { SaveLog.Msg_("Load LineMaxTool Data Failed : " + ModularID + ":\r\n" + ProcID + ":\r\n" + ex.ToString()); mLineMaxTool_status = false; return(false); } }
public bool unLoad() { string ProcID = System.Reflection.MethodInfo.GetCurrentMethod().Name.ToString(); try { mLineMaxTool = null; mLineMaxTool_ROI = null; return(true); } catch (Exception ex) { SaveLog.Msg_("LineMaxTool unLoad Failed : " + ModularID + ":\r\n" + ProcID + ":\r\n" + ex.ToString()); return(false); } }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //생성 : //추가 : //목적 : 생성자 //설명 : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public CDialogCogLineMax(CogLineMaxTool objLineMaxTool) { m_objLineMaxTool = objLineMaxTool; InitializeComponent(); }