Esempio n. 1
0
        public static void LoadEqpStat()
        {
            string sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string sEqpOptnPath = sExeFolder + "Util\\EqpStat.ini";

            CAutoIniFile.LoadStruct <CEqpStat>(sEqpOptnPath, "EqpStat", ref EqpStat);
        }
Esempio n. 2
0
        public static void LoadDevOptn(string _sJobName)
        {
            string sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string sDevOptnPath = sExeFolder + "JobFile\\" + _sJobName + "\\DevOptn.ini";

            CAutoIniFile.LoadStruct <CDevOptn>(sDevOptnPath, "DevOptn", ref DevOptn);
        }
Esempio n. 3
0
        public static void LoadMstOptn()
        {
            string sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string sMstOptnPath = sExeFolder + "Util\\MstOptn.ini";

            CAutoIniFile.LoadStruct <CMstOptn>(sMstOptnPath, "MstOptn", ref MstOptn);
        }
Esempio n. 4
0
        public static void LoadCmnOptn()
        {
            string sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string sCmnOptnPath = sExeFolder + "Util\\CmnOptn.ini";

            CAutoIniFile.LoadStruct(sCmnOptnPath, "CmnOptn", ref CmnOptn);
        }
Esempio n. 5
0
        public static void LoadLogInfo()
        {
            string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory;
            string sInfoPath  = sExeFolder + @"Log\LogInfo.ini";

            //string sInfoPath = LogInfo.sLogPath + "Option\\LogInfo.ini";
            CAutoIniFile.LoadStruct <CLogInfo>(sInfoPath, "LogInfo", ref LogInfo);
        }
Esempio n. 6
0
        //여기부터
        public static void LoadEqpOptn()
        {
            //string sModelName = "HEC-720BT";
            string sExeFolder   = System.AppDomain.CurrentDomain.BaseDirectory;
            string sEqpOptnPath = sExeFolder + "Util\\EqpOptn.ini";

            CAutoIniFile.LoadStruct <CEqpOptn>(sEqpOptnPath, "EqpOptn", ref EqpOptn);
        }
Esempio n. 7
0
        public void LoadSaveLastData(bool _bLoad)
        {
            //Set Dir.
            //ERR_FOLDER    ;
            string sPath = Folder + "LastWrkData.ini";

            if (_bLoad)
            {
                CAutoIniFile.LoadStruct <T>(sPath, "Data", ref Data);
            }
            else
            {
                CAutoIniFile.SaveStruct <T>(sPath, "Data", ref Data);
            }
        }
Esempio n. 8
0
        ////이거 안쓰고 LoadDataList로 쓴다.
        //public bool LoadDataIni(DateTime _tSttData, DateTime _tEndData, T[] _tData)
        //{
        //    string sPath;

        //    int iDataCnt = 0;
        //    int iMaxDayCnt = 0;

        //    string sTemp;
        //    for (DateTime d = _tSttData; d <= _tEndData; d = d.AddDays(1))
        //    {
        //        DateTime SearchDate = d;
        //        sTemp = d.ToString();
        //        sPath = Folder + d.ToString("yyyyMMdd") + ".ini";
        //        //sPath = "D:\WrkLog\HSM_230DB\20170726.ini";
        //        iMaxDayCnt = GetDataCnt(SearchDate, SearchDate);
        //        //TData Data = new TData() ;
        //        for (int c = 0; c < iMaxDayCnt; c++)
        //        {
        //            CAutoIniFile.LoadStruct<T>(sPath, c.ToString(), ref _tData[iDataCnt]);
        //            //CAutoIniFile.LoadStruct<TData>(sPath , c.ToString(),ref Data);
        //            iDataCnt++;
        //        }
        //    }
        //    return true;
        //}

        public bool LoadDataList(DateTime _tSttData, DateTime _tEndData, ref List <T> _lData)
        {
            string sPath;
            int    iMaxDayCnt = 0;
            string sTemp;
            T      Data = new T();

            for (DateTime d = _tSttData; d <= _tEndData; d = d.AddDays(1))
            {
                DateTime SearchDate = d;
                sTemp      = d.ToString();
                sPath      = Folder + d.ToString("yyyyMMdd") + ".ini";//sPath = "D:\WrkLog\HSM_230DB\20170726.ini";
                iMaxDayCnt = GetDataCnt(SearchDate, SearchDate);
                for (int c = 0; c < iMaxDayCnt; c++)
                {
                    CAutoIniFile.LoadStruct <T>(sPath, c.ToString(), ref Data);
                    _lData.Add(Data);
                }
            }
            return(true);
        }
Esempio n. 9
0
        /*
         * public static void LoadEqpStat()
         * {
         *  string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory;
         *  string sEqpOptnPath = sExeFolder + "Util\\EqpStat.ini";
         *  CAutoIniFile.LoadStruct<CEqpStat>(sEqpOptnPath,"EqpStat",ref EqpStat);
         * }
         * public static void SaveEqpStat()
         * {
         *  string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory;
         *  string sEqpOptnPath = sExeFolder + "Util\\EqpStat.ini";
         *  CAutoIniFile.SaveStruct<CEqpStat>(sEqpOptnPath,"EqpStat",ref EqpStat);
         * }
         */

        public static bool LoadSave(bool _bLoad)
        {
            string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory;
            string sLotInfo   = sExeFolder + "SeqData\\LotInfo.ini";

            //Current Lot Informations.
            TLot     Data       = new TLot();
            CIniFile IniLotInfo = new CIniFile(sLotInfo);

            //int iCount = LotList.Count ;
            if (_bLoad)
            {
                //IniLotInfo.Load("Total ", "Count"    , out iCount   );
                IniLotInfo.Load("Total ", "LotOpened", out LotOpened);
                IniLotInfo.Load("Total ", "LotEnded", out LotEnded);
                CAutoIniFile.LoadStruct <TLot>(sLotInfo, "CrntLotData", ref CrntLotData);

                //LotList.Clear();
                //for(int i = 0 ; i < iCount ; i++){
                //    CAutoIniFile.LoadStruct<TLot>(sLotInfo,i.ToString(),ref Data);
                //    LotList.Add(Data);
                //}
            }
            else
            {
                //IniLotInfo.Save("Total ", "Count"    , iCount   );
                IniLotInfo.Save("Total ", "LotOpened", LotOpened);
                IniLotInfo.Save("Total ", "LotEnded", LotEnded);
                CAutoIniFile.SaveStruct <TLot>(sLotInfo, "CrntLotData", ref CrntLotData);

                //for(int i = 0 ; i < iCount ; i++){
                //    Data = LotList[i];
                //    CAutoIniFile.SaveStruct<TLot>(sLotInfo,i.ToString(),ref Data);
                //}
            }
            return(true);
        }
Esempio n. 10
0
        public void LoadManRslt(ref TRslt _Rslt)
        {
            string sVisnManPath = "C:\\Data\\Visn.ini";

            CAutoIniFile.LoadStruct <TRslt>(sVisnManPath, "0", ref _Rslt);
        }
Esempio n. 11
0
        public void LoadRslt(int _iIdx, ref TRslt _Rslt)
        {
            string sVisnPath = "C:\\Data\\Visn.ini";

            CAutoIniFile.LoadStruct <TRslt>(sVisnPath, _iIdx.ToString(), ref _Rslt);
        }
Esempio n. 12
0
        //-------------------------------------------------------------------------------------------------------
        //랏에 MGZ넘버가 없는 그냥 랏별 데이터 보여주기용
        //-------------------------------------------------------------------------------------------------------
        public void DispLotData(string sPath, ListView _lvTable)
        {
            if (_lvTable == null)
            {
                return;
            }

            _lvTable.BeginUpdate();

            int      iCnt   = 0;
            CIniFile IniCnt = new CIniFile(sPath);

            IniCnt.Load("ETC", "DataCnt", ref iCnt);

            List <TLotData> Datas = new List <TLotData>();

            for (int c = 0; c < iCnt; c++)
            {
                TLotData LotData = new TLotData();
                CAutoIniFile.LoadStruct(sPath, "LotData" + c.ToString(), ref LotData);
                Datas.Add(LotData);
            }

            _lvTable.Clear();
            _lvTable.View               = View.Details;
            _lvTable.LabelEdit          = true;
            _lvTable.AllowColumnReorder = true;
            _lvTable.FullRowSelect      = true;
            _lvTable.GridLines          = true;
            //_lvTable.Sorting          = SortOrder.Descending;
            _lvTable.Scrollable = true;

            //Type type = typeof(TLotData);
            //int iCntOfItem = type.GetProperties().Length;
            //FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
            //
            ////컬럼추가 하고 이름을 넣는다.
            //_lvTable.Columns.Add("No", 100, HorizontalAlignment.Left);
            //for (int c = 0; c < f.Length; c++)
            //{
            //    _lvTable.Columns.Add(f[c].Name, 100, HorizontalAlignment.Left);
            //}

            Type type       = typeof(TLotData);
            int  iCntOfItem = type.GetProperties().Length;

            FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);

            //컬럼추가 하고 이름을 넣는다.
            _lvTable.Columns.Add("No", 100, HorizontalAlignment.Left);

            _lvTable.Columns.Add("작업번호", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("결과", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("NG결과", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 체결토크", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 최대토크", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 체결토크1", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 최대토크1", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 체결토크2", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 최대토크2", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 체결토크3", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("본체결 후 최대토크3", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("높이측정 데이터1", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("높이측정 데이터2", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("높이측정 데이터3", 100, HorizontalAlignment.Left);
            _lvTable.Columns.Add("높이측정 데이터4", 100, HorizontalAlignment.Left);

            _lvTable.Items.Clear();
            string sValue = "";
            string sName  = "";

            ListViewItem[] liitem = new ListViewItem[Datas.Count];
            for (int r = 0; r < Datas.Count; r++)
            {
                liitem[r] = new ListViewItem(string.Format("{0}", r + 1));
                for (int c = 0; c < f.Length; c++)
                {
                    sName  = f[c].Name;
                    sValue = f[c].GetValue(Datas[r]).ToString();
                    liitem[r].SubItems.Add(sValue);
                }
                liitem[r].UseItemStyleForSubItems = false;
                _lvTable.Items.Add(liitem[r]);
            }
            //_lvTable.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
            //if(iCnt == 0) _lvTable.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize   );
            //else          _lvTable.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
            _lvTable.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

            _lvTable.EndUpdate();
        }
Esempio n. 13
0
        public bool LoadSaveAll(bool _bLoad)
        {
            bool bRet = true;

            string sFilePath;

            if (_bLoad)
            {
                //sFilePath = m_sParaFolderPath + "MotrAxl.xml";
                //object oParaMotrSub = ParaSub ;
                //if (!CXml.LoadXml(sFilePath, ref oParaMotrSub)) { bRet = false; }
                //ParaSub = (object [])oParaMotrSub;
                CAutoIniFile.LoadStruct <TParaAll>(m_sParaFolderPath + "MotrParaAll.ini", "TParaAll", ref ParaAll);
                for (int i = 0; i < m_iMaxMotr; i++)
                {
                    sFilePath = m_sParaFolderPath + "MotrPara" + i.ToString() + ".xml";
                    if (!CXml.LoadXml <CParaMotr>(sFilePath, ref Para[i]))
                    {
                        bRet = false;
                    }
                    if (!Mtr[i].LoadSave(_bLoad, m_sParaFolderPath, i))
                    {
                        bRet = false;
                    }

                    //Special Handling
                    if (Para[i].dSpeedRatio == 0)
                    {
                        Para[i].dSpeedRatio = 100;
                    }
                    else if (Para[i].dSpeedRatio < 10)
                    {
                        Para[i].dSpeedRatio = 10;
                    }
                    else if (Para[i].dSpeedRatio > 100)
                    {
                        Para[i].dSpeedRatio = 100;
                    }
                }
            }
            else
            {
                //sFilePath = m_sParaFolderPath + "MotrAxl.xml";
                //object oParaMotrSub = ParaSub;
                //if (!CXml.SaveXml(sFilePath, ref oParaMotrSub)) { bRet = false; }
                CAutoIniFile.SaveStruct <TParaAll>(m_sParaFolderPath + "MotrParaAll.ini", "TParaAll", ref ParaAll);
                for (int i = 0; i < m_iMaxMotr; i++)
                {
                    //Special Handling
                    if (Para[i].dSpeedRatio == 0)
                    {
                        Para[i].dSpeedRatio = 100;
                    }
                    else if (Para[i].dSpeedRatio < 10)
                    {
                        Para[i].dSpeedRatio = 10;
                    }
                    else if (Para[i].dSpeedRatio > 100)
                    {
                        Para[i].dSpeedRatio = 100;
                    }

                    sFilePath = m_sParaFolderPath + "MotrPara" + i.ToString() + ".xml";
                    if (!CXml.SaveXml <CParaMotr>(sFilePath, ref Para[i]))
                    {
                        bRet = false;
                    }
                    if (!Mtr[i].LoadSave(_bLoad, m_sParaFolderPath, i))
                    {
                        bRet = false;
                    }
                }
            }

            return(bRet);
        }