Ignore:
Timestamp:
Apr 28, 2016, 9:49:25 AM (9 years ago)
Author:
Faisal Sami
Message:

BSDX Scheduling changes for version 2.0.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/DManagement.cs

    r1513 r1731  
    112112                private System.Windows.Forms.Label lblWorkstations;
    113113                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;
    115119
    116120                #endregion Fields
     
    385389                        cboBSDXClinic.ValueMember = "RESOURCEID";
    386390
    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        }
    388399
    389400                private void DManagement_Load(object sender, System.EventArgs e)
    390401                {
    391                         this.cmdChangeResource.Enabled = false;
     402            this.cmdChangeResource.Enabled = false;
    392403                        this.cmdRemoveUser.Enabled = false;
    393404                        //Select the grid's zeroeth row
     
    514525            this.cmdWorkStationsShutdown = new System.Windows.Forms.Button();
    515526            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();
    516531            this.pnlPageBottom.SuspendLayout();
    517532            this.tabMain.SuspendLayout();
     
    546561            this.groupBox1.SuspendLayout();
    547562            this.panel1.SuspendLayout();
     563            this.tpConfiguration.SuspendLayout();
     564            ((System.ComponentModel.ISupportInitialize)(this.nudEventPolling)).BeginInit();
    548565            this.SuspendLayout();
    549566            //
     
    574591            this.tabMain.Controls.Add(this.tpTransferAppts);
    575592            this.tabMain.Controls.Add(this.tpWorkStations);
     593            this.tabMain.Controls.Add(this.tpConfiguration);
    576594            this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
    577595            this.tabMain.Location = new System.Drawing.Point(0, 0);
     
    831849            this.label1.TabIndex = 1;
    832850            this.label1.Text = " Use the Access Types panel to define the kinds of access available for schedulin" +
    833                 "g at this facility.  Common types of access include Walkin, Scheduled, Same Day," +
    834                 " and Dental Expanded Functions.";
     851    "g at this facility.  Common types of access include Walkin, Scheduled, Same Day," +
     852    " and Dental Expanded Functions.";
    835853            //
    836854            // pnlAddEditAT
     
    11821200            this.cmdWorkStationsRefresh.Text = "&Refresh";
    11831201            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);
    11841259            //
    11851260            // DManagement
     
    12281303            this.panel1.ResumeLayout(false);
    12291304            this.panel1.PerformLayout();
     1305            this.tpConfiguration.ResumeLayout(false);
     1306            this.tpConfiguration.PerformLayout();
     1307            ((System.ComponentModel.ISupportInitialize)(this.nudEventPolling)).EndInit();
    12301308            this.ResumeLayout(false);
    12311309
     
    24022480        #endregion Workstations
    24032481
     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        }
    24042508    }
    24052509}
Note: See TracChangeset for help on using the changeset viewer.