Changeset 1731 for Scheduling/trunk/cs/bsdx0200GUISourceCode/DManagement.cs
- Timestamp:
- Apr 28, 2016, 9:49:25 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/DManagement.cs
r1513 r1731 112 112 private System.Windows.Forms.Label lblWorkstations; 113 113 private System.Windows.Forms.DataGrid grdWorkStations; 114 private System.Windows.Forms.TextBox txtSendMessage; 114 private TabPage tpConfiguration; 115 private CheckBox chkEventPolling; 116 private Label lblEventPollInterval; 117 private NumericUpDown nudEventPolling; 118 private System.Windows.Forms.TextBox txtSendMessage; 115 119 116 120 #endregion Fields … … 385 389 cboBSDXClinic.ValueMember = "RESOURCEID"; 386 390 387 } 391 string result = docManager.RemoteSession.TransmitRPC("VEFA GET BMX POLL INTERVAL", ""); 392 if (result.Split('^')[0] == "1") 393 { 394 chkEventPolling.Checked = true; 395 nudEventPolling.Enabled = true; 396 nudEventPolling.Value = Convert.ToInt32(result.Split('^')[1]); 397 } 398 } 388 399 389 400 private void DManagement_Load(object sender, System.EventArgs e) 390 401 { 391 402 this.cmdChangeResource.Enabled = false; 392 403 this.cmdRemoveUser.Enabled = false; 393 404 //Select the grid's zeroeth row … … 514 525 this.cmdWorkStationsShutdown = new System.Windows.Forms.Button(); 515 526 this.cmdWorkStationsRefresh = new System.Windows.Forms.Button(); 527 this.tpConfiguration = new System.Windows.Forms.TabPage(); 528 this.nudEventPolling = new System.Windows.Forms.NumericUpDown(); 529 this.lblEventPollInterval = new System.Windows.Forms.Label(); 530 this.chkEventPolling = new System.Windows.Forms.CheckBox(); 516 531 this.pnlPageBottom.SuspendLayout(); 517 532 this.tabMain.SuspendLayout(); … … 546 561 this.groupBox1.SuspendLayout(); 547 562 this.panel1.SuspendLayout(); 563 this.tpConfiguration.SuspendLayout(); 564 ((System.ComponentModel.ISupportInitialize)(this.nudEventPolling)).BeginInit(); 548 565 this.SuspendLayout(); 549 566 // … … 574 591 this.tabMain.Controls.Add(this.tpTransferAppts); 575 592 this.tabMain.Controls.Add(this.tpWorkStations); 593 this.tabMain.Controls.Add(this.tpConfiguration); 576 594 this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill; 577 595 this.tabMain.Location = new System.Drawing.Point(0, 0); … … 831 849 this.label1.TabIndex = 1; 832 850 this.label1.Text = " Use the Access Types panel to define the kinds of access available for schedulin" + 833 834 851 "g at this facility. Common types of access include Walkin, Scheduled, Same Day," + 852 " and Dental Expanded Functions."; 835 853 // 836 854 // pnlAddEditAT … … 1182 1200 this.cmdWorkStationsRefresh.Text = "&Refresh"; 1183 1201 this.cmdWorkStationsRefresh.Click += new System.EventHandler(this.cmdWorkStationsRefresh_Click); 1202 // 1203 // tpConfiguration 1204 // 1205 this.tpConfiguration.BackColor = System.Drawing.SystemColors.Control; 1206 this.tpConfiguration.Controls.Add(this.nudEventPolling); 1207 this.tpConfiguration.Controls.Add(this.lblEventPollInterval); 1208 this.tpConfiguration.Controls.Add(this.chkEventPolling); 1209 this.tpConfiguration.Location = new System.Drawing.Point(4, 22); 1210 this.tpConfiguration.Name = "tpConfiguration"; 1211 this.tpConfiguration.Padding = new System.Windows.Forms.Padding(3); 1212 this.tpConfiguration.Size = new System.Drawing.Size(696, 428); 1213 this.tpConfiguration.TabIndex = 7; 1214 this.tpConfiguration.Text = "Configuration"; 1215 // 1216 // nudEventPolling 1217 // 1218 this.nudEventPolling.Enabled = false; 1219 this.nudEventPolling.Location = new System.Drawing.Point(374, 24); 1220 this.nudEventPolling.Maximum = new decimal(new int[] { 1221 9999999, 1222 0, 1223 0, 1224 0}); 1225 this.nudEventPolling.Minimum = new decimal(new int[] { 1226 5, 1227 0, 1228 0, 1229 0}); 1230 this.nudEventPolling.Name = "nudEventPolling"; 1231 this.nudEventPolling.Size = new System.Drawing.Size(74, 20); 1232 this.nudEventPolling.TabIndex = 11; 1233 this.nudEventPolling.Value = new decimal(new int[] { 1234 5, 1235 0, 1236 0, 1237 0}); 1238 this.nudEventPolling.ValueChanged += new System.EventHandler(this.nudEventPolling_ValueChanged); 1239 // 1240 // lblEventPollInterval 1241 // 1242 this.lblEventPollInterval.AutoSize = true; 1243 this.lblEventPollInterval.Location = new System.Drawing.Point(185, 26); 1244 this.lblEventPollInterval.Name = "lblEventPollInterval"; 1245 this.lblEventPollInterval.Size = new System.Drawing.Size(167, 13); 1246 this.lblEventPollInterval.TabIndex = 9; 1247 this.lblEventPollInterval.Text = "Event Polling Interval (in seconds)"; 1248 // 1249 // chkEventPolling 1250 // 1251 this.chkEventPolling.AutoSize = true; 1252 this.chkEventPolling.Location = new System.Drawing.Point(33, 25); 1253 this.chkEventPolling.Name = "chkEventPolling"; 1254 this.chkEventPolling.Size = new System.Drawing.Size(130, 17); 1255 this.chkEventPolling.TabIndex = 7; 1256 this.chkEventPolling.Text = "Event Polling Enabled"; 1257 this.chkEventPolling.UseVisualStyleBackColor = true; 1258 this.chkEventPolling.CheckedChanged += new System.EventHandler(this.chkEventPolling_CheckedChanged); 1184 1259 // 1185 1260 // DManagement … … 1228 1303 this.panel1.ResumeLayout(false); 1229 1304 this.panel1.PerformLayout(); 1305 this.tpConfiguration.ResumeLayout(false); 1306 this.tpConfiguration.PerformLayout(); 1307 ((System.ComponentModel.ISupportInitialize)(this.nudEventPolling)).EndInit(); 1230 1308 this.ResumeLayout(false); 1231 1309 … … 2402 2480 #endregion Workstations 2403 2481 2482 private void chkEventPolling_CheckedChanged(object sender, EventArgs e) 2483 { 2484 if (chkEventPolling.Checked) 2485 { 2486 nudEventPolling.Enabled = true; 2487 int interval = Convert.ToInt32(nudEventPolling.Value); 2488 string result = this.m_DocManager.RemoteSession.TransmitRPC("VEFA SET BMX POLL INTERVAL", interval.ToString()); 2489 this.m_DocManager.RemoteSession.EventServices.EventPollingInterval = (interval * 1000); 2490 this.m_DocManager.RemoteSession.EventServices.IsEventPollingEnabled = true; 2491 } 2492 else 2493 { 2494 nudEventPolling.Enabled = false; 2495 string result = this.m_DocManager.RemoteSession.TransmitRPC("VEFA SET BMX POLL INTERVAL", "0"); 2496 this.m_DocManager.RemoteSession.EventServices.EventPollingInterval = 5000; 2497 this.m_DocManager.RemoteSession.EventServices.IsEventPollingEnabled = false; 2498 } 2499 } 2500 2501 private void nudEventPolling_ValueChanged(object sender, EventArgs e) 2502 { 2503 string result = this.m_DocManager.RemoteSession.TransmitRPC("VEFA SET BMX POLL INTERVAL", nudEventPolling.Value.ToString()); 2504 this.m_DocManager.RemoteSession.EventServices.IsEventPollingEnabled = false; 2505 this.m_DocManager.RemoteSession.EventServices.EventPollingInterval = (Convert.ToInt32(nudEventPolling.Value) * 1000); 2506 this.m_DocManager.RemoteSession.EventServices.IsEventPollingEnabled = true; 2507 } 2404 2508 } 2405 2509 }
Note:
See TracChangeset
for help on using the changeset viewer.