Ejemplo n.º 1
0
        /// <summary>
        /// parent form calls this to pass the scada list from the main object
        /// to this form.
        /// </summary>
        /// <param name="scada"></param>
        public void BindDataSource(DERMSInterface.CIMData cim)
        {
            _cim = cim;
            ScadaBindingSource.DataSource = _cim.Scada;
            scadaDeviceView.DataSource    = ScadaBindingSource;

            // hide these columns
            scadaDeviceView.Columns["Mrid"].Visible      = false;
            scadaDeviceView.Columns["Channel"].Visible   = false;
            scadaDeviceView.Columns["Connected"].Visible = false;
            scadaDeviceView.Columns["Master"].Visible    = false;


            scadaDeviceView.Columns["LogLevel"].Visible    = false;
            scadaDeviceView.Columns["Description"].Visible = false;
            scadaDeviceView.Columns["Protocol"].Visible    = false;
            scadaDeviceView.Columns["DeviceType"].Visible  = false;
            scadaDeviceView.Columns["DNP"].Visible         = false;

            // Protocol is a combo box
            if (scadaDeviceView.Columns["ProtocolCombo"] == null)
            {
                DataGridViewComboBoxColumn colbox = new DataGridViewComboBoxColumn();
                colbox.DataPropertyName = "Protocol";
                // todo : add additional communication protocols. Do the internals differ?
                colbox.Items.AddRange("DNP3");
                colbox.Name       = "ProtocolCombo";
                colbox.HeaderText = "Protocol";
                scadaDeviceView.Columns.Add(colbox);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// loads cim config file into memory
        /// </summary>
        /// <param name="path">file name</param>
        private void openFile(string path)
        {
            // read the xml config file
            this._filepath = path;
            _cim           = DERMSInterface.CIMData.read(path);

            // load the header form based on which header type is set in combobox
            bindAllDataSources();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// New Button pressed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _cim = new CIMData();
     bindAllDataSources();
     derGroupViewControl1.updateDERGroupViewReadOnlyCells();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// creates a CIM object initialized with header and data
 /// </summary>
 /// <param name="d"></param>
 public CIM(CIMData d)
 {
     _data = d;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// parent form calls this to pass the scada list from the main object
        /// to this form.
        /// </summary>
        /// <param name="scada"></param>
        public void BindDataSource(DERMSInterface.CIMData cim)
        {
            _cim = cim;
            ScadaBindingSource.DataSource = _cim.Scada;
            scadaDeviceView.DataSource = ScadaBindingSource;

            // hide these columns
            scadaDeviceView.Columns["Mrid"].Visible = false;
            scadaDeviceView.Columns["Channel"].Visible = false;
            scadaDeviceView.Columns["Connected"].Visible = false;
            scadaDeviceView.Columns["Master"].Visible = false;

            scadaDeviceView.Columns["LogLevel"].Visible = false;
            scadaDeviceView.Columns["Description"].Visible = false;
            scadaDeviceView.Columns["Protocol"].Visible = false;
            scadaDeviceView.Columns["DeviceType"].Visible = false;
            scadaDeviceView.Columns["DNP"].Visible = false;

            // Protocol is a combo box
            if (scadaDeviceView.Columns["ProtocolCombo"] == null)
            {
                DataGridViewComboBoxColumn colbox = new DataGridViewComboBoxColumn();
                colbox.DataPropertyName = "Protocol";
                // todo : add additional communication protocols. Do the internals differ?
                colbox.Items.AddRange("DNP3");
                colbox.Name = "ProtocolCombo";
                colbox.HeaderText = "Protocol";
                scadaDeviceView.Columns.Add(colbox);
            }
        }