Пример #1
0
 /*
  * Initialize the flight.
  */
 public void init()
 {
     if (FilePath != string.Empty)
     {
         info.init_Flight_Info(FilePath);
         AttributesNames = info.get_attribute_names();
         RowCount        = info.row_count();
         //correlatedDll = new CorrelatedDll(FilePath);
         //NotifyPropertyChanged(string.Empty);
         //NotifyPropertyChanged("AttributesNames");
         //NotifyPropertyChanged("RowCount");
     }
 }
Пример #2
0
        /***
         * Set the anomaly report
         ***/
        private void setAnomalyReport()
        {
            anomalyRepor = new Dictionary <string, List <string> >();

            string strAnomalyReport = intPtrToString(getAllAnomalyReport(dataDll, 1, 2));

            List <string> lineNumbers = null;
            string        oldColName  = "";

            foreach (string word in strAnomalyReport.Split('\n'))
            {
                //last run
                if (word.Equals(""))
                {
                    anomalyRepor.Add(flight_Info.getAttributeFromIndex(Int32.Parse(oldColName)), lineNumbers);
                    break;
                }
                string[] tokens  = word.Split(' ');
                string   colName = tokens[1];

                //if true there no new column to add
                if (colName.Equals(oldColName))
                {
                    lineNumbers.Add(tokens[0]);
                }
                else //if false there is new column to add
                {
                    //if this is the first time don't enter
                    if (!oldColName.Equals(""))
                    {
                        anomalyRepor.Add(flight_Info.getAttributeFromIndex(Int32.Parse(oldColName)), lineNumbers);
                    }

                    lineNumbers = new List <string>();
                    lineNumbers.Add(tokens[0]);
                    oldColName = tokens[1];
                }
            }


            foreach (string att in flight_Info.get_attribute_names())
            {
                if (!anomalyRepor.ContainsKey(att))
                {
                    List <string> emptyLineNumbers = new List <string>();
                    anomalyRepor.Add(att, emptyLineNumbers);
                }
            }
        }