福利彩票号码统计View.cpp
上传用户:dinghaosmt
上传日期:2013-03-22
资源大小:110k
文件大小:42k
源码类别:

射击游戏

开发平台:

Visual C++

  1. // 福利彩票号码统计View.cpp : implementation of the CMyView class
  2. //
  3. #include "stdafx.h"
  4. #include "福利彩票号码统计.h"
  5. #include "福利彩票号码统计Set.h"
  6. #include "福利彩票号码统计Doc.h"
  7. #include "福利彩票号码统计View.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CMyView
  15. IMPLEMENT_DYNCREATE(CMyView, CRecordView)
  16. BEGIN_MESSAGE_MAP(CMyView, CRecordView)
  17. //{{AFX_MSG_MAP(CMyView)
  18. ON_BN_CLICKED(IDC_ADD_BUTTON, OnAddButton)
  19. ON_BN_CLICKED(IDC_FIND_BUTTON, OnFindButton)
  20. ON_BN_CLICKED(IDC_MODIFY_BUTTON, OnModifyButton)
  21. ON_BN_CLICKED(IDC_TEST_BUTTON, OnTestButton)
  22. ON_WM_CTLCOLOR()
  23. ON_BN_CLICKED(IDC_DELETE_BUTTON, OnDeleteButton)
  24. //}}AFX_MSG_MAP
  25. // Standard printing commands
  26. ON_COMMAND(ID_FILE_PRINT, CRecordView::OnFilePrint)
  27. ON_COMMAND(ID_FILE_PRINT_DIRECT, CRecordView::OnFilePrint)
  28. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRecordView::OnFilePrintPreview)
  29. END_MESSAGE_MAP()
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CMyView construction/destruction
  32. CMyView::CMyView()
  33. : CRecordView(CMyView::IDD)
  34. {
  35. //{{AFX_DATA_INIT(CMyView)
  36. m_pSet = NULL;
  37. //}}AFX_DATA_INIT
  38. // TODO: add construction code here
  39. }
  40. CMyView::~CMyView()
  41. {
  42. }
  43. void CMyView::DoDataExchange(CDataExchange* pDX)
  44. {
  45. CRecordView::DoDataExchange(pDX);
  46. //{{AFX_DATA_MAP(CMyView)
  47. DDX_FieldText(pDX, IDC_EDIT1, m_pSet->m_column1, m_pSet);
  48. DDX_FieldText(pDX, IDC_EDIT2, m_pSet->m_column2, m_pSet);
  49. DDX_FieldText(pDX, IDC_EDIT3, m_pSet->m_column3, m_pSet);
  50. DDX_FieldText(pDX, IDC_EDIT4, m_pSet->m_column4, m_pSet);
  51. DDX_FieldText(pDX, IDC_EDIT5, m_pSet->m_column5, m_pSet);
  52. DDX_FieldText(pDX, IDC_EDIT6, m_pSet->m_column6, m_pSet);
  53. DDX_FieldText(pDX, IDC_EDIT7, m_pSet->m_column7, m_pSet);
  54. DDX_FieldText(pDX, IDC_EDIT8, m_pSet->m_column8, m_pSet);
  55. DDX_FieldText(pDX, IDC_EDIT9, m_pSet->m_column9, m_pSet);
  56. //}}AFX_DATA_MAP
  57. }
  58. BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs)
  59. {
  60. // TODO: Modify the Window class or styles here by modifying
  61. //  the CREATESTRUCT cs
  62. return CRecordView::PreCreateWindow(cs);
  63. }
  64. void CMyView::OnInitialUpdate()
  65. {
  66. m_pSet = &GetDocument()->m_mySet;
  67. m_hbrush=CreateSolidBrush(RGB(187,255,255));
  68. CRecordView::OnInitialUpdate();
  69. GetParentFrame()->RecalcLayout();
  70. ResizeParentToFit();
  71. }
  72. /////////////////////////////////////////////////////////////////////////////
  73. // CMyView printing
  74. BOOL CMyView::OnPreparePrinting(CPrintInfo* pInfo)
  75. {
  76. // default preparation
  77. return DoPreparePrinting(pInfo);
  78. }
  79. void CMyView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  80. {
  81. // TODO: add extra initialization before printing
  82. }
  83. void CMyView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  84. {
  85. // TODO: add cleanup after printing
  86. }
  87. /////////////////////////////////////////////////////////////////////////////
  88. // CMyView diagnostics
  89. #ifdef _DEBUG
  90. void CMyView::AssertValid() const
  91. {
  92. CRecordView::AssertValid();
  93. }
  94. void CMyView::Dump(CDumpContext& dc) const
  95. {
  96. CRecordView::Dump(dc);
  97. }
  98. CMyDoc* CMyView::GetDocument() // non-debug version is inline
  99. {
  100. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyDoc)));
  101. return (CMyDoc*)m_pDocument;
  102. }
  103. #endif //_DEBUG
  104. /////////////////////////////////////////////////////////////////////////////
  105. // CMyView database support
  106. CRecordset* CMyView::OnGetRecordset()
  107. {
  108. return m_pSet;
  109. }
  110. /////////////////////////////////////////////////////////////////////////////
  111. // CMyView message handlers
  112. void CMyView::OnAddButton() 
  113. {
  114. Ag:
  115. if(password.DoModal()==IDOK)
  116. {
  117. if(password.m_Password=="i love money add")
  118. {
  119. if(add.DoModal()==IDOK)
  120. {
  121. m_pSet->MoveFirst();
  122. do
  123. {
  124. if(m_pSet->m_column9!=add.m_Add_ID)
  125. m_pSet->MoveNext();
  126. else
  127. {
  128. AfxMessageBox("此期号码已经存在!");
  129. return;
  130. }
  131. }while(!m_pSet->IsEOF());
  132.    m_pSet->AddNew();
  133.    m_pSet->m_column9=add.m_Add_ID;
  134.    m_pSet->m_column1=add.m_Add_Num1;
  135.    m_pSet->m_column2=add.m_Add_Num2;
  136.    m_pSet->m_column3=add.m_Add_Num3;
  137.    m_pSet->m_column4=add.m_Add_Num4;
  138.    m_pSet->m_column5=add.m_Add_Num5;
  139.    m_pSet->m_column6=add.m_Add_Num6;
  140.    m_pSet->m_column7=add.m_Add_Num7;
  141.    m_pSet->m_column8=add.m_Add_Specious;
  142.    m_pSet->Update();
  143.    m_pSet->Requery();
  144.    m_pSet->MoveLast();
  145.    UpdateData(FALSE);
  146. }
  147. }
  148. else {MessageBox("密码错误!");goto Ag;}
  149. }
  150. }
  151. void CMyView::OnFindButton() 
  152. {
  153. if(del.DoModal()==IDOK)
  154. {
  155. m_pSet->MoveFirst();
  156. do
  157. {
  158. if(m_pSet->m_column9==del.m_Del_ID)
  159. {
  160. add.m_Add_ID=m_pSet->m_column9;
  161. add.m_Add_Num1=m_pSet->m_column1;
  162. add.m_Add_Num2=m_pSet->m_column2;
  163. add.m_Add_Num3=m_pSet->m_column3;
  164. add.m_Add_Num4=m_pSet->m_column4;
  165. add.m_Add_Num5=m_pSet->m_column5;
  166. add.m_Add_Num6=m_pSet->m_column6;
  167. add.m_Add_Num7=m_pSet->m_column7;
  168. add.m_Add_Specious=m_pSet->m_column8;
  169. m_pSet->Requery();
  170. UpdateData(FALSE);
  171. add.DoModal();
  172. return;
  173. }
  174. else m_pSet->MoveNext();
  175. }while(!m_pSet->IsEOF());
  176. if(m_pSet->IsEOF())
  177. {
  178. MessageBox("没有您要找的记录!");
  179. m_pSet->MoveFirst();
  180. UpdateData(FALSE);
  181. return;
  182. }
  183. }  
  184. }
  185. void CMyView::OnModifyButton() 
  186. {
  187. Loop: if(password.DoModal()==IDOK)
  188. {
  189. if(password.m_Password=="i love money modify")
  190. {
  191. if(change.DoModal()==IDOK)
  192. {
  193. m_pSet->MoveFirst();
  194. do
  195. {
  196. if(change.m_Modify_ID==m_pSet->m_column9)
  197. {
  198. add.m_Add_ID=m_pSet->m_column9;
  199. add.m_Add_Num1=m_pSet->m_column1;
  200. add.m_Add_Num2=m_pSet->m_column2;
  201. add.m_Add_Num3=m_pSet->m_column3;
  202. add.m_Add_Num4=m_pSet->m_column4;
  203. add.m_Add_Num5=m_pSet->m_column5;
  204. add.m_Add_Num6=m_pSet->m_column6;
  205. add.m_Add_Num7=m_pSet->m_column7;
  206. add.m_Add_Specious=m_pSet->m_column8;
  207. UpdateData(FALSE);
  208. if(add.DoModal()==IDOK)
  209. {
  210. m_pSet->Edit();
  211. m_pSet->m_column1=add.m_Add_Num1;
  212. m_pSet->m_column2=add.m_Add_Num2;
  213. m_pSet->m_column3=add.m_Add_Num3;
  214. m_pSet->m_column4=add.m_Add_Num4;
  215. m_pSet->m_column5=add.m_Add_Num5;
  216. m_pSet->m_column6=add.m_Add_Num6;
  217. m_pSet->m_column7=add.m_Add_Num7;
  218. m_pSet->m_column8=add.m_Add_Specious;
  219. m_pSet->Update();
  220. UpdateData(FALSE);
  221. return;
  222. }
  223. else return;
  224. }
  225. else m_pSet->MoveNext();
  226. }while(!m_pSet->IsEOF());
  227. if(m_pSet->IsEOF())
  228. {
  229. MessageBox("没有此记录");
  230. m_pSet->MoveFirst();
  231. UpdateData(FALSE);
  232. return;
  233. }
  234. else return;
  235. }
  236. }
  237. else {MessageBox("密码错误!");goto Loop;}
  238. }
  239. }
  240. void CMyView::OnTestButton() 
  241. {
  242. RET:
  243. if(password.DoModal()==IDOK)
  244. {
  245. if(password.m_Password=="let me in")
  246. {
  247. BACK:
  248. long i;
  249. int j;
  250. long store_Number=0;
  251. float measure_Time=0;
  252. float specious_measure_Time=0;
  253. float wide_measure_Time=0;
  254. float mistake[32];
  255. float mistake_all=0;
  256. float mistake_average=0;
  257. float s_mistake[32];
  258. float s_mistake_all=0;
  259. float s_mistake_average=0;
  260. float w_mistake[32];
  261. float w_mistake_all=0;
  262. float w_mistake_average=0;
  263. float End_measure_Time=0;
  264. float End_measure_Time1=0;
  265. float End_mistake[10];
  266. float End_mistake_all=0;
  267. float End_mistake_average=0;
  268. float Specious_End_measure_Time1=0;
  269. float Specious_End_measure_Time=0;
  270. float Specious_End_mistake[10];
  271. float Specious_End_mistake_all=0;
  272. float Specious_End_mistake_average=0;
  273. for(j=0;j<32;j++)
  274. {
  275. Spear_Time[j]=0;
  276. Specious_Spear_Time[j]=0;
  277. }
  278. for(i=0;i<10;i++)
  279. {
  280. End_Spear_Time[i]=0;
  281. Specious_End_Spear_Time[i]=0;
  282. }
  283. for(j=0;j<8;j++)
  284. wide[j]=0;
  285. m_pSet->MoveFirst();
  286. do{
  287. for(i=1;i<33;i++)//获得普通号码出现频率
  288. {
  289. if(m_pSet->m_column1==i)
  290. Spear_Time[i-1]++;
  291. }
  292. for(i=1;i<33;i++)
  293. {
  294. if(m_pSet->m_column2==i)
  295. Spear_Time[i-1]++;
  296. }
  297. for(i=1;i<33;i++)
  298. {
  299. if(m_pSet->m_column3==i)
  300. Spear_Time[i-1]++;
  301. }
  302. for(i=1;i<33;i++)
  303. {
  304. if(m_pSet->m_column4==i)
  305. Spear_Time[i-1]++;
  306. }
  307. for(i=1;i<33;i++)
  308. {
  309. if(m_pSet->m_column5==i)
  310. Spear_Time[i-1]++;
  311. }
  312. for(i=1;i<33;i++)
  313. {
  314. if(m_pSet->m_column6==i)
  315. Spear_Time[i-1]++;
  316. }
  317. for(i=1;i<33;i++)
  318. {
  319. if(m_pSet->m_column7==i)
  320. Spear_Time[i-1]++;
  321. }
  322. for(i=1;i<33;i++)//获得特别号码出现频率
  323. {
  324. if(m_pSet->m_column8==i)
  325. Specious_Spear_Time[i-1]++;
  326. }
  327. if((m_pSet->m_column1>=1)&&(m_pSet->m_column1<=4))//获得区间出现频率
  328. wide[0]++;
  329. else if((m_pSet->m_column1>=5)&&(m_pSet->m_column1<=8))
  330. wide[1]++;
  331. else if((m_pSet->m_column1>=9)&&(m_pSet->m_column1<=12))
  332. wide[2]++;
  333. else if((m_pSet->m_column1>=13)&&(m_pSet->m_column1<=16))
  334. wide[3]++;
  335. else if((m_pSet->m_column1>=17)&&(m_pSet->m_column1<=20))
  336. wide[4]++;
  337. else if((m_pSet->m_column1>=21)&&(m_pSet->m_column1<=24))
  338. wide[5]++;
  339. else if((m_pSet->m_column1>=25)&&(m_pSet->m_column1<=28))
  340. wide[6]++;
  341. else  wide[7]++;
  342. if((m_pSet->m_column2>=1)&&(m_pSet->m_column2<=4))
  343. wide[0]++;
  344. else if((m_pSet->m_column2>=5)&&(m_pSet->m_column2<=8))
  345. wide[1]++;
  346. else if((m_pSet->m_column2>=9)&&(m_pSet->m_column2<=12))
  347. wide[2]++;
  348. else if((m_pSet->m_column2>=13)&&(m_pSet->m_column2<=16))
  349. wide[3]++;
  350. else if((m_pSet->m_column2>=17)&&(m_pSet->m_column2<=20))
  351. wide[4]++;
  352. else if((m_pSet->m_column2>=21)&&(m_pSet->m_column2<=24))
  353. wide[5]++;
  354. else if((m_pSet->m_column2>=25)&&(m_pSet->m_column2<=28))
  355. wide[6]++;
  356. else  wide[7]++;
  357. if((m_pSet->m_column3>=1)&&(m_pSet->m_column3<=4))
  358. wide[0]++;
  359. else if((m_pSet->m_column3>=5)&&(m_pSet->m_column3<=8))
  360. wide[1]++;
  361. else if((m_pSet->m_column3>=9)&&(m_pSet->m_column3<=12))
  362. wide[2]++;
  363. else if((m_pSet->m_column3>=13)&&(m_pSet->m_column3<=16))
  364. wide[3]++;
  365. else if((m_pSet->m_column3>=17)&&(m_pSet->m_column3<=20))
  366. wide[4]++;
  367. else if((m_pSet->m_column3>=21)&&(m_pSet->m_column3<=24))
  368. wide[5]++;
  369. else if((m_pSet->m_column3>=25)&&(m_pSet->m_column3<=28))
  370. wide[6]++;
  371. else  wide[7]++;
  372. if((m_pSet->m_column4>=1)&&(m_pSet->m_column4<=4))
  373. wide[0]++;
  374. else if((m_pSet->m_column4>=5)&&(m_pSet->m_column4<=8))
  375. wide[1]++;
  376. else if((m_pSet->m_column4>=9)&&(m_pSet->m_column4<=12))
  377. wide[2]++;
  378. else if((m_pSet->m_column4>=13)&&(m_pSet->m_column4<=16))
  379. wide[3]++;
  380. else if((m_pSet->m_column4>=17)&&(m_pSet->m_column4<=20))
  381. wide[4]++;
  382. else if((m_pSet->m_column4>=21)&&(m_pSet->m_column4<=24))
  383. wide[5]++;
  384. else if((m_pSet->m_column4>=25)&&(m_pSet->m_column4<=28))
  385. wide[6]++;
  386. else  wide[7]++;
  387. if((m_pSet->m_column5>=1)&&(m_pSet->m_column5<=4))
  388. wide[0]++;
  389. else if((m_pSet->m_column5>=5)&&(m_pSet->m_column5<=8))
  390. wide[1]++;
  391. else if((m_pSet->m_column5>=9)&&(m_pSet->m_column5<=12))
  392. wide[2]++;
  393. else if((m_pSet->m_column5>=13)&&(m_pSet->m_column5<=16))
  394. wide[3]++;
  395. else if((m_pSet->m_column5>=17)&&(m_pSet->m_column5<=20))
  396. wide[4]++;
  397. else if((m_pSet->m_column5>=21)&&(m_pSet->m_column5<=24))
  398. wide[5]++;
  399. else if((m_pSet->m_column5>=25)&&(m_pSet->m_column5<=28))
  400. wide[6]++;
  401. else  wide[7]++;
  402. if((m_pSet->m_column6>=1)&&(m_pSet->m_column6<=4))
  403. wide[0]++;
  404. else if((m_pSet->m_column6>=5)&&(m_pSet->m_column6<=8))
  405. wide[1]++;
  406. else if((m_pSet->m_column6>=9)&&(m_pSet->m_column6<=12))
  407. wide[2]++;
  408. else if((m_pSet->m_column6>=13)&&(m_pSet->m_column6<=16))
  409. wide[3]++;
  410. else if((m_pSet->m_column6>=17)&&(m_pSet->m_column6<=20))
  411. wide[4]++;
  412. else if((m_pSet->m_column6>=21)&&(m_pSet->m_column6<=24))
  413. wide[5]++;
  414. else if((m_pSet->m_column6>=25)&&(m_pSet->m_column6<=28))
  415. wide[6]++;
  416. else  wide[7]++;
  417. if((m_pSet->m_column7>=1)&&(m_pSet->m_column7<=4))
  418. wide[0]++;
  419. else if((m_pSet->m_column7>=5)&&(m_pSet->m_column7<=8))
  420. wide[1]++;
  421. else if((m_pSet->m_column7>=9)&&(m_pSet->m_column7<=12))
  422. wide[2]++;
  423. else if((m_pSet->m_column7>=13)&&(m_pSet->m_column7<=16))
  424. wide[3]++;
  425. else if((m_pSet->m_column7>=17)&&(m_pSet->m_column7<=20))
  426. wide[4]++;
  427. else if((m_pSet->m_column7>=21)&&(m_pSet->m_column7<=24))
  428. wide[5]++;
  429. else if((m_pSet->m_column7>=25)&&(m_pSet->m_column7<=28))
  430. wide[6]++;
  431. else  wide[7]++;
  432. if((m_pSet->m_column8>=1)&&(m_pSet->m_column8<=4))
  433. wide[0]++;
  434. else if((m_pSet->m_column8>=5)&&(m_pSet->m_column8<=8))
  435. wide[1]++;
  436. else if((m_pSet->m_column8>=9)&&(m_pSet->m_column8<=12))
  437. wide[2]++;
  438. else if((m_pSet->m_column8>=13)&&(m_pSet->m_column8<=16))
  439. wide[3]++;
  440. else if((m_pSet->m_column8>=17)&&(m_pSet->m_column8<=20))
  441. wide[4]++;
  442. else if((m_pSet->m_column8>=21)&&(m_pSet->m_column8<=24))
  443. wide[5]++;
  444. else if((m_pSet->m_column8>=25)&&(m_pSet->m_column8<=28))
  445. wide[6]++;
  446. else  wide[7]++;
  447. store_Number++;//获得数据库总期数
  448. switch(m_pSet->m_column1%10)
  449. {
  450. case 0:End_Spear_Time[0]++;break;
  451. case 1:End_Spear_Time[1]++;break;
  452. case 2:End_Spear_Time[2]++;break;
  453. case 3:End_Spear_Time[3]++;break;
  454. case 4:End_Spear_Time[4]++;break;
  455. case 5:End_Spear_Time[5]++;break;
  456. case 6:End_Spear_Time[6]++;break;
  457. case 7:End_Spear_Time[7]++;break;
  458. case 8:End_Spear_Time[8]++;break;
  459. case 9:End_Spear_Time[9]++;break;
  460. default:break;
  461. }
  462. switch(m_pSet->m_column2%10)
  463. {
  464. case 0:End_Spear_Time[0]++;break;
  465. case 1:End_Spear_Time[1]++;break;
  466. case 2:End_Spear_Time[2]++;break;
  467. case 3:End_Spear_Time[3]++;break;
  468. case 4:End_Spear_Time[4]++;break;
  469. case 5:End_Spear_Time[5]++;break;
  470. case 6:End_Spear_Time[6]++;break;
  471. case 7:End_Spear_Time[7]++;break;
  472. case 8:End_Spear_Time[8]++;break;
  473. case 9:End_Spear_Time[9]++;break;
  474. default:break;
  475. }
  476. switch(m_pSet->m_column3%10)
  477. {
  478. case 0:End_Spear_Time[0]++;break;
  479. case 1:End_Spear_Time[1]++;break;
  480. case 2:End_Spear_Time[2]++;break;
  481. case 3:End_Spear_Time[3]++;break;
  482. case 4:End_Spear_Time[4]++;break;
  483. case 5:End_Spear_Time[5]++;break;
  484. case 6:End_Spear_Time[6]++;break;
  485. case 7:End_Spear_Time[7]++;break;
  486. case 8:End_Spear_Time[8]++;break;
  487. case 9:End_Spear_Time[9]++;break;
  488. default:break;
  489. }
  490. switch(m_pSet->m_column4%10)
  491. {
  492. case 0:End_Spear_Time[0]++;break;
  493. case 1:End_Spear_Time[1]++;break;
  494. case 2:End_Spear_Time[2]++;break;
  495. case 3:End_Spear_Time[3]++;break;
  496. case 4:End_Spear_Time[4]++;break;
  497. case 5:End_Spear_Time[5]++;break;
  498. case 6:End_Spear_Time[6]++;break;
  499. case 7:End_Spear_Time[7]++;break;
  500. case 8:End_Spear_Time[8]++;break;
  501. case 9:End_Spear_Time[9]++;break;
  502. default:break;
  503. }
  504. switch(m_pSet->m_column5%10)
  505. {
  506. case 0:End_Spear_Time[0]++;break;
  507. case 1:End_Spear_Time[1]++;break;
  508. case 2:End_Spear_Time[2]++;break;
  509. case 3:End_Spear_Time[3]++;break;
  510. case 4:End_Spear_Time[4]++;break;
  511. case 5:End_Spear_Time[5]++;break;
  512. case 6:End_Spear_Time[6]++;break;
  513. case 7:End_Spear_Time[7]++;break;
  514. case 8:End_Spear_Time[8]++;break;
  515. case 9:End_Spear_Time[9]++;break;
  516. default:break;
  517. }
  518. switch(m_pSet->m_column6%10)
  519. {
  520. case 0:End_Spear_Time[0]++;break;
  521. case 1:End_Spear_Time[1]++;break;
  522. case 2:End_Spear_Time[2]++;break;
  523. case 3:End_Spear_Time[3]++;break;
  524. case 4:End_Spear_Time[4]++;break;
  525. case 5:End_Spear_Time[5]++;break;
  526. case 6:End_Spear_Time[6]++;break;
  527. case 7:End_Spear_Time[7]++;break;
  528. case 8:End_Spear_Time[8]++;break;
  529. case 9:End_Spear_Time[9]++;break;
  530. default:break;
  531. }
  532. switch(m_pSet->m_column7%10)
  533. {
  534. case 0:End_Spear_Time[0]++;break;
  535. case 1:End_Spear_Time[1]++;break;
  536. case 2:End_Spear_Time[2]++;break;
  537. case 3:End_Spear_Time[3]++;break;
  538. case 4:End_Spear_Time[4]++;break;
  539. case 5:End_Spear_Time[5]++;break;
  540. case 6:End_Spear_Time[6]++;break;
  541. case 7:End_Spear_Time[7]++;break;
  542. case 8:End_Spear_Time[8]++;break;
  543. case 9:End_Spear_Time[9]++;break;
  544. default:break;
  545. }
  546. switch(m_pSet->m_column8%10)
  547. {
  548. case 0:Specious_End_Spear_Time[0]++;break;
  549. case 1:Specious_End_Spear_Time[1]++;break;
  550. case 2:Specious_End_Spear_Time[2]++;break;
  551. case 3:Specious_End_Spear_Time[3]++;break;
  552. case 4:Specious_End_Spear_Time[4]++;break;
  553. case 5:Specious_End_Spear_Time[5]++;break;
  554. case 6:Specious_End_Spear_Time[6]++;break;
  555. case 7:Specious_End_Spear_Time[7]++;break;
  556. case 8:Specious_End_Spear_Time[8]++;break;
  557. case 9:Specious_End_Spear_Time[9]++;break;
  558. default:break;
  559. }
  560. m_pSet->MoveNext();
  561. }while(!m_pSet->IsEOF());
  562. m_pSet->MoveFirst();
  563. if(store_Number>=25)
  564. {
  565. measure_Time=(float)((store_Number)*0.22453);//获得普通号码标准
  566. specious_measure_Time=(float)((store_Number)*0.04);//获得特别号码标准
  567. wide_measure_Time=(float)((store_Number)*1);//获得区间标准
  568. result.m_pp=measure_Time;
  569. result.m_tt=specious_measure_Time;
  570. result.m_ww=wide_measure_Time;
  571. for(i=0;i<32;i++)
  572. {
  573. if(Spear_Time[i]>=measure_Time)
  574. mistake[i]=Spear_Time[i]-measure_Time;
  575. else
  576. mistake[i]=measure_Time-Spear_Time[i];
  577. }
  578. for(i=0;i<32;i++)
  579. mistake_all=mistake_all+mistake[i];
  580. mistake_average=mistake_all/32;
  581.     for(i=0;i<32;i++)
  582. {
  583. if(Specious_Spear_Time[i]>=specious_measure_Time)
  584. s_mistake[i]=Specious_Spear_Time[i]-specious_measure_Time;
  585. else
  586. s_mistake[i]=specious_measure_Time-Specious_Spear_Time[i];
  587. }
  588. for(i=0;i<32;i++)
  589. s_mistake_all=s_mistake_all+s_mistake[i];
  590. s_mistake_average=s_mistake_all/32;
  591. for(i=0;i<8;i++)
  592. {
  593. if(wide[i]>=wide_measure_Time)
  594. w_mistake[i]=wide[i]-wide_measure_Time;
  595. else
  596. w_mistake[i]=wide_measure_Time-wide[i];
  597. }
  598. for(i=0;i<8;i++)
  599. w_mistake_all=w_mistake_all+w_mistake[i];
  600. w_mistake_average=w_mistake_all/32;
  601. result.m_mistake=mistake_average;
  602. result.m_spe_mistake=s_mistake_average;
  603. result.m_wide_mistake=w_mistake_average;
  604. result.m_1=Spear_Time[0];
  605. result.m_2=Spear_Time[1];
  606. result.m_3=Spear_Time[2];
  607. result.m_4=Spear_Time[3];
  608. result.m_6=Spear_Time[5];
  609. result.m_5=Spear_Time[4];
  610. result.m_7=Spear_Time[6];
  611. result.m_9=Spear_Time[8];
  612. result.m_8=Spear_Time[7];
  613. result.m_10=Spear_Time[9];
  614. result.m_11=Spear_Time[10];
  615. result.m_12=Spear_Time[11];
  616. result.m_13=Spear_Time[12];
  617. result.m_14=Spear_Time[13];
  618. result.m_15=Spear_Time[14];
  619. result.m_16=Spear_Time[15];
  620. result.m_17=Spear_Time[16];
  621. result.m_18=Spear_Time[17];
  622. result.m_19=Spear_Time[18];
  623. result.m_20=Spear_Time[19];
  624. result.m_21=Spear_Time[20];
  625. result.m_22=Spear_Time[21];
  626. result.m_23=Spear_Time[22];
  627. result.m_24=Spear_Time[23];
  628. result.m_25=Spear_Time[24];
  629. result.m_26=Spear_Time[25];
  630. result.m_27=Spear_Time[26];
  631. result.m_28=Spear_Time[27];
  632. result.m_29=Spear_Time[28];
  633. result.m_30=Spear_Time[29];
  634. result.m_31=Spear_Time[30];
  635. result.m_32=Spear_Time[31];
  636. result.m_s1=Specious_Spear_Time[0];
  637. result.m_s2=Specious_Spear_Time[1];
  638. result.m_s3=Specious_Spear_Time[2];
  639. result.m_s4=Specious_Spear_Time[3];
  640. result.m_s5=Specious_Spear_Time[4];
  641. result.m_s6=Specious_Spear_Time[5];
  642. result.m_s7=Specious_Spear_Time[6];
  643. result.m_s8=Specious_Spear_Time[7];
  644. result.m_s9=Specious_Spear_Time[8];
  645. result.m_s10=Specious_Spear_Time[9];
  646. result.m_s11=Specious_Spear_Time[10];
  647. result.m_s12=Specious_Spear_Time[11];
  648. result.m_s13=Specious_Spear_Time[12];
  649. result.m_s14=Specious_Spear_Time[13];
  650. result.m_s15=Specious_Spear_Time[14];
  651. result.m_s16=Specious_Spear_Time[15];
  652. result.m_s17=Specious_Spear_Time[16];
  653. result.m_s18=Specious_Spear_Time[17];
  654. result.m_s19=Specious_Spear_Time[18];
  655. result.m_s20=Specious_Spear_Time[19];
  656. result.m_s21=Specious_Spear_Time[20];
  657. result.m_s22=Specious_Spear_Time[21];
  658. result.m_s23=Specious_Spear_Time[22];
  659. result.m_s24=Specious_Spear_Time[23];
  660. result.m_s25=Specious_Spear_Time[24];
  661. result.m_s26=Specious_Spear_Time[25];
  662. result.m_s27=Specious_Spear_Time[26];
  663. result.m_s28=Specious_Spear_Time[27];
  664. result.m_s29=Specious_Spear_Time[28];
  665. result.m_s30=Specious_Spear_Time[29];
  666. result.m_s31=Specious_Spear_Time[30];
  667. result.m_s32=Specious_Spear_Time[31];
  668. result.m_w1=wide[0];
  669. result.m_w2=wide[1];
  670. result.m_w3=wide[2];
  671. result.m_w4=wide[3];
  672. result.m_w5=wide[4];
  673. result.m_w6=wide[5];
  674. result.m_w7=wide[6];
  675. result.m_w8=wide[7];
  676. if(result.m_1>(measure_Time+mistake_average)) result.m_p1="超标";//普通号码分析
  677. else if(result.m_1<(measure_Time-mistake_average)) result.m_p1="欠标";
  678. else result.m_p1="稳定";
  679. if(result.m_2>(measure_Time+mistake_average)) result.m_p2="超标";
  680. else if(result.m_2<(measure_Time-mistake_average)) result.m_p2="欠标";
  681. else result.m_p2="稳定";
  682. if(result.m_3>(measure_Time+mistake_average)) result.m_p3="超标";
  683. else if(result.m_3<(measure_Time-mistake_average)) result.m_p3="欠标";
  684. else result.m_p3="稳定";
  685. if(result.m_4>(measure_Time+mistake_average)) result.m_p4="超标";
  686. else if(result.m_4<(measure_Time-mistake_average)) result.m_p4="欠标";
  687. else result.m_p4="稳定";
  688. if(result.m_5>(measure_Time+mistake_average)) result.m_p5="超标";
  689. else if(result.m_5<(measure_Time-mistake_average)) result.m_p5="欠标";
  690. else result.m_p5="稳定";
  691. if(result.m_6>(measure_Time+mistake_average)) result.m_p6="超标";
  692. else if(result.m_6<(measure_Time-mistake_average)) result.m_p6="欠标";
  693. else result.m_p6="稳定";
  694. if(result.m_7>(measure_Time+mistake_average)) result.m_p7="超标";
  695. else if(result.m_7<(measure_Time-mistake_average)) result.m_p7="欠标";
  696. else result.m_p7="稳定";
  697. if(result.m_8>(measure_Time+mistake_average)) result.m_p8="超标";
  698. else if(result.m_8<(measure_Time-mistake_average)) result.m_p8="欠标";
  699. else result.m_p8="稳定";
  700. if(result.m_9>(measure_Time+mistake_average)) result.m_p9="超标";
  701. else if(result.m_9<(measure_Time-mistake_average)) result.m_p9="欠标";
  702. else result.m_p9="稳定";
  703. if(result.m_10>(measure_Time+mistake_average)) result.m_p10="超标";
  704. else if(result.m_10<(measure_Time-mistake_average)) result.m_p10="欠标";
  705. else result.m_p10="稳定";
  706. if(result.m_11>(measure_Time+mistake_average)) result.m_p11="超标";
  707. else if(result.m_11<(measure_Time-mistake_average)) result.m_p11="欠标";
  708. else result.m_p11="稳定";
  709. if(result.m_12>(measure_Time+mistake_average)) result.m_p12="超标";
  710. else if(result.m_12<(measure_Time-mistake_average)) result.m_p12="欠标";
  711. else result.m_p12="稳定";
  712. if(result.m_13>(measure_Time+mistake_average)) result.m_p13="超标";
  713. else if(result.m_13<(measure_Time-mistake_average)) result.m_p13="欠标";
  714. else result.m_p13="稳定";
  715. if(result.m_14>(measure_Time+mistake_average)) result.m_p14="超标";
  716. else if(result.m_14<(measure_Time-mistake_average)) result.m_p14="欠标";
  717. else result.m_p14="稳定";
  718. if(result.m_15>(measure_Time+mistake_average)) result.m_p15="超标";
  719. else if(result.m_15<(measure_Time-mistake_average)) result.m_p15="欠标";
  720. else result.m_p15="稳定";
  721. if(result.m_16>(measure_Time+mistake_average)) result.m_p16="超标";
  722. else if(result.m_16<(measure_Time-mistake_average)) result.m_p16="欠标";
  723. else result.m_p16="稳定";
  724. if(result.m_17>(measure_Time+mistake_average)) result.m_p17="超标";
  725. else if(result.m_17<(measure_Time-mistake_average)) result.m_p17="欠标";
  726. else result.m_p17="稳定";
  727. if(result.m_18>(measure_Time+mistake_average)) result.m_p18="超标";
  728. else if(result.m_18<(measure_Time-mistake_average)) result.m_p18="欠标";
  729. else result.m_p18="稳定";
  730. if(result.m_19>(measure_Time+mistake_average)) result.m_p19="超标";
  731. else if(result.m_19<(measure_Time-mistake_average)) result.m_p19="欠标";
  732. else result.m_p19="稳定";
  733. if(result.m_20>(measure_Time+mistake_average)) result.m_p20="超标";
  734. else if(result.m_20<(measure_Time-mistake_average)) result.m_p20="欠标";
  735. else result.m_p20="稳定";
  736. if(result.m_21>(measure_Time+mistake_average)) result.m_p21="超标";
  737. else if(result.m_21<(measure_Time-mistake_average)) result.m_p21="欠标";
  738. else result.m_p21="稳定";
  739. if(result.m_22>(measure_Time+mistake_average)) result.m_p22="超标";
  740. else if(result.m_22<(measure_Time-mistake_average)) result.m_p22="欠标";
  741. else result.m_p22="稳定";
  742. if(result.m_23>(measure_Time+mistake_average)) result.m_p23="超标";
  743. else if(result.m_23<(measure_Time-mistake_average)) result.m_p23="欠标";
  744. else result.m_p23="稳定";
  745. if(result.m_24>(measure_Time+mistake_average)) result.m_p24="超标";
  746. else if(result.m_24<(measure_Time-mistake_average)) result.m_p24="欠标";
  747. else result.m_p24="稳定";
  748. if(result.m_25>(measure_Time+mistake_average)) result.m_p25="超标";
  749. else if(result.m_25<(measure_Time-mistake_average)) result.m_p25="欠标";
  750. else result.m_p25="稳定";
  751. if(result.m_26>(measure_Time+mistake_average)) result.m_p26="超标";
  752. else if(result.m_26<(measure_Time-mistake_average)) result.m_p26="欠标";
  753. else result.m_p26="稳定";
  754. if(result.m_27>(measure_Time+mistake_average)) result.m_p27="超标";
  755. else if(result.m_27<(measure_Time-mistake_average)) result.m_p27="欠标";
  756. else result.m_p27="稳定";
  757. if(result.m_28>(measure_Time+mistake_average)) result.m_p28="超标";
  758. else if(result.m_28<(measure_Time-mistake_average)) result.m_p28="欠标";
  759. else result.m_p28="稳定";
  760. if(result.m_29>(measure_Time+mistake_average)) result.m_p29="超标";
  761. else if(result.m_29<(measure_Time-mistake_average)) result.m_p29="欠标";
  762. else result.m_p29="稳定";
  763. if(result.m_30>(measure_Time+mistake_average)) result.m_p30="超标";
  764. else if(result.m_30<(measure_Time-mistake_average)) result.m_p30="欠标";
  765. else result.m_p30="稳定";
  766. if(result.m_31>(measure_Time+mistake_average)) result.m_p31="超标";
  767. else if(result.m_31<(measure_Time-mistake_average)) result.m_p31="欠标";
  768. else result.m_p31="稳定";
  769. if(result.m_32>(measure_Time+mistake_average)) result.m_p32="超标";
  770. else if(result.m_32<(measure_Time-mistake_average)) result.m_p32="欠标";
  771. else result.m_p32="稳定";
  772. if(result.m_s1>(specious_measure_Time+s_mistake_average)) result.m_sp1="超标";//分析特别号码
  773. else if(result.m_s1<(specious_measure_Time-s_mistake_average)) result.m_sp1="欠标";
  774. else result.m_sp1="稳定";
  775. if(result.m_s2>(specious_measure_Time+s_mistake_average)) result.m_sp2="超标";
  776. else if(result.m_s2<(specious_measure_Time-s_mistake_average)) result.m_sp2="欠标";
  777. else result.m_sp2="稳定";
  778. if(result.m_s3>(specious_measure_Time+s_mistake_average)) result.m_sp3="超标";
  779. else if(result.m_s3<(specious_measure_Time-s_mistake_average)) result.m_sp3="欠标";
  780. else result.m_sp3="稳定";
  781. if(result.m_s4>(specious_measure_Time+s_mistake_average)) result.m_sp4="超标";
  782. else if(result.m_s4<(specious_measure_Time-s_mistake_average)) result.m_sp4="欠标";
  783. else result.m_sp4="稳定";
  784. if(result.m_s5>(specious_measure_Time+s_mistake_average)) result.m_sp5="超标";
  785. else if(result.m_s5<(specious_measure_Time-s_mistake_average)) result.m_sp5="欠标";
  786. else result.m_sp5="稳定";
  787. if(result.m_s6>(specious_measure_Time+s_mistake_average)) result.m_sp6="超标";
  788. else if(result.m_s6<(specious_measure_Time-s_mistake_average)) result.m_sp6="欠标";
  789. else result.m_sp6="稳定";
  790. if(result.m_s7>(specious_measure_Time+s_mistake_average)) result.m_sp7="超标";
  791. else if(result.m_s7<(specious_measure_Time-s_mistake_average)) result.m_sp7="欠标";
  792. else result.m_sp7="稳定";
  793. if(result.m_s8>(specious_measure_Time+s_mistake_average)) result.m_sp8="超标";
  794. else if(result.m_s8<(specious_measure_Time-s_mistake_average)) result.m_sp8="欠标";
  795. else result.m_sp8="稳定";
  796. if(result.m_s9>(specious_measure_Time+s_mistake_average)) result.m_sp9="超标";
  797. else if(result.m_s9<(specious_measure_Time-s_mistake_average)) result.m_sp9="欠标";
  798. else result.m_sp9="稳定";
  799. if(result.m_s10>(specious_measure_Time+s_mistake_average)) result.m_sp10="超标";
  800. else if(result.m_s10<(specious_measure_Time-s_mistake_average)) result.m_sp10="欠标";
  801. else result.m_sp10="稳定";
  802. if(result.m_s11>(specious_measure_Time+s_mistake_average)) result.m_sp11="超标";
  803. else if(result.m_s11<(specious_measure_Time-s_mistake_average)) result.m_sp11="欠标";
  804. else result.m_sp11="稳定";
  805. if(result.m_s12>(specious_measure_Time+s_mistake_average)) result.m_sp12="超标";
  806. else if(result.m_s12<(specious_measure_Time-s_mistake_average)) result.m_sp12="欠标";
  807. else result.m_sp12="稳定";
  808. if(result.m_s13>(specious_measure_Time+s_mistake_average)) result.m_sp13="超标";
  809. else if(result.m_s13<(specious_measure_Time-s_mistake_average)) result.m_sp13="欠标";
  810. else result.m_sp13="稳定";
  811. if(result.m_s14>(specious_measure_Time+s_mistake_average)) result.m_sp14="超标";
  812. else if(result.m_s14<(specious_measure_Time-s_mistake_average)) result.m_sp14="欠标";
  813. else result.m_sp14="稳定";
  814. if(result.m_s15>(specious_measure_Time+s_mistake_average)) result.m_sp15="超标";
  815. else if(result.m_s15<(specious_measure_Time-s_mistake_average)) result.m_sp15="欠标";
  816. else result.m_sp15="稳定";
  817. if(result.m_s16>(specious_measure_Time+s_mistake_average)) result.m_sp16="超标";
  818. else if(result.m_s16<(specious_measure_Time-s_mistake_average)) result.m_sp16="欠标";
  819. else result.m_sp16="稳定";
  820. if(result.m_s17>(specious_measure_Time+s_mistake_average)) result.m_sp17="超标";
  821. else if(result.m_s17<(specious_measure_Time-s_mistake_average)) result.m_sp17="欠标";
  822. else result.m_sp17="稳定";
  823. if(result.m_s18>(specious_measure_Time+s_mistake_average)) result.m_sp18="超标";
  824. else if(result.m_s18<(specious_measure_Time-s_mistake_average)) result.m_sp18="欠标";
  825. else result.m_sp18="稳定";
  826. if(result.m_s19>(specious_measure_Time+s_mistake_average)) result.m_sp19="超标";
  827. else if(result.m_s19<(specious_measure_Time-s_mistake_average)) result.m_sp19="欠标";
  828. else result.m_sp19="稳定";
  829. if(result.m_s20>(specious_measure_Time+s_mistake_average)) result.m_sp20="超标";
  830. else if(result.m_s20<(specious_measure_Time-s_mistake_average)) result.m_sp20="欠标";
  831. else result.m_sp20="稳定";
  832. if(result.m_s21>(specious_measure_Time+s_mistake_average)) result.m_sp21="超标";
  833. else if(result.m_s21<(specious_measure_Time-s_mistake_average)) result.m_sp21="欠标";
  834. else result.m_sp21="稳定";
  835. if(result.m_s22>(specious_measure_Time+s_mistake_average)) result.m_sp22="超标";
  836. else if(result.m_s22<(specious_measure_Time-s_mistake_average)) result.m_sp22="欠标";
  837. else result.m_sp22="稳定";
  838. if(result.m_s23>(specious_measure_Time+s_mistake_average)) result.m_sp23="超标";
  839. else if(result.m_s23<(specious_measure_Time-s_mistake_average)) result.m_sp23="欠标";
  840. else result.m_sp23="稳定";
  841. if(result.m_s24>(specious_measure_Time+s_mistake_average)) result.m_sp24="超标";
  842. else if(result.m_s24<(specious_measure_Time-s_mistake_average)) result.m_sp24="欠标";
  843. else result.m_sp24="稳定";
  844. if(result.m_s25>(specious_measure_Time+s_mistake_average)) result.m_sp25="超标";
  845. else if(result.m_s25<(specious_measure_Time-s_mistake_average)) result.m_sp25="欠标";
  846. else result.m_sp25="稳定";
  847. if(result.m_s26>(specious_measure_Time+s_mistake_average)) result.m_sp26="超标";
  848. else if(result.m_s26<(specious_measure_Time-s_mistake_average)) result.m_sp26="欠标";
  849. else result.m_sp26="稳定";
  850. if(result.m_s27>(specious_measure_Time+s_mistake_average)) result.m_sp27="超标";
  851. else if(result.m_s27<(specious_measure_Time-s_mistake_average)) result.m_sp27="欠标";
  852. else result.m_sp27="稳定";
  853. if(result.m_s28>(specious_measure_Time+s_mistake_average)) result.m_sp28="超标";
  854. else if(result.m_s28<(specious_measure_Time-s_mistake_average)) result.m_sp28="欠标";
  855. else result.m_sp28="稳定";
  856. if(result.m_s29>(specious_measure_Time+s_mistake_average)) result.m_sp29="超标";
  857. else if(result.m_s29<(specious_measure_Time-s_mistake_average)) result.m_sp29="欠标";
  858. else result.m_sp29="稳定";
  859. if(result.m_s30>(specious_measure_Time+s_mistake_average)) result.m_sp30="超标";
  860. else if(result.m_s30<(specious_measure_Time-s_mistake_average)) result.m_sp30="欠标";
  861. else result.m_sp30="稳定";
  862. if(result.m_s31>(specious_measure_Time+s_mistake_average)) result.m_sp31="超标";
  863. else if(result.m_s31<(specious_measure_Time-s_mistake_average)) result.m_sp31="欠标";
  864. else result.m_sp31="稳定";
  865. if(result.m_s32>(specious_measure_Time+s_mistake_average)) result.m_sp32="超标";
  866. else if(result.m_s32<(specious_measure_Time-s_mistake_average)) result.m_sp32="欠标";
  867. else result.m_sp32="稳定";
  868. if(result.m_w1>(wide_measure_Time+w_mistake_average)) result.m_pw1="超标";
  869. else if(result.m_w1<(wide_measure_Time-w_mistake_average)) result.m_pw1="欠标";
  870. else result.m_pw1="稳定";
  871. if(result.m_w2>(wide_measure_Time+w_mistake_average)) result.m_pw2="超标";
  872. else if(result.m_w2<(wide_measure_Time-w_mistake_average)) result.m_pw2="欠标";
  873. else result.m_pw2="稳定";
  874. if(result.m_w3>(wide_measure_Time+w_mistake_average)) result.m_pw3="超标";
  875. else if(result.m_w3<(wide_measure_Time-w_mistake_average)) result.m_pw3="欠标";
  876. else result.m_pw3="稳定";
  877. if(result.m_w4>(wide_measure_Time+w_mistake_average)) result.m_pw4="超标";
  878. else if(result.m_w4<(wide_measure_Time-w_mistake_average)) result.m_pw4="欠标";
  879. else result.m_pw4="稳定";
  880. if(result.m_w5>(wide_measure_Time+w_mistake_average)) result.m_pw5="超标";
  881. else if(result.m_w5<(wide_measure_Time-w_mistake_average)) result.m_pw5="欠标";
  882. else result.m_pw5="稳定";
  883. if(result.m_w6>(wide_measure_Time+w_mistake_average)) result.m_pw6="超标";
  884. else if(result.m_w6<(wide_measure_Time-w_mistake_average)) result.m_pw6="欠标";
  885. else result.m_pw6="稳定";
  886. if(result.m_w7>(wide_measure_Time+w_mistake_average)) result.m_pw7="超标";
  887. else if(result.m_w7<(wide_measure_Time-w_mistake_average)) result.m_pw7="欠标";
  888. else result.m_pw7="稳定";
  889. if(result.m_w8>(wide_measure_Time+w_mistake_average)) result.m_pw8="超标";
  890. else if(result.m_w8<(wide_measure_Time-w_mistake_average)) result.m_pw8="欠标";
  891. else result.m_pw8="稳定";
  892. UpdateData(FALSE);
  893. if(result.DoModal()==IDOK)
  894. {
  895. End_measure_Time=(float)(store_Number*0.67359);
  896. End_measure_Time1=(float)(store_Number*0.89812);
  897. Specious_End_measure_Time=(float)(store_Number*0.12);
  898. Specious_End_measure_Time1=(float)(store_Number*0.16);
  899. end.m_epp=End_measure_Time;
  900. end.m_ett=Specious_End_measure_Time;
  901. end.m_epp1=End_measure_Time1;
  902. end.m_ett1=Specious_End_measure_Time1;
  903. for(i=3;i<10;i++)
  904. {
  905. if(End_Spear_Time[i]>=End_measure_Time)
  906. End_mistake[i]=End_Spear_Time[i]-End_measure_Time;
  907. else
  908. End_mistake[i]=End_measure_Time-End_Spear_Time[i];
  909. if(Specious_End_Spear_Time[i]>=Specious_End_measure_Time)
  910. Specious_End_mistake[i]=Specious_End_Spear_Time[i]-End_measure_Time;
  911. else
  912. Specious_End_mistake[i]=Specious_End_measure_Time-Specious_End_Spear_Time[i];
  913. }
  914. if(End_Spear_Time[0]>=End_measure_Time)
  915. End_mistake[0]=End_Spear_Time[0]-End_measure_Time;
  916. else
  917. End_mistake[0]=End_measure_Time-End_Spear_Time[0];
  918. if(End_Spear_Time[1]>=End_measure_Time1)
  919. End_mistake[1]=End_Spear_Time[1]-End_measure_Time1;
  920. else
  921. End_mistake[1]=End_measure_Time1-End_Spear_Time[1];
  922. if(End_Spear_Time[2]>=End_measure_Time1)
  923. End_mistake[2]=End_Spear_Time[2]-End_measure_Time1;
  924. else
  925. End_mistake[2]=End_measure_Time1-End_Spear_Time[2];
  926. if(Specious_End_Spear_Time[0]>=Specious_End_measure_Time)
  927. Specious_End_mistake[0]=Specious_End_Spear_Time[0]-Specious_End_measure_Time;
  928. else
  929. Specious_End_mistake[0]=Specious_End_measure_Time-Specious_End_Spear_Time[0];
  930. if(Specious_End_Spear_Time[1]>=Specious_End_measure_Time1)
  931. Specious_End_mistake[1]=Specious_End_Spear_Time[1]-Specious_End_measure_Time1;
  932. else
  933. Specious_End_mistake[1]=Specious_End_measure_Time1-Specious_End_Spear_Time[1];
  934. if(Specious_End_Spear_Time[2]>=Specious_End_measure_Time1)
  935. Specious_End_mistake[2]=Specious_End_Spear_Time[2]-Specious_End_measure_Time1;
  936. else
  937. Specious_End_mistake[2]=Specious_End_measure_Time1-Specious_End_Spear_Time[2];
  938. for(i=0;i<10;i++)
  939. {
  940. End_mistake_all=End_mistake_all+End_mistake[i];
  941. Specious_End_mistake_all=Specious_End_mistake_all+Specious_End_mistake[i];
  942. }
  943. End_mistake_average=End_mistake_all/10;
  944. Specious_End_mistake_average=Specious_End_mistake_all/10;
  945. end.m_normal_mistake=End_mistake_average;
  946. end.m_specious_mistake=Specious_End_mistake_average;
  947. end.m_end0=End_Spear_Time[0];
  948. end.m_end1=End_Spear_Time[1];
  949. end.m_end2=End_Spear_Time[2];
  950. end.m_end3=End_Spear_Time[3];
  951. end.m_end4=End_Spear_Time[4];
  952. end.m_end5=End_Spear_Time[5];
  953. end.m_end6=End_Spear_Time[6];
  954. end.m_end7=End_Spear_Time[7];
  955. end.m_end8=End_Spear_Time[8];
  956. end.m_end9=End_Spear_Time[9];
  957. end.m_send0=Specious_End_Spear_Time[0];
  958. end.m_send1=Specious_End_Spear_Time[1];
  959. end.m_send2=Specious_End_Spear_Time[2];
  960. end.m_send3=Specious_End_Spear_Time[3];
  961. end.m_send4=Specious_End_Spear_Time[4];
  962. end.m_send5=Specious_End_Spear_Time[5];
  963. end.m_send6=Specious_End_Spear_Time[6];
  964. end.m_send7=Specious_End_Spear_Time[7];
  965. end.m_send8=Specious_End_Spear_Time[8];
  966. end.m_send9=Specious_End_Spear_Time[9];
  967. if(end.m_end0>End_measure_Time+End_mistake_average) end.m_pend0="超标";
  968. else if(end.m_end0<End_measure_Time-End_mistake_average) end.m_pend0="欠标";
  969. else end.m_pend0="稳定";
  970. if(end.m_end1>End_measure_Time1+End_mistake_average) end.m_pend1="超标";
  971. else if(end.m_end1<End_measure_Time1-End_mistake_average) end.m_pend1="欠标";
  972. else end.m_pend1="稳定";
  973. if(end.m_end2>End_measure_Time1+End_mistake_average) end.m_pend2="超标";
  974. else if(end.m_end2<End_measure_Time1-End_mistake_average) end.m_pend2="欠标";
  975. else end.m_pend2="稳定";
  976. if(end.m_end3>End_measure_Time+End_mistake_average) end.m_pend3="超标";
  977. else if(end.m_end3<End_measure_Time-End_mistake_average) end.m_pend3="欠标";
  978. else end.m_pend3="稳定";
  979. if(end.m_end4>End_measure_Time+End_mistake_average) end.m_pend4="超标";
  980. else if(end.m_end4<End_measure_Time-End_mistake_average) end.m_pend4="欠标";
  981. else end.m_pend4="稳定";
  982. if(end.m_end5>End_measure_Time+End_mistake_average) end.m_pend5="超标";
  983. else if(end.m_end5<End_measure_Time-End_mistake_average) end.m_pend5="欠标";
  984. else end.m_pend5="稳定";
  985. if(end.m_end6>End_measure_Time+End_mistake_average) end.m_pend6="超标";
  986. else if(end.m_end6<End_measure_Time-End_mistake_average) end.m_pend6="欠标";
  987. else end.m_pend6="稳定";
  988. if(end.m_end7>End_measure_Time+End_mistake_average) end.m_pend7="超标";
  989. else if(end.m_end7<End_measure_Time-End_mistake_average) end.m_pend7="欠标";
  990. else end.m_pend7="稳定";
  991. if(end.m_end8>End_measure_Time+End_mistake_average) end.m_pend8="超标";
  992. else if(end.m_end8<End_measure_Time-End_mistake_average) end.m_pend8="欠标";
  993. else end.m_pend8="稳定";
  994. if(end.m_end9>End_measure_Time+End_mistake_average) end.m_pend9="超标";
  995. else if(end.m_end9<End_measure_Time-End_mistake_average) end.m_pend9="欠标";
  996. else end.m_pend9="稳定";
  997. if(end.m_send0>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend0="超标";
  998. else if(end.m_send0<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend0="欠标";
  999. else end.m_spend0="稳定";
  1000. if(end.m_send1>Specious_End_measure_Time1+Specious_End_mistake_average) end.m_spend1="超标";
  1001. else if(end.m_send1<Specious_End_measure_Time1-Specious_End_mistake_average) end.m_spend1="欠标";
  1002. else end.m_spend1="稳定";
  1003. if(end.m_send2>Specious_End_measure_Time1+Specious_End_mistake_average) end.m_spend2="超标";
  1004. else if(end.m_send2<Specious_End_measure_Time1-Specious_End_mistake_average) end.m_spend2="欠标";
  1005. else end.m_spend2="稳定";
  1006. if(end.m_send3>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend3="超标";
  1007. else if(end.m_send3<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend3="欠标";
  1008. else end.m_spend3="稳定";
  1009. if(end.m_send4>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend4="超标";
  1010. else if(end.m_send4<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend4="欠标";
  1011. else end.m_spend4="稳定";
  1012. if(end.m_send5>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend5="超标";
  1013. else if(end.m_send5<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend5="欠标";
  1014. else end.m_spend5="稳定";
  1015. if(end.m_send6>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend6="超标";
  1016. else if(end.m_send6<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend6="欠标";
  1017. else end.m_spend6="稳定";
  1018. if(end.m_send7>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend7="超标";
  1019. else if(end.m_send7<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend7="欠标";
  1020. else end.m_spend7="稳定";
  1021. if(end.m_send8>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend8="超标";
  1022. else if(end.m_send8<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend8="欠标";
  1023. else end.m_spend8="稳定";
  1024. if(end.m_send9>Specious_End_measure_Time+Specious_End_mistake_average) end.m_spend9="超标";
  1025. else if(end.m_send9<Specious_End_measure_Time-Specious_End_mistake_average) end.m_spend9="欠标";
  1026. else end.m_spend9="稳定";
  1027. UpdateData(FALSE);
  1028. if(end.DoModal()==IDOK)
  1029. goto BACK;
  1030. }
  1031. }
  1032. else {
  1033. MessageBox("分析数据太少!无法统计!");
  1034. return;
  1035. }
  1036. }
  1037. else {
  1038. MessageBox("密码错误!");goto RET;
  1039. }
  1040. }
  1041. else return;
  1042. }
  1043. HBRUSH CMyView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
  1044. {
  1045. pDC->SetBkMode(TRANSPARENT);
  1046.                
  1047.    pDC->SetTextColor(RGB(255,128,255));
  1048.    return m_hbrush;
  1049. }
  1050. void CMyView::OnDeleteButton() 
  1051. {
  1052. Again:
  1053. if(password.DoModal()==IDOK)
  1054. {
  1055. if(password.m_Password=="i love money delete")
  1056. {
  1057. if(del.DoModal()==IDOK)
  1058. {
  1059. m_pSet->MoveFirst();
  1060. do
  1061. {
  1062. if(del.m_Del_ID!=m_pSet->m_column9)
  1063. m_pSet->MoveNext();
  1064. else
  1065. {
  1066. m_pSet->Delete();
  1067. m_pSet->Requery();
  1068. UpdateData(FALSE);
  1069. break;
  1070. }
  1071. }while(!m_pSet->IsEOF());
  1072. if(m_pSet->IsEOF())
  1073. {
  1074. MessageBox("根本没有此记录!");
  1075. m_pSet->MoveFirst();
  1076. UpdateData(FALSE);
  1077. return;
  1078. }
  1079. }
  1080. }
  1081. else{MessageBox("密码错误!");goto Again;}
  1082. }
  1083. }