Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1358 lines
47 KiB

  1. #define FILE_SERVER //FILE_LOCAL FILE_SERVER
  2. using System;
  3. using System.Drawing;
  4. using System.Collections;
  5. using System.ComponentModel;
  6. using System.Windows.Forms;
  7. using System.Threading;
  8. using Microsoft.Win32;
  9. namespace OCAReports
  10. {
  11. /// <summary>
  12. /// Summary description for frmDaily.
  13. /// </summary>
  14. public class frmDaily : System.Windows.Forms.Form
  15. {
  16. internal System.Windows.Forms.CheckBox chkReports13;
  17. internal System.Windows.Forms.CheckBox chkReports12;
  18. internal System.Windows.Forms.CheckBox chkReports11;
  19. internal System.Windows.Forms.CheckBox chkReports8;
  20. internal System.Windows.Forms.CheckBox chkReports10;
  21. internal System.Windows.Forms.CheckBox chkReports9;
  22. internal System.Windows.Forms.CheckBox chkReports7;
  23. internal System.Windows.Forms.CheckBox chkReports6;
  24. internal System.Windows.Forms.CheckBox chkReports5;
  25. internal System.Windows.Forms.CheckBox chkReports4;
  26. internal System.Windows.Forms.CheckBox chkReports3;
  27. internal System.Windows.Forms.CheckBox chkReports2;
  28. internal System.Windows.Forms.CheckBox chkReports1;
  29. private System.Windows.Forms.MonthCalendar monthCalendar1;
  30. private System.Windows.Forms.StatusBar statusBar1;
  31. private System.Windows.Forms.ProgressBar progressBar1;
  32. private System.Windows.Forms.TabControl tabControl1;
  33. private System.Windows.Forms.TabPage tabPage1;
  34. private System.Windows.Forms.TabPage tabPage2;
  35. private System.Windows.Forms.TabPage tabPage3;
  36. private System.Windows.Forms.Label label5;
  37. private System.Windows.Forms.Label label6;
  38. private System.Windows.Forms.Label label4;
  39. private System.Windows.Forms.Label label3;
  40. private AxMSChart20Lib.AxMSChart axMSChart1;
  41. private System.Windows.Forms.Label label7;
  42. private System.Windows.Forms.Label label8;
  43. private System.Windows.Forms.Label label9;
  44. private System.Windows.Forms.Label label10;
  45. private System.Windows.Forms.Label label11;
  46. private System.Windows.Forms.Label lblGeneralSolutions;
  47. private System.Windows.Forms.Label lblSpecificCount;
  48. private System.Windows.Forms.Label lblAnonymousCount;
  49. private System.Windows.Forms.Label lblCustomerCount;
  50. private System.Windows.Forms.Label lblDailyCount;
  51. private System.Windows.Forms.Label lblArchiveMiniCount;
  52. private System.Windows.Forms.Label lblWatsonMiniCount;
  53. private System.Windows.Forms.Label lblArchiveCount;
  54. private System.Windows.Forms.Label lblWatsonCount;
  55. private System.Windows.Forms.Label lblStopCodeCount;
  56. private System.Windows.Forms.Label label22;
  57. private System.Windows.Forms.Label label23;
  58. private System.Windows.Forms.Label label24;
  59. private System.Windows.Forms.Label label25;
  60. private System.Windows.Forms.Label label26;
  61. /// <summary>
  62. /// Required designer variable.
  63. /// </summary>
  64. private System.ComponentModel.Container components = null;
  65. private System.Windows.Forms.Label lblWA;
  66. private System.Windows.Forms.Label label13;
  67. private System.Windows.Forms.Label lblAD;
  68. private System.Windows.Forms.Label label14;
  69. #region ########################Global Variables######################################33
  70. /*************************************************************************************
  71. * module: frmAnonCust.cs - Global varibles and objects
  72. *
  73. * author: Tim Ragain
  74. * date: Jan 22, 2002
  75. *
  76. * Purpose: All global threads and variables are declared.
  77. *
  78. *************************************************************************************/
  79. Thread t_ThreadGBucket;
  80. Thread t_ThreadSBucket;
  81. private System.Windows.Forms.Label lblPurpose;
  82. private System.Windows.Forms.Label lblStatement;
  83. internal System.Windows.Forms.CheckBox chkSelectAll;
  84. Thread t_ThreadStopCode;
  85. #endregion
  86. public frmDaily()
  87. {
  88. //
  89. // Required for Windows Form Designer support
  90. //
  91. InitializeComponent();
  92. //
  93. // TODO: Add any constructor code after InitializeComponent call
  94. //
  95. }
  96. /// <summary>
  97. /// Clean up any resources being used.
  98. /// </summary>
  99. protected override void Dispose( bool disposing )
  100. {
  101. if( disposing )
  102. {
  103. if(components != null)
  104. {
  105. components.Dispose();
  106. }
  107. }
  108. base.Dispose( disposing );
  109. }
  110. #region Windows Form Designer generated code
  111. /// <summary>
  112. /// Required method for Designer support - do not modify
  113. /// the contents of this method with the code editor.
  114. /// </summary>
  115. private void InitializeComponent()
  116. {
  117. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmDaily));
  118. this.chkReports13 = new System.Windows.Forms.CheckBox();
  119. this.chkReports12 = new System.Windows.Forms.CheckBox();
  120. this.chkReports11 = new System.Windows.Forms.CheckBox();
  121. this.chkReports8 = new System.Windows.Forms.CheckBox();
  122. this.chkReports10 = new System.Windows.Forms.CheckBox();
  123. this.chkReports9 = new System.Windows.Forms.CheckBox();
  124. this.chkReports7 = new System.Windows.Forms.CheckBox();
  125. this.chkReports6 = new System.Windows.Forms.CheckBox();
  126. this.chkReports5 = new System.Windows.Forms.CheckBox();
  127. this.chkReports4 = new System.Windows.Forms.CheckBox();
  128. this.chkReports3 = new System.Windows.Forms.CheckBox();
  129. this.chkReports2 = new System.Windows.Forms.CheckBox();
  130. this.chkReports1 = new System.Windows.Forms.CheckBox();
  131. this.monthCalendar1 = new System.Windows.Forms.MonthCalendar();
  132. this.statusBar1 = new System.Windows.Forms.StatusBar();
  133. this.progressBar1 = new System.Windows.Forms.ProgressBar();
  134. this.lblPurpose = new System.Windows.Forms.Label();
  135. this.lblStatement = new System.Windows.Forms.Label();
  136. this.tabControl1 = new System.Windows.Forms.TabControl();
  137. this.tabPage1 = new System.Windows.Forms.TabPage();
  138. this.axMSChart1 = new AxMSChart20Lib.AxMSChart();
  139. this.tabPage2 = new System.Windows.Forms.TabPage();
  140. this.lblAD = new System.Windows.Forms.Label();
  141. this.label14 = new System.Windows.Forms.Label();
  142. this.lblWA = new System.Windows.Forms.Label();
  143. this.label13 = new System.Windows.Forms.Label();
  144. this.lblArchiveMiniCount = new System.Windows.Forms.Label();
  145. this.lblWatsonMiniCount = new System.Windows.Forms.Label();
  146. this.lblArchiveCount = new System.Windows.Forms.Label();
  147. this.lblWatsonCount = new System.Windows.Forms.Label();
  148. this.lblStopCodeCount = new System.Windows.Forms.Label();
  149. this.label22 = new System.Windows.Forms.Label();
  150. this.label23 = new System.Windows.Forms.Label();
  151. this.label24 = new System.Windows.Forms.Label();
  152. this.label25 = new System.Windows.Forms.Label();
  153. this.label26 = new System.Windows.Forms.Label();
  154. this.lblGeneralSolutions = new System.Windows.Forms.Label();
  155. this.lblSpecificCount = new System.Windows.Forms.Label();
  156. this.lblAnonymousCount = new System.Windows.Forms.Label();
  157. this.lblCustomerCount = new System.Windows.Forms.Label();
  158. this.lblDailyCount = new System.Windows.Forms.Label();
  159. this.label11 = new System.Windows.Forms.Label();
  160. this.label10 = new System.Windows.Forms.Label();
  161. this.label9 = new System.Windows.Forms.Label();
  162. this.label8 = new System.Windows.Forms.Label();
  163. this.label7 = new System.Windows.Forms.Label();
  164. this.tabPage3 = new System.Windows.Forms.TabPage();
  165. this.label5 = new System.Windows.Forms.Label();
  166. this.label6 = new System.Windows.Forms.Label();
  167. this.label4 = new System.Windows.Forms.Label();
  168. this.label3 = new System.Windows.Forms.Label();
  169. this.chkSelectAll = new System.Windows.Forms.CheckBox();
  170. this.tabControl1.SuspendLayout();
  171. this.tabPage1.SuspendLayout();
  172. ((System.ComponentModel.ISupportInitialize)(this.axMSChart1)).BeginInit();
  173. this.tabPage2.SuspendLayout();
  174. this.tabPage3.SuspendLayout();
  175. this.SuspendLayout();
  176. //
  177. // chkReports13
  178. //
  179. this.chkReports13.Location = new System.Drawing.Point(696, 444);
  180. this.chkReports13.Name = "chkReports13";
  181. this.chkReports13.Size = new System.Drawing.Size(128, 16);
  182. this.chkReports13.TabIndex = 60;
  183. this.chkReports13.Text = "Get Archive Mini";
  184. //
  185. // chkReports12
  186. //
  187. this.chkReports12.Location = new System.Drawing.Point(696, 416);
  188. this.chkReports12.Name = "chkReports12";
  189. this.chkReports12.Size = new System.Drawing.Size(128, 16);
  190. this.chkReports12.TabIndex = 59;
  191. this.chkReports12.Text = "Get Watson Mini";
  192. //
  193. // chkReports11
  194. //
  195. this.chkReports11.Location = new System.Drawing.Point(296, 480);
  196. this.chkReports11.Name = "chkReports11";
  197. this.chkReports11.Size = new System.Drawing.Size(128, 16);
  198. this.chkReports11.TabIndex = 58;
  199. this.chkReports11.Text = "Get StopCodes ADO RS";
  200. this.chkReports11.Visible = false;
  201. //
  202. // chkReports8
  203. //
  204. this.chkReports8.Location = new System.Drawing.Point(696, 304);
  205. this.chkReports8.Name = "chkReports8";
  206. this.chkReports8.Size = new System.Drawing.Size(128, 16);
  207. this.chkReports8.TabIndex = 57;
  208. this.chkReports8.Text = "General Solutions";
  209. //
  210. // chkReports10
  211. //
  212. this.chkReports10.Location = new System.Drawing.Point(296, 504);
  213. this.chkReports10.Name = "chkReports10";
  214. this.chkReports10.Size = new System.Drawing.Size(128, 16);
  215. this.chkReports10.TabIndex = 56;
  216. this.chkReports10.Text = "Get Daily ADO";
  217. this.chkReports10.Visible = false;
  218. //
  219. // chkReports9
  220. //
  221. this.chkReports9.Location = new System.Drawing.Point(696, 332);
  222. this.chkReports9.Name = "chkReports9";
  223. this.chkReports9.Size = new System.Drawing.Size(128, 16);
  224. this.chkReports9.TabIndex = 55;
  225. this.chkReports9.Text = "StopCode Count";
  226. //
  227. // chkReports7
  228. //
  229. this.chkReports7.Location = new System.Drawing.Point(696, 276);
  230. this.chkReports7.Name = "chkReports7";
  231. this.chkReports7.Size = new System.Drawing.Size(128, 16);
  232. this.chkReports7.TabIndex = 54;
  233. this.chkReports7.Text = "Specific Solutions";
  234. //
  235. // chkReports6
  236. //
  237. this.chkReports6.Location = new System.Drawing.Point(696, 248);
  238. this.chkReports6.Name = "chkReports6";
  239. this.chkReports6.Size = new System.Drawing.Size(128, 16);
  240. this.chkReports6.TabIndex = 53;
  241. this.chkReports6.Text = "Anon Uploads";
  242. this.chkReports6.CheckedChanged += new System.EventHandler(this.chkReports6_CheckedChanged);
  243. //
  244. // chkReports5
  245. //
  246. this.chkReports5.Location = new System.Drawing.Point(696, 388);
  247. this.chkReports5.Name = "chkReports5";
  248. this.chkReports5.Size = new System.Drawing.Size(128, 16);
  249. this.chkReports5.TabIndex = 52;
  250. this.chkReports5.Text = "Archive Count";
  251. //
  252. // chkReports4
  253. //
  254. this.chkReports4.Location = new System.Drawing.Point(696, 360);
  255. this.chkReports4.Name = "chkReports4";
  256. this.chkReports4.Size = new System.Drawing.Size(128, 16);
  257. this.chkReports4.TabIndex = 51;
  258. this.chkReports4.Text = "Watson Count";
  259. //
  260. // chkReports3
  261. //
  262. this.chkReports3.Location = new System.Drawing.Point(696, 220);
  263. this.chkReports3.Name = "chkReports3";
  264. this.chkReports3.Size = new System.Drawing.Size(128, 16);
  265. this.chkReports3.TabIndex = 50;
  266. this.chkReports3.Text = "Cutomer Count";
  267. this.chkReports3.CheckedChanged += new System.EventHandler(this.chkReports3_CheckedChanged);
  268. //
  269. // chkReports2
  270. //
  271. this.chkReports2.Location = new System.Drawing.Point(288, 488);
  272. this.chkReports2.Name = "chkReports2";
  273. this.chkReports2.Size = new System.Drawing.Size(128, 16);
  274. this.chkReports2.TabIndex = 49;
  275. this.chkReports2.Text = "Get Daily Plus 1";
  276. this.chkReports2.Visible = false;
  277. //
  278. // chkReports1
  279. //
  280. this.chkReports1.Location = new System.Drawing.Point(696, 192);
  281. this.chkReports1.Name = "chkReports1";
  282. this.chkReports1.Size = new System.Drawing.Size(128, 16);
  283. this.chkReports1.TabIndex = 48;
  284. this.chkReports1.Text = "Get Daily";
  285. this.chkReports1.CheckedChanged += new System.EventHandler(this.chkReports1_CheckedChanged);
  286. //
  287. // monthCalendar1
  288. //
  289. this.monthCalendar1.Location = new System.Drawing.Point(688, 24);
  290. this.monthCalendar1.Name = "monthCalendar1";
  291. this.monthCalendar1.TabIndex = 61;
  292. //
  293. // statusBar1
  294. //
  295. this.statusBar1.Location = new System.Drawing.Point(0, 559);
  296. this.statusBar1.Name = "statusBar1";
  297. this.statusBar1.Size = new System.Drawing.Size(896, 22);
  298. this.statusBar1.TabIndex = 63;
  299. //
  300. // progressBar1
  301. //
  302. this.progressBar1.Location = new System.Drawing.Point(504, 552);
  303. this.progressBar1.Name = "progressBar1";
  304. this.progressBar1.Size = new System.Drawing.Size(384, 23);
  305. this.progressBar1.TabIndex = 64;
  306. this.progressBar1.Visible = false;
  307. //
  308. // lblPurpose
  309. //
  310. this.lblPurpose.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  311. this.lblPurpose.Location = new System.Drawing.Point(16, 8);
  312. this.lblPurpose.Name = "lblPurpose";
  313. this.lblPurpose.Size = new System.Drawing.Size(112, 24);
  314. this.lblPurpose.TabIndex = 78;
  315. this.lblPurpose.Text = "Purpose";
  316. //
  317. // lblStatement
  318. //
  319. this.lblStatement.Location = new System.Drawing.Point(16, 40);
  320. this.lblStatement.Name = "lblStatement";
  321. this.lblStatement.Size = new System.Drawing.Size(632, 40);
  322. this.lblStatement.TabIndex = 77;
  323. this.lblStatement.Text = @"The purpose of the following report is to gauge the overall condition and status of the Windows Online Crash Analysis Web site. Through the use of SQL queries and file counts it should be possible to generate a high level understanding of Web site traffic, type of submissions and solution status";
  324. //
  325. // tabControl1
  326. //
  327. this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] {
  328. this.tabPage1,
  329. this.tabPage2,
  330. this.tabPage3});
  331. this.tabControl1.Location = new System.Drawing.Point(16, 96);
  332. this.tabControl1.Name = "tabControl1";
  333. this.tabControl1.SelectedIndex = 0;
  334. this.tabControl1.Size = new System.Drawing.Size(656, 432);
  335. this.tabControl1.TabIndex = 83;
  336. //
  337. // tabPage1
  338. //
  339. this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[] {
  340. this.axMSChart1});
  341. this.tabPage1.Location = new System.Drawing.Point(4, 22);
  342. this.tabPage1.Name = "tabPage1";
  343. this.tabPage1.Size = new System.Drawing.Size(648, 406);
  344. this.tabPage1.TabIndex = 0;
  345. this.tabPage1.Text = "Graphical";
  346. //
  347. // axMSChart1
  348. //
  349. this.axMSChart1.ContainingControl = this;
  350. this.axMSChart1.DataSource = null;
  351. this.axMSChart1.Location = new System.Drawing.Point(8, 8);
  352. this.axMSChart1.Name = "axMSChart1";
  353. this.axMSChart1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMSChart1.OcxState")));
  354. this.axMSChart1.Size = new System.Drawing.Size(632, 392);
  355. this.axMSChart1.TabIndex = 66;
  356. //
  357. // tabPage2
  358. //
  359. this.tabPage2.Controls.AddRange(new System.Windows.Forms.Control[] {
  360. this.lblAD,
  361. this.label14,
  362. this.lblWA,
  363. this.label13,
  364. this.lblArchiveMiniCount,
  365. this.lblWatsonMiniCount,
  366. this.lblArchiveCount,
  367. this.lblWatsonCount,
  368. this.lblStopCodeCount,
  369. this.label22,
  370. this.label23,
  371. this.label24,
  372. this.label25,
  373. this.label26,
  374. this.lblGeneralSolutions,
  375. this.lblSpecificCount,
  376. this.lblAnonymousCount,
  377. this.lblCustomerCount,
  378. this.lblDailyCount,
  379. this.label11,
  380. this.label10,
  381. this.label9,
  382. this.label8,
  383. this.label7});
  384. this.tabPage2.Location = new System.Drawing.Point(4, 22);
  385. this.tabPage2.Name = "tabPage2";
  386. this.tabPage2.Size = new System.Drawing.Size(648, 406);
  387. this.tabPage2.TabIndex = 1;
  388. this.tabPage2.Text = "Statistical";
  389. //
  390. // lblAD
  391. //
  392. this.lblAD.Location = new System.Drawing.Point(136, 296);
  393. this.lblAD.Name = "lblAD";
  394. this.lblAD.Size = new System.Drawing.Size(152, 16);
  395. this.lblAD.TabIndex = 23;
  396. //
  397. // label14
  398. //
  399. this.label14.Location = new System.Drawing.Point(24, 296);
  400. this.label14.Name = "label14";
  401. this.label14.Size = new System.Drawing.Size(104, 16);
  402. this.label14.TabIndex = 22;
  403. this.label14.Text = "A-D:";
  404. this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  405. //
  406. // lblWA
  407. //
  408. this.lblWA.Location = new System.Drawing.Point(136, 272);
  409. this.lblWA.Name = "lblWA";
  410. this.lblWA.Size = new System.Drawing.Size(152, 16);
  411. this.lblWA.TabIndex = 21;
  412. //
  413. // label13
  414. //
  415. this.label13.Location = new System.Drawing.Point(24, 272);
  416. this.label13.Name = "label13";
  417. this.label13.Size = new System.Drawing.Size(104, 16);
  418. this.label13.TabIndex = 20;
  419. this.label13.Text = "W-A:";
  420. this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  421. //
  422. // lblArchiveMiniCount
  423. //
  424. this.lblArchiveMiniCount.Location = new System.Drawing.Point(136, 248);
  425. this.lblArchiveMiniCount.Name = "lblArchiveMiniCount";
  426. this.lblArchiveMiniCount.Size = new System.Drawing.Size(152, 16);
  427. this.lblArchiveMiniCount.TabIndex = 19;
  428. //
  429. // lblWatsonMiniCount
  430. //
  431. this.lblWatsonMiniCount.Location = new System.Drawing.Point(136, 224);
  432. this.lblWatsonMiniCount.Name = "lblWatsonMiniCount";
  433. this.lblWatsonMiniCount.Size = new System.Drawing.Size(152, 16);
  434. this.lblWatsonMiniCount.TabIndex = 18;
  435. //
  436. // lblArchiveCount
  437. //
  438. this.lblArchiveCount.Location = new System.Drawing.Point(136, 200);
  439. this.lblArchiveCount.Name = "lblArchiveCount";
  440. this.lblArchiveCount.Size = new System.Drawing.Size(152, 16);
  441. this.lblArchiveCount.TabIndex = 17;
  442. //
  443. // lblWatsonCount
  444. //
  445. this.lblWatsonCount.Location = new System.Drawing.Point(136, 176);
  446. this.lblWatsonCount.Name = "lblWatsonCount";
  447. this.lblWatsonCount.Size = new System.Drawing.Size(152, 16);
  448. this.lblWatsonCount.TabIndex = 16;
  449. //
  450. // lblStopCodeCount
  451. //
  452. this.lblStopCodeCount.Location = new System.Drawing.Point(136, 152);
  453. this.lblStopCodeCount.Name = "lblStopCodeCount";
  454. this.lblStopCodeCount.Size = new System.Drawing.Size(152, 16);
  455. this.lblStopCodeCount.TabIndex = 15;
  456. //
  457. // label22
  458. //
  459. this.label22.Location = new System.Drawing.Point(24, 248);
  460. this.label22.Name = "label22";
  461. this.label22.Size = new System.Drawing.Size(104, 16);
  462. this.label22.TabIndex = 14;
  463. this.label22.Text = "Archive Mini Count";
  464. this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  465. //
  466. // label23
  467. //
  468. this.label23.Location = new System.Drawing.Point(24, 224);
  469. this.label23.Name = "label23";
  470. this.label23.Size = new System.Drawing.Size(104, 16);
  471. this.label23.TabIndex = 13;
  472. this.label23.Text = "Watson Mini Count";
  473. this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  474. //
  475. // label24
  476. //
  477. this.label24.Location = new System.Drawing.Point(24, 200);
  478. this.label24.Name = "label24";
  479. this.label24.Size = new System.Drawing.Size(104, 16);
  480. this.label24.TabIndex = 12;
  481. this.label24.Text = "Archive Count";
  482. this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  483. //
  484. // label25
  485. //
  486. this.label25.Location = new System.Drawing.Point(24, 176);
  487. this.label25.Name = "label25";
  488. this.label25.Size = new System.Drawing.Size(104, 16);
  489. this.label25.TabIndex = 11;
  490. this.label25.Text = "Watson Count";
  491. this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  492. //
  493. // label26
  494. //
  495. this.label26.Location = new System.Drawing.Point(24, 152);
  496. this.label26.Name = "label26";
  497. this.label26.Size = new System.Drawing.Size(104, 16);
  498. this.label26.TabIndex = 10;
  499. this.label26.Text = "StopCode Count:";
  500. this.label26.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  501. //
  502. // lblGeneralSolutions
  503. //
  504. this.lblGeneralSolutions.Location = new System.Drawing.Point(136, 128);
  505. this.lblGeneralSolutions.Name = "lblGeneralSolutions";
  506. this.lblGeneralSolutions.Size = new System.Drawing.Size(152, 16);
  507. this.lblGeneralSolutions.TabIndex = 9;
  508. //
  509. // lblSpecificCount
  510. //
  511. this.lblSpecificCount.Location = new System.Drawing.Point(136, 104);
  512. this.lblSpecificCount.Name = "lblSpecificCount";
  513. this.lblSpecificCount.Size = new System.Drawing.Size(152, 16);
  514. this.lblSpecificCount.TabIndex = 8;
  515. //
  516. // lblAnonymousCount
  517. //
  518. this.lblAnonymousCount.Location = new System.Drawing.Point(136, 80);
  519. this.lblAnonymousCount.Name = "lblAnonymousCount";
  520. this.lblAnonymousCount.Size = new System.Drawing.Size(152, 16);
  521. this.lblAnonymousCount.TabIndex = 7;
  522. //
  523. // lblCustomerCount
  524. //
  525. this.lblCustomerCount.Location = new System.Drawing.Point(136, 56);
  526. this.lblCustomerCount.Name = "lblCustomerCount";
  527. this.lblCustomerCount.Size = new System.Drawing.Size(152, 16);
  528. this.lblCustomerCount.TabIndex = 6;
  529. //
  530. // lblDailyCount
  531. //
  532. this.lblDailyCount.Location = new System.Drawing.Point(136, 32);
  533. this.lblDailyCount.Name = "lblDailyCount";
  534. this.lblDailyCount.Size = new System.Drawing.Size(152, 16);
  535. this.lblDailyCount.TabIndex = 5;
  536. //
  537. // label11
  538. //
  539. this.label11.Location = new System.Drawing.Point(24, 128);
  540. this.label11.Name = "label11";
  541. this.label11.Size = new System.Drawing.Size(104, 16);
  542. this.label11.TabIndex = 4;
  543. this.label11.Text = "General Solutions:";
  544. this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  545. //
  546. // label10
  547. //
  548. this.label10.Location = new System.Drawing.Point(24, 104);
  549. this.label10.Name = "label10";
  550. this.label10.Size = new System.Drawing.Size(104, 16);
  551. this.label10.TabIndex = 3;
  552. this.label10.Text = "Specific Solutions:";
  553. this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  554. //
  555. // label9
  556. //
  557. this.label9.Location = new System.Drawing.Point(24, 80);
  558. this.label9.Name = "label9";
  559. this.label9.Size = new System.Drawing.Size(104, 16);
  560. this.label9.TabIndex = 2;
  561. this.label9.Text = "Anonymous Count:";
  562. this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  563. //
  564. // label8
  565. //
  566. this.label8.Location = new System.Drawing.Point(24, 56);
  567. this.label8.Name = "label8";
  568. this.label8.Size = new System.Drawing.Size(104, 16);
  569. this.label8.TabIndex = 1;
  570. this.label8.Text = "Customer Count:";
  571. this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  572. //
  573. // label7
  574. //
  575. this.label7.Location = new System.Drawing.Point(24, 32);
  576. this.label7.Name = "label7";
  577. this.label7.Size = new System.Drawing.Size(104, 16);
  578. this.label7.TabIndex = 0;
  579. this.label7.Text = "Daily File Count:";
  580. this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  581. //
  582. // tabPage3
  583. //
  584. this.tabPage3.Controls.AddRange(new System.Windows.Forms.Control[] {
  585. this.label5,
  586. this.label6,
  587. this.label4,
  588. this.label3});
  589. this.tabPage3.Location = new System.Drawing.Point(4, 22);
  590. this.tabPage3.Name = "tabPage3";
  591. this.tabPage3.Size = new System.Drawing.Size(648, 406);
  592. this.tabPage3.TabIndex = 2;
  593. this.tabPage3.Text = "Notes";
  594. //
  595. // label5
  596. //
  597. this.label5.Location = new System.Drawing.Point(8, 120);
  598. this.label5.Name = "label5";
  599. this.label5.Size = new System.Drawing.Size(632, 40);
  600. this.label5.TabIndex = 86;
  601. this.label5.Text = "The data contained with the table below describes the files which were uploaded f" +
  602. "or each respective server and the entries made by the Online Crash Analysis Web " +
  603. "Site.";
  604. //
  605. // label6
  606. //
  607. this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  608. this.label6.Location = new System.Drawing.Point(8, 88);
  609. this.label6.Name = "label6";
  610. this.label6.Size = new System.Drawing.Size(240, 24);
  611. this.label6.TabIndex = 85;
  612. this.label6.Text = "Upload File";
  613. //
  614. // label4
  615. //
  616. this.label4.Location = new System.Drawing.Point(8, 40);
  617. this.label4.Name = "label4";
  618. this.label4.Size = new System.Drawing.Size(632, 40);
  619. this.label4.TabIndex = 84;
  620. this.label4.Text = "The data below has been compiled for a one week period and is formatted into sepa" +
  621. "rate tables for readability and general understanding of how the data was graphe" +
  622. "d.";
  623. //
  624. // label3
  625. //
  626. this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  627. this.label3.Location = new System.Drawing.Point(8, 16);
  628. this.label3.Name = "label3";
  629. this.label3.Size = new System.Drawing.Size(240, 24);
  630. this.label3.TabIndex = 83;
  631. this.label3.Text = "Site Data";
  632. //
  633. // chkSelectAll
  634. //
  635. this.chkSelectAll.Location = new System.Drawing.Point(696, 472);
  636. this.chkSelectAll.Name = "chkSelectAll";
  637. this.chkSelectAll.Size = new System.Drawing.Size(128, 16);
  638. this.chkSelectAll.TabIndex = 84;
  639. this.chkSelectAll.Text = "Select All";
  640. this.chkSelectAll.CheckedChanged += new System.EventHandler(this.chkSelectAll_CheckedChanged);
  641. //
  642. // frmDaily
  643. //
  644. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  645. this.ClientSize = new System.Drawing.Size(896, 581);
  646. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  647. this.chkSelectAll,
  648. this.progressBar1,
  649. this.tabControl1,
  650. this.lblPurpose,
  651. this.lblStatement,
  652. this.statusBar1,
  653. this.monthCalendar1,
  654. this.chkReports13,
  655. this.chkReports12,
  656. this.chkReports11,
  657. this.chkReports8,
  658. this.chkReports10,
  659. this.chkReports9,
  660. this.chkReports7,
  661. this.chkReports6,
  662. this.chkReports5,
  663. this.chkReports4,
  664. this.chkReports3,
  665. this.chkReports2,
  666. this.chkReports1});
  667. this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  668. this.Name = "frmDaily";
  669. this.Text = "Executive Summary Daily Report";
  670. this.Resize += new System.EventHandler(this.frmDaily_Resize);
  671. this.Closing += new System.ComponentModel.CancelEventHandler(this.frmDaily_Closing);
  672. this.Load += new System.EventHandler(this.frmDaily_Load);
  673. this.tabControl1.ResumeLayout(false);
  674. this.tabPage1.ResumeLayout(false);
  675. ((System.ComponentModel.ISupportInitialize)(this.axMSChart1)).EndInit();
  676. this.tabPage2.ResumeLayout(false);
  677. this.tabPage3.ResumeLayout(false);
  678. this.ResumeLayout(false);
  679. }
  680. #endregion
  681. /*************************************************************************************
  682. * module: frmDaily.cs - cmdGetData_Click
  683. *
  684. * author: Tim Ragain
  685. * date: Jan 22, 2002
  686. *
  687. * Purpose: Executes code depending on which checkboxes were selected. Initializes
  688. * any threads. Appropriately sets the legend of the calendar control,
  689. * initializes the progress bar, disables the cmdGetData button. Initializes each
  690. * column on the calendar to the appropriated days. New ThreadStart delegate is created
  691. * and each delegate is set to the appropriate day from the end date. All threads are then
  692. * started.
  693. *************************************************************************************/
  694. public void GetData()
  695. {
  696. int y = 0;
  697. long lngCount = 0, lngCount2 = 0, lngCount3 = 0;
  698. long l_AnonUploads = 0;
  699. long l_WatsonCount = 0, l_ArchiveCount = 0, l_ArchiveSQL = 0;
  700. long l_WatsonArchive = 0, l_WatsonMini = 0, l_ArchiveMini = 0;
  701. short rowCount = 0;
  702. short iCount = 0;
  703. string strArchive, strWatson;
  704. OCAData.CCountDailyClass rpt = new OCAData.CCountDailyClass();
  705. RegistryKey regArchive = Registry.CurrentUser.OpenSubKey("software").OpenSubKey("microsoft", true).CreateSubKey("OCATools").CreateSubKey("OCAReports").CreateSubKey("Archive");
  706. RegistryKey regWatson = Registry.CurrentUser.OpenSubKey("software").OpenSubKey("microsoft", true).CreateSubKey("OCATools").CreateSubKey("OCAReports").CreateSubKey("Watson");
  707. System.DateTime dDate = new System.DateTime(monthCalendar1.SelectionStart.Year, monthCalendar1.SelectionStart.Month,
  708. monthCalendar1.SelectionStart.Day);
  709. progressBar1.Minimum = 0;
  710. progressBar1.Maximum = 16;
  711. progressBar1.Value = 0;
  712. progressBar1.Visible = true;
  713. progressBar1.Value = progressBar1.Value + 1;
  714. progressBar1.Refresh();
  715. this.Refresh();
  716. //11111111111111111111111111111111111111111
  717. if(chkReports1.Checked == true)
  718. {
  719. iCount++;
  720. rowCount++;
  721. statusBar1.Text = "Getting Daily Count for " + dDate.Date.ToString();
  722. lngCount = rpt.GetDailyCount(dDate);
  723. axMSChart1.RowCount = rowCount;
  724. axMSChart1.Row = iCount;
  725. axMSChart1.RowLabel = "Daily";
  726. axMSChart1.Data = lngCount.ToString();
  727. lblDailyCount.Text = lngCount.ToString();
  728. }
  729. progressBar1.Value = progressBar1.Value + 1;
  730. progressBar1.Refresh();
  731. this.Refresh();
  732. //222222222222222222222222222222222222222222
  733. if(chkReports2.Checked == true)
  734. {
  735. iCount++;
  736. rowCount++;
  737. statusBar1.Text = "Getting Daily Count for " + dDate.AddDays(-1).Date.ToString();
  738. lngCount2 = rpt.GetDailyCount(dDate);
  739. axMSChart1.RowCount = rowCount;
  740. axMSChart1.Row = iCount;
  741. axMSChart1.RowLabel = dDate.Date.ToString();
  742. axMSChart1.Data = lngCount2.ToString();
  743. }
  744. //**************************************************************
  745. progressBar1.Value = progressBar1.Value + 1;
  746. progressBar1.Refresh();
  747. this.Refresh();
  748. //3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
  749. //'6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
  750. if(chkReports6.Checked == true)
  751. {
  752. iCount++;
  753. rowCount++;
  754. statusBar1.Text = "Getting Anon Users for " + dDate.Date.ToString();
  755. l_AnonUploads = rpt.GetDailyAnon(dDate);
  756. axMSChart1.RowCount = rowCount;
  757. axMSChart1.Row = iCount;
  758. axMSChart1.RowLabel = "Anon"; //+ dDate.Date.ToString();
  759. axMSChart1.Data = l_AnonUploads.ToString();
  760. lblAnonymousCount.Text = l_AnonUploads.ToString();
  761. }
  762. progressBar1.Value = progressBar1.Value + 1;
  763. progressBar1.Refresh();
  764. this.Refresh();
  765. if(chkReports3.Checked == true)
  766. {
  767. iCount++;
  768. rowCount++;
  769. statusBar1.Text = "Calculating Customer Count for " + dDate.Date.ToString();
  770. if(l_AnonUploads > lngCount)
  771. {
  772. lngCount = l_AnonUploads - lngCount;
  773. }
  774. else
  775. {
  776. lngCount = lngCount - l_AnonUploads;
  777. }
  778. axMSChart1.RowCount = rowCount;
  779. axMSChart1.Row = iCount;
  780. axMSChart1.RowLabel = "Cust"; //& dDate.Date.ToString();
  781. axMSChart1.Data = lngCount.ToString();
  782. lblCustomerCount.Text = lngCount.ToString();
  783. }
  784. progressBar1.Value = progressBar1.Value + 1;
  785. progressBar1.Refresh();
  786. this.Refresh();
  787. //10 10 10 10 10 10 10 10 10
  788. if(chkReports10.Checked == true)
  789. {
  790. iCount++;
  791. rowCount++;
  792. statusBar1.Text = "Getting Daily Count for " + dDate.Date.ToString() + " through ADO";
  793. lngCount3 = rpt.GetDailyCountADO(dDate);
  794. axMSChart1.RowCount = rowCount;
  795. axMSChart1.Row = iCount;
  796. axMSChart1.RowLabel = dDate.AddDays(-1).Date.ToString();
  797. axMSChart1.Data = lngCount3.ToString();
  798. }
  799. progressBar1.Value = progressBar1.Value + 1;
  800. progressBar1.Refresh();
  801. this.Refresh();
  802. //'4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
  803. if(chkReports4.Checked == true)
  804. {
  805. iCount++;
  806. rowCount++;
  807. statusBar1.Text = "Getting Watson file count for " + dDate.Date.ToString();
  808. #if(FILE_SERVER)
  809. // l_WatsonCount = rpt.GetFileCount(OCAData.ServerLocation.Watson, "Z:\\\\", dDate);
  810. for(y = 0;y < 10; y++)
  811. {
  812. if(regWatson.GetValue("Loc" + y.ToString()).ToString().Length > 0)
  813. {
  814. strWatson = regWatson.GetValue("Loc" + y.ToString()).ToString();
  815. l_WatsonCount = rpt.GetFileCount(OCAData.ServerLocation.Watson, strWatson, dDate);
  816. if(l_WatsonCount > 0)
  817. {
  818. y = 10;
  819. }
  820. }
  821. else
  822. {
  823. l_WatsonCount = 0;
  824. }
  825. }
  826. #elif(FILE_LOCAL)
  827. l_WatsonCount = rpt.GetFileCount(OCAData.ServerLocation.Watson, "C:\\\\MiniDumps\\Watson\\", dDate);
  828. #endif
  829. axMSChart1.RowCount = rowCount;
  830. axMSChart1.Row = iCount;
  831. axMSChart1.RowLabel = "Watson";
  832. axMSChart1.Data = l_WatsonCount.ToString();
  833. lblWatsonCount.Text = l_WatsonCount.ToString();
  834. }
  835. progressBar1.Value = progressBar1.Value + 1;
  836. progressBar1.Refresh();
  837. this.Refresh();
  838. //'5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
  839. if(chkReports5.Checked == true)
  840. {
  841. iCount++;
  842. rowCount++;
  843. statusBar1.Text = "Getting Archive file count for " + dDate.Date.ToString();
  844. #if(FILE_SERVER)
  845. // l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, "Y:\\\\", dDate);
  846. try
  847. {
  848. for(y = 0;y < 10; y++)
  849. {
  850. if(regArchive.GetValue("Loc" + y.ToString()).ToString().Length > 0)
  851. {
  852. strArchive = regArchive.GetValue("Loc" + y.ToString()).ToString();
  853. l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, strArchive, dDate);
  854. if(l_ArchiveCount > 0)
  855. {
  856. y = 10;
  857. }
  858. }
  859. else
  860. {
  861. l_ArchiveCount = 0;
  862. }
  863. }
  864. //l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, "Y:\\", dDate.AddDays(x));
  865. }
  866. catch
  867. {
  868. l_ArchiveCount = 0;
  869. }
  870. #elif(FILE_LOCAL)
  871. l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, "C:\\\\MiniDumps\\Archive\\", dDate);
  872. #endif
  873. // if(l_ArchiveCount == 0)
  874. // {
  875. //#if(FILE_SERVER)
  876. // l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, "X:\\\\", dDate);
  877. //#elif(FILE_LOCAL)
  878. // l_ArchiveCount = rpt.GetFileCount(OCAData.ServerLocation.Archive, "C:\\\\MiniDumps\\Archive\\", dDate);
  879. //#endif
  880. // }
  881. axMSChart1.RowCount = rowCount;
  882. axMSChart1.Row = iCount;
  883. axMSChart1.RowLabel = "Archive";
  884. axMSChart1.Data = l_ArchiveCount.ToString();
  885. lblArchiveCount.Text = l_ArchiveCount.ToString();
  886. }
  887. progressBar1.Value = progressBar1.Value + 1;
  888. progressBar1.Refresh();
  889. this.Refresh();
  890. //'5 1 5 1 5 1 5 1 5 1 5 1
  891. if(chkReports5.Checked == true && chkReports1.Checked == true)
  892. {
  893. iCount++;
  894. rowCount++;
  895. if(l_ArchiveCount > lngCount)
  896. {
  897. l_ArchiveSQL = l_ArchiveCount - lngCount;
  898. }
  899. else
  900. {
  901. l_ArchiveSQL = lngCount - l_ArchiveCount;
  902. }
  903. axMSChart1.RowCount = rowCount;
  904. axMSChart1.Row = iCount;
  905. axMSChart1.RowLabel = "A - D";
  906. axMSChart1.Data = l_ArchiveSQL.ToString();
  907. lblAD.Text = l_ArchiveSQL.ToString();
  908. }
  909. progressBar1.Value = progressBar1.Value + 1;
  910. progressBar1.Refresh();
  911. this.Refresh();
  912. //'5 4 5 4 5 4 5 4 5 4 5 4
  913. if(chkReports5.Checked == true && chkReports4.Checked == true)
  914. {
  915. iCount++;
  916. rowCount++;
  917. if(l_WatsonCount > l_ArchiveCount)
  918. {
  919. l_WatsonArchive = l_WatsonCount - l_ArchiveCount;
  920. }
  921. else
  922. {
  923. l_WatsonArchive = l_ArchiveCount - l_WatsonArchive;
  924. }
  925. axMSChart1.RowCount = rowCount;
  926. axMSChart1.Row = iCount;
  927. axMSChart1.RowLabel = "W - A";
  928. axMSChart1.Data = l_WatsonArchive.ToString();
  929. lblWA.Text = l_WatsonArchive.ToString();
  930. }
  931. progressBar1.Value = progressBar1.Value + 1;
  932. progressBar1.Refresh();
  933. this.Refresh();
  934. //12 12 12 12 12 12 12 12 12 12 12 12 12
  935. if(chkReports12.Checked == true)
  936. {
  937. iCount++;
  938. rowCount++;
  939. #if(FILE_SERVER)
  940. l_WatsonMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Watson, "Z:\\", dDate);
  941. #elif(FILE_LOCAL)
  942. l_WatsonMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Watson, "C:\\\\MiniDumps\\Watson\\", dDate);
  943. #endif
  944. axMSChart1.RowCount = rowCount;
  945. axMSChart1.Row = iCount;
  946. axMSChart1.RowLabel = "W Mini";
  947. axMSChart1.Data = l_WatsonMini.ToString();
  948. lblWatsonMiniCount.Text = l_WatsonMini.ToString();
  949. }
  950. progressBar1.Value = progressBar1.Value + 1;
  951. progressBar1.Refresh();
  952. this.Refresh();
  953. //13 13 13 13 13 13 13 13 13 13 13 13 13
  954. if(chkReports13.Checked == true)
  955. {
  956. iCount++;
  957. rowCount++;
  958. #if(FILE_SERVER)
  959. l_ArchiveMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Archive, "Y:\\", dDate);
  960. #elif(FILE_LOCAL)
  961. l_WatsonMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Archive, "C:\\\\MiniDumps\\Archive\\", dDate);
  962. #endif
  963. if(l_ArchiveMini == 0)
  964. {
  965. #if(FILE_SERVER)
  966. l_ArchiveMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Archive, "X:\\", dDate);
  967. #elif(FILE_LOCAL)
  968. l_WatsonMini = rpt.GetFileMiniCount(OCAData.ServerLocation.Archive, "C:\\\\MiniDumps\\Archive\\", dDate);
  969. #endif
  970. }
  971. axMSChart1.RowCount = rowCount;
  972. axMSChart1.Row = iCount;
  973. axMSChart1.RowLabel = "A Mini";
  974. axMSChart1.Data = l_ArchiveMini.ToString();
  975. lblArchiveMiniCount.Text = l_ArchiveMini.ToString();
  976. }
  977. //'7 7 7 7 7 7 7 7 7 7 7 7 7 7
  978. if(chkReports7.Checked == true)
  979. {
  980. iCount++;
  981. rowCount++;
  982. statusBar1.Text = "Getting Specific Solutions Count for " + dDate.Date.ToString();
  983. ThreadStart s_StartSBucket = new ThreadStart(this.GetSBuckets);
  984. t_ThreadSBucket = new Thread(s_StartSBucket);
  985. t_ThreadSBucket.Name = "Thread One";
  986. t_ThreadSBucket.Start();
  987. }
  988. //'8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
  989. if(chkReports8.Checked == true)
  990. {
  991. iCount++;
  992. rowCount++;
  993. statusBar1.Text = "Getting General Solutions Count for " + dDate.Date.ToString();
  994. ThreadStart t_StartGBucket = new ThreadStart(this.GetGBuckets);
  995. t_ThreadGBucket = new Thread(t_StartGBucket);
  996. t_ThreadGBucket.Name = "Thread Two";
  997. t_ThreadGBucket.Start();
  998. }
  999. progressBar1.Value = progressBar1.Value + 1;
  1000. progressBar1.Refresh();
  1001. this.Refresh();
  1002. // '9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
  1003. if(chkReports9.Checked == true)
  1004. {
  1005. iCount++;
  1006. rowCount++;
  1007. statusBar1.Text = "Getting StopCode Solutions Count for " + dDate.Date.ToString();
  1008. ThreadStart t_StartStopCode = new ThreadStart(this.GetStopCode);
  1009. t_ThreadStopCode = new Thread(t_StartStopCode);
  1010. t_ThreadStopCode.Name = "Thread Three";
  1011. t_ThreadStopCode.Start();
  1012. }
  1013. progressBar1.Value = progressBar1.Value + 1;
  1014. progressBar1.Refresh();
  1015. this.Refresh();
  1016. //**************************************************************************
  1017. axMSChart1.Refresh();
  1018. progressBar1.Visible = false;
  1019. statusBar1.Text = "Done";
  1020. this.ParentForm.Refresh();
  1021. }
  1022. private void GetStopCode()
  1023. {
  1024. long l_StopCodeReports = 0;
  1025. OCAData.CCountDailyClass rpt = new OCAData.CCountDailyClass();
  1026. System.DateTime dDate = new System.DateTime(monthCalendar1.SelectionStart.Year, monthCalendar1.SelectionStart.Month,
  1027. monthCalendar1.SelectionStart.Day);
  1028. l_StopCodeReports = rpt.GetStopCodeSolutions(dDate);
  1029. if(t_ThreadGBucket != null)
  1030. {
  1031. if(t_ThreadGBucket.IsAlive == true)
  1032. {
  1033. t_ThreadGBucket.Suspend();
  1034. }
  1035. }
  1036. if(t_ThreadSBucket != null)
  1037. {
  1038. if(t_ThreadSBucket.IsAlive == true)
  1039. {
  1040. t_ThreadSBucket.Suspend();
  1041. }
  1042. }
  1043. lock(this)
  1044. {
  1045. axMSChart1.RowCount = (short)(axMSChart1.RowCount + 1);
  1046. axMSChart1.Row = (short)(axMSChart1.Row + 1);
  1047. axMSChart1.RowLabel = "Stop Code";
  1048. axMSChart1.Data = l_StopCodeReports.ToString();
  1049. lblStopCodeCount.Text = l_StopCodeReports.ToString();
  1050. progressBar1.Value = progressBar1.Value + 1;
  1051. progressBar1.Refresh();
  1052. this.Refresh();
  1053. }
  1054. if(t_ThreadGBucket != null)
  1055. {
  1056. if(t_ThreadGBucket.IsAlive == true)
  1057. {
  1058. t_ThreadGBucket.Resume();
  1059. }
  1060. }
  1061. if(t_ThreadSBucket != null)
  1062. {
  1063. if(t_ThreadSBucket.IsAlive == true)
  1064. {
  1065. t_ThreadSBucket.Resume();
  1066. }
  1067. }
  1068. }
  1069. private void GetGBuckets()
  1070. {
  1071. long l_SpecificReports = 0;
  1072. OCAData.CCountDailyClass rpt = new OCAData.CCountDailyClass();
  1073. System.DateTime dDate = new System.DateTime(monthCalendar1.SelectionStart.Year, monthCalendar1.SelectionStart.Month,
  1074. monthCalendar1.SelectionStart.Day);
  1075. l_SpecificReports = rpt.GetGeneralSolutions(dDate);
  1076. if(t_ThreadStopCode != null)
  1077. {
  1078. if(t_ThreadStopCode.IsAlive == true)
  1079. {
  1080. t_ThreadStopCode.Suspend();
  1081. }
  1082. }
  1083. if(t_ThreadSBucket != null)
  1084. {
  1085. if(t_ThreadSBucket.IsAlive == true)
  1086. {
  1087. t_ThreadSBucket.Suspend();
  1088. }
  1089. }
  1090. lock(this)
  1091. {
  1092. axMSChart1.RowCount = (short)(axMSChart1.RowCount + 1);
  1093. axMSChart1.Row = (short)(axMSChart1.Row + 1);
  1094. axMSChart1.RowLabel = "General";
  1095. axMSChart1.Data = l_SpecificReports.ToString();
  1096. lblGeneralSolutions.Text = l_SpecificReports.ToString();
  1097. progressBar1.Value = progressBar1.Value + 1;
  1098. progressBar1.Refresh();
  1099. this.Refresh();
  1100. }
  1101. if(t_ThreadStopCode != null)
  1102. {
  1103. if(t_ThreadStopCode.IsAlive == true)
  1104. {
  1105. t_ThreadStopCode.Resume();
  1106. }
  1107. }
  1108. if(t_ThreadSBucket != null)
  1109. {
  1110. if(t_ThreadSBucket.IsAlive == true)
  1111. {
  1112. t_ThreadSBucket.Resume();
  1113. }
  1114. }
  1115. }
  1116. private void GetSBuckets()
  1117. {
  1118. long l_SpecificReports = 0;
  1119. OCAData.CCountDailyClass rpt = new OCAData.CCountDailyClass();
  1120. System.DateTime dDate = new System.DateTime(monthCalendar1.SelectionStart.Year, monthCalendar1.SelectionStart.Month,
  1121. monthCalendar1.SelectionStart.Day);
  1122. l_SpecificReports = rpt.GetSpecificSolutions(dDate);
  1123. if(t_ThreadGBucket != null)
  1124. {
  1125. if(t_ThreadGBucket.IsAlive == true)
  1126. {
  1127. t_ThreadGBucket.Suspend();
  1128. }
  1129. }
  1130. if(t_ThreadStopCode != null)
  1131. {
  1132. if(t_ThreadStopCode.IsAlive == true)
  1133. {
  1134. t_ThreadStopCode.Suspend();
  1135. }
  1136. }
  1137. lock(this)
  1138. {
  1139. axMSChart1.RowCount = (short)(axMSChart1.RowCount + 1);
  1140. axMSChart1.Row = (short)(axMSChart1.Row + 1);
  1141. axMSChart1.RowLabel = "Specific";
  1142. axMSChart1.Data = l_SpecificReports.ToString();
  1143. lblSpecificCount.Text = l_SpecificReports.ToString();
  1144. progressBar1.Value = progressBar1.Value + 1;
  1145. progressBar1.Refresh();
  1146. this.Refresh();
  1147. }
  1148. if(t_ThreadGBucket != null)
  1149. {
  1150. if(t_ThreadGBucket.IsAlive == true)
  1151. {
  1152. t_ThreadGBucket.Resume();
  1153. }
  1154. }
  1155. if(t_ThreadStopCode != null)
  1156. {
  1157. if(t_ThreadStopCode.IsAlive == true)
  1158. {
  1159. t_ThreadStopCode.Resume();
  1160. }
  1161. }
  1162. }
  1163. private void UpdateStatus()
  1164. {
  1165. progressBar1.Value = progressBar1.Value + 1;
  1166. axMSChart1.Refresh();
  1167. progressBar1.Refresh();
  1168. if(progressBar1.Value >= 28)
  1169. {
  1170. statusBar1.Text = "Done";
  1171. progressBar1.Visible = false;
  1172. // cmdGetData.Enabled = true;
  1173. }
  1174. }
  1175. private void frmDaily_Load(object sender, System.EventArgs e)
  1176. {
  1177. DateTime dDate = DateTime.Today;
  1178. monthCalendar1.SelectionEnd = dDate.AddDays(-1);
  1179. this.ParentForm.Refresh();
  1180. }
  1181. private void chkReports6_CheckedChanged(object sender, System.EventArgs e)
  1182. {
  1183. if(chkReports6.Checked == false)
  1184. {
  1185. chkReports3.Checked = false;
  1186. }
  1187. }
  1188. private void chkReports1_CheckedChanged(object sender, System.EventArgs e)
  1189. {
  1190. if(chkReports1.Checked == false)
  1191. {
  1192. chkReports3.Checked = false;
  1193. }
  1194. }
  1195. private void chkReports3_CheckedChanged(object sender, System.EventArgs e)
  1196. {
  1197. if(chkReports3.Checked == true)
  1198. {
  1199. chkReports6.Checked = true;
  1200. chkReports1.Checked = true;
  1201. }
  1202. }
  1203. /*************************************************************************************
  1204. * module: frmDaily.cs - frmDaily_Resize
  1205. *
  1206. * author: Tim Ragain
  1207. * date: Jan 22, 2002
  1208. *
  1209. * Purpose: Adjust the controls and graph if the form is resized.
  1210. *
  1211. *
  1212. *************************************************************************************/
  1213. private void frmDaily_Resize(object sender, System.EventArgs e)
  1214. {
  1215. int buf = 20;
  1216. progressBar1.Top = statusBar1.Top;
  1217. progressBar1.Left = this.Width - progressBar1.Width;
  1218. monthCalendar1.Left = this.Width - (monthCalendar1.Width + buf);
  1219. // cmdGetData.Left = monthCalendar1.Left;
  1220. tabControl1.Width = this.Width - (monthCalendar1.Width + (buf * 3));
  1221. tabControl1.Height = this.Height - (statusBar1.Height + lblPurpose.Height + lblStatement.Height + (buf * 4));
  1222. axMSChart1.Height = tabPage1.Height - buf;
  1223. axMSChart1.Width = tabPage1.Width - buf;
  1224. chkReports1.Left = monthCalendar1.Left;
  1225. chkReports3.Left = monthCalendar1.Left;
  1226. chkReports6.Left = monthCalendar1.Left;
  1227. chkReports7.Left = monthCalendar1.Left;
  1228. chkReports8.Left = monthCalendar1.Left;
  1229. chkReports9.Left = monthCalendar1.Left;
  1230. chkReports4.Left = monthCalendar1.Left;
  1231. chkReports5.Left = monthCalendar1.Left;
  1232. chkReports12.Left = monthCalendar1.Left;
  1233. chkReports13.Left = monthCalendar1.Left;
  1234. }
  1235. /*************************************************************************************
  1236. * module: frmDaily.cs - frmDaily_Closing
  1237. *
  1238. * author: Tim Ragain
  1239. * date: Jan 22, 2002
  1240. *
  1241. * Purpose: If any threads are still alive meaning the user prematurely closes the form
  1242. * before all threads are returned then the threads are checked to see if they are still
  1243. * running and if so then the thread is aborted.
  1244. *************************************************************************************/
  1245. private void frmDaily_Closing(object sender, System.ComponentModel.CancelEventArgs e)
  1246. {
  1247. if(t_ThreadSBucket != null)
  1248. {
  1249. if(t_ThreadSBucket.IsAlive)
  1250. {
  1251. t_ThreadSBucket.Abort();
  1252. }
  1253. }
  1254. if(t_ThreadGBucket != null)
  1255. {
  1256. if(t_ThreadGBucket.IsAlive)
  1257. {
  1258. t_ThreadGBucket.Abort();
  1259. }
  1260. }
  1261. if(t_ThreadStopCode != null)
  1262. {
  1263. if(t_ThreadStopCode.IsAlive)
  1264. {
  1265. t_ThreadStopCode.Abort();
  1266. }
  1267. }
  1268. }
  1269. private void chkSelectAll_CheckedChanged(object sender, System.EventArgs e)
  1270. {
  1271. if(chkSelectAll.Checked == true)
  1272. {
  1273. chkReports1.Checked = true;
  1274. chkReports3.Checked = true;
  1275. chkReports6.Checked = true;
  1276. chkReports7.Checked = true;
  1277. chkReports8.Checked = true;
  1278. chkReports9.Checked = true;
  1279. chkReports4.Checked = true;
  1280. chkReports5.Checked = true;
  1281. chkReports12.Checked = true;
  1282. chkReports13.Checked = true;
  1283. }
  1284. else
  1285. {
  1286. chkReports1.Checked = false;
  1287. chkReports3.Checked = false;
  1288. chkReports6.Checked = false;
  1289. chkReports7.Checked = false;
  1290. chkReports8.Checked = false;
  1291. chkReports9.Checked = false;
  1292. chkReports4.Checked = false;
  1293. chkReports5.Checked = false;
  1294. chkReports12.Checked = false;
  1295. chkReports13.Checked = false;
  1296. }
  1297. }
  1298. }
  1299. }