Exemple #1
0
 private void Btn_UserManagement_Click(object sender, EventArgs e)
 {
     if (FileRw.IsNotShow("UserManagement"))
     {
         if (Frm_UserManagement.fUserManagement == null || Frm_UserManagement.fUserManagement.IsDisposed)
         {
             Frm_UserManagement.fUserManagement = new Frm_UserManagement();
         }
         Frm_UserManagement.fUserManagement.Show(this);
     }
 }
        /// <summary>
        /// 异常统计
        /// </summary>
        /// <param name="ErrInfo"></param>
        /// <remarks></remarks>
        public void RecordErrInfo(string ErrInfo)
        {
            int ErrCounts = 0;

            switch (ErrInfo)
            {
            case "MEMErrCounts":
                PVar.MEMErrCounts = int.Parse(BVar.FileRorW.ReadINI("ErrStatistics", ErrInfo, System.Convert.ToString(0), PVar.BZ_ErrStatisticsPath));
                PVar.MEMErrCounts++;
                ErrCounts = PVar.MEMErrCounts;
                BVar.FileRorW.WriteINI("ErrStatistics", ErrInfo, System.Convert.ToString(PVar.MEMErrCounts), PVar.BZ_ErrStatisticsPath);
                if (FileRw.IsNotShow("Frm_Par"))
                {
                    Frm_Par.fPar.txt_MEMErrCounts.Text = System.Convert.ToString(PVar.MEMErrCounts);
                }
                break;

            case "PickCCDErr":
                PVar.PickCCDErrCounts = int.Parse(BVar.FileRorW.ReadINI("ErrStatistics", ErrInfo, System.Convert.ToString(0), PVar.BZ_ErrStatisticsPath));
                PVar.PickCCDErrCounts++;
                ErrCounts = PVar.PickCCDErrCounts;
                BVar.FileRorW.WriteINI("ErrStatistics", ErrInfo, System.Convert.ToString(PVar.PickCCDErrCounts), PVar.BZ_ErrStatisticsPath);
                if (FileRw.IsNotShow("Frm_Par"))
                {
                    Frm_Par.fPar.txt_PickCCDErrCounts.Text = System.Convert.ToString(PVar.PickCCDErrCounts);
                }
                break;

            case "PickErr":
                PVar.PickErrCounts = int.Parse(BVar.FileRorW.ReadINI("ErrStatistics", ErrInfo, System.Convert.ToString(0), PVar.BZ_ErrStatisticsPath));
                PVar.PickErrCounts++;
                ErrCounts = PVar.PickErrCounts;
                BVar.FileRorW.WriteINI("ErrStatistics", "PickErr", System.Convert.ToString(PVar.PickErrCounts), PVar.BZ_ErrStatisticsPath);
                if (FileRw.IsNotShow("Frm_Par"))
                {
                    Frm_Par.fPar.txt_PickErrCounts.Text = System.Convert.ToString(PVar.PickErrCounts);
                }
                break;

            case "HsgSnErr":
                PVar.HsgSnErrCounts = int.Parse(BVar.FileRorW.ReadINI("ErrStatistics", ErrInfo, System.Convert.ToString(0), PVar.BZ_ErrStatisticsPath));
                PVar.HsgSnErrCounts++;
                ErrCounts = PVar.HsgSnErrCounts;
                BVar.FileRorW.WriteINI("ErrStatistics", ErrInfo, System.Convert.ToString(PVar.HsgSnErrCounts), PVar.BZ_ErrStatisticsPath);
                if (FileRw.IsNotShow("Frm_Par"))
                {
                    Frm_Par.fPar.txt_HsgSnErrCounts.Text = System.Convert.ToString(PVar.HsgSnErrCounts);
                }
                break;

            case "HsgErr":
                PVar.HsgErrCounts = int.Parse(BVar.FileRorW.ReadINI("ErrStatistics", ErrInfo, System.Convert.ToString(0), PVar.BZ_ErrStatisticsPath));
                PVar.HsgErrCounts++;
                ErrCounts = PVar.HsgErrCounts;
                BVar.FileRorW.WriteINI("ErrStatistics", ErrInfo, System.Convert.ToString(PVar.HsgErrCounts), PVar.BZ_ErrStatisticsPath);
                if (FileRw.IsNotShow("Frm_Par"))
                {
                    Frm_Par.fPar.txt_HsgSnErrCounts.Text = System.Convert.ToString(PVar.HsgErrCounts);
                }
                break;
            }

            BVar.FileRorW.WriteINI("ErrStatistics", ErrInfo, System.Convert.ToString(ErrCounts), PVar.BZ_ErrStatisticsPath);
        }