Exemplo n.º 1
0
 /// <summary>
 /// Determines if call number 'row' is selected.
 /// </summary>
 /// <param name="row"></param>
 /// <param name="selectStart"></param>
 /// <param name="selectEnd"></param>
 /// <returns></returns>
 public bool isCallSelected(oSingleData rowData, double selectStart, double selectEnd)
 {
     // Get this row and column
     if (functionList != null && functionList.dataVis != null)
     {
         // Check if this function list contains the specified rowData
         if (functionList.dataVis.contains(rowData))
         {
             return(rowData.time <= selectEnd && rowData.time >= selectStart);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
        public void setData(oFunction functionBase, oSingleData measuredData)
        {
            this.functionBase = functionBase;
            this.measuredData = measuredData;
            if (functionBase == null)
            {
                this.Rows.Clear();
                return;
            }
            this.argumentClasses = functionBase.getArgumentList();



            // Cleanup this datagridview)
            this.Rows.Clear();

            // Build the combobox selection options
            string[] options = Enum.GetNames(typeof(DISPLAY_TYPE));

            // Fill out this datagridview based on the supplied data
            ARGUMENT_STRING_COLLECTION stringData = functionBase.getArgumentString(measuredData);

            DataGridViewRow[] newRows = new DataGridViewRow[argumentClasses.Count];
            for (int i = 0; i < argumentClasses.Count; i++)
            {
                // Add this row
                newRows[i] = new DataGridViewRow();

                // Add the name cell
                newRows[i].Cells[newRows[i].Cells.Add(new DataGridViewTextBoxCell())].Value = stringData.names[i];

                // Add the type cell combobox
                DataGridViewComboBoxCell comboBox = new DataGridViewComboBoxCell();
                comboBox.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox;
                comboBox.Value        = Enum.GetName(typeof(DISPLAY_TYPE), argumentClasses[i].displayMethod);
                comboBox.Items.AddRange(options);
                newRows[i].Cells.Add(comboBox);

                // Add the value cell
                newRows[i].Cells[newRows[i].Cells.Add(new DataGridViewTextBoxCell())].Value = stringData.values[i];
            }

            // Add the new rows
            this.Rows.AddRange(newRows);
        }
Exemplo n.º 3
0
        public void setData(oFunction functionBase, oSingleData measuredData)
        {
            this.functionBase = functionBase;
            this.measuredData = measuredData;
            if (functionBase == null)
            {
                this.Rows.Clear();
                return;
            }
            this.argumentClasses = functionBase.getArgumentList();

            // Cleanup this datagridview)
            this.Rows.Clear();

            // Build the combobox selection options
            string[] options = Enum.GetNames(typeof(DISPLAY_TYPE));

            // Fill out this datagridview based on the supplied data
            ARGUMENT_STRING_COLLECTION stringData = functionBase.getArgumentString(measuredData);
            DataGridViewRow[] newRows = new DataGridViewRow[argumentClasses.Count];
            for( int i = 0; i < argumentClasses.Count; i++ )
            {
                // Add this row
                newRows[i] = new DataGridViewRow();

                // Add the name cell
                newRows[i].Cells[newRows[i].Cells.Add(new DataGridViewTextBoxCell())].Value = stringData.names[i];

                // Add the type cell combobox
                DataGridViewComboBoxCell comboBox = new DataGridViewComboBoxCell();
                comboBox.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox;
                comboBox.Value = Enum.GetName(typeof(DISPLAY_TYPE), argumentClasses[i].displayMethod);
                comboBox.Items.AddRange(options);
                newRows[i].Cells.Add(comboBox);

                // Add the value cell
                newRows[i].Cells[newRows[i].Cells.Add(new DataGridViewTextBoxCell())].Value = stringData.values[i];
            }

            // Add the new rows
            this.Rows.AddRange(newRows);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Determines whether the specified row is in the selected region.
        /// </summary>
        /// <param name="row">Row in the call list table.</param>
        /// <returns></returns>
        public bool isCallSelected(int row)
        {
            if (baseFunctionList == null || baseFunctionList.dataVis == null)
            {
                return(false);
            }

            if (selectedRow >= 0 && selectedRow < timeseriesPlots.Count)
            {
                // Get the call in question
                oSingleData rowData = baseFunctionList.dataVis.getData(row);

                if (timeseriesPlots[selectedRow].isCallSelected(rowData, selectStart, selectEnd))
                {
                    return(true);
                }
            }

            // No timeseries claimed this call was selected.
            return(false);
        }
Exemplo n.º 5
0
 public bool contains(oSingleData rowData)
 {
     // Check if this dataset contains rowData
     return this.data.Contains(rowData);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Determines if call number 'row' is selected.
 /// </summary>
 /// <param name="row"></param>
 /// <param name="selectStart"></param>
 /// <param name="selectEnd"></param>
 /// <returns></returns>
 public bool isCallSelected(oSingleData rowData, double selectStart, double selectEnd)
 {
     // Get this row and column
     if (functionList != null && functionList.dataVis != null)
     {
         // Check if this function list contains the specified rowData
         if (functionList.dataVis.contains(rowData) )
         {
             return rowData.time <= selectEnd && rowData.time >= selectStart;
         }
     }
     return false;
 }