public WorkSpaceClass()
 {
     NLIST_FILENAME = "";
     ELIST_FILENAME = "";
     TowerModelInstance = new TowerModel();
     HeatDoublerInstance = new Models.HeatDoubler();
     ROOT_DIR = "";
 }
Example #2
0
 public void StoreData_VirtualHeater(HeatDoubler HD)
 {
     MessageBox.Show(MainWindow.WorkSpaceInstance.DBNAME);
     using (var odb = OdbFactory.Open(MainWindow.WorkSpaceInstance.DBNAME))
     {
         odb.Store(HD);
     }
 }
Example #3
0
 public void StoreData_VirtualHeater(HeatDoubler HD, int isInit)
 {
     //MessageBox.Show(MainWindow.WorkSpaceInstance.DBNAME);
     if (isInit == 1)
     {
         OdbFactory.Delete(MainWindow.WorkSpaceInstance.DBNAME);
     }
     using (var odb = OdbFactory.Open(MainWindow.WorkSpaceInstance.DBNAME))
     {
         odb.Store(HD);
     }
 }
 private void BtnImporter_Click_1(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.OpenFileDialog opfile = new System.Windows.Forms.OpenFileDialog();
     opfile.Filter="CSV Files (*.csv)|*.csv";
     opfile.RestoreDirectory = true;
     if (opfile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         string filename = opfile.FileName;
         DataTable dbtable = CSVReader.ReadCSVFile(filename, true);
         DataRow[] dbrow = dbtable.Select();
         foreach (DataRow dr in dbrow)
         {
             Models.HeatDoubler hdrow = new Models.HeatDoubler(dr[0].ToString(), System.Convert.ToDouble(dr[1]),
                 System.Convert.ToDouble(dr[2]), System.Convert.ToDouble(dr[3]));
             MainWindow.storeDB.StoreData_VirtualHeater(hdrow);
         }
         //ShowImportedData.ItemsSource = dbtable.AsDataView();
     }
 }
Example #5
0
 public void HeatDoublerAppend(HeatDoubler hd)
 {
     list.Add(hd);
     listSize++;
 }