static public RepairPulseWindow Show(Gtk.Window parent, Pulse myPulse, int pDN) { if (RepairPulseWindowBox == null) { RepairPulseWindowBox = new RepairPulseWindow(parent, myPulse, pDN); } RepairPulseWindowBox.repair_sub_event.Show(); return(RepairPulseWindowBox); }
void on_button_accept_clicked(object o, EventArgs args) { //foreach all lines... extrac intervalTimesString TreeIter myIter; string timeString = ""; bool iterOk = store.GetIterFirst(out myIter); if (iterOk) { string equal = ""; //first iteration should not appear '=' do { timeString = timeString + equal + (string)treeview_subevents.Model.GetValue(myIter, 1); equal = "="; } while (store.IterNext(ref myIter)); } //calculate other variables needed for pulse creation myPulse.TotalPulsesNum = Util.GetNumberOfJumps(timeString, false); //don't need a GetNumberOfRuns, this works myPulse.TimesString = timeString; //save it deleting the old first for having the same uniqueID Sqlite.Delete(false, Constants.PulseTable, myPulse.UniqueID); myPulse.InsertAtDB(false, Constants.PulseTable); /* * SqlitePulse.Insert(myPulse.UniqueID.ToString(), * myPulse.PersonID, myPulse.SessionID, * myPulse.Type, myPulse.FixedPulse, totalPulsesNum, * timeString, myPulse.Description * ); */ //close the window RepairPulseWindowBox.repair_sub_event.Hide(); RepairPulseWindowBox = null; }
private void on_repair_selected_pulse_clicked(object o, EventArgs args) { notebooks_change(5); Log.WriteLine("Repair selected pulse"); //1.- check that there's a line selected //2.- check that this line is a pulse and not a person //(check also if it's not a individual pulse, then pass the parent pulse) if (myTreeViewPulses.EventSelectedID > 0) { //3.- obtain the data of the selected pulse Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID, false ); //4.- edit this pulse repairPulseWin = RepairPulseWindow.Show(app1, myPulse, prefsDigitsNumber); repairPulseWin.Button_accept.Clicked += new EventHandler(on_repair_selected_pulse_accepted); } }
void on_delete_event(object o, DeleteEventArgs args) { RepairPulseWindowBox.repair_sub_event.Hide(); RepairPulseWindowBox = null; }
void on_button_cancel_clicked(object o, EventArgs args) { RepairPulseWindowBox.repair_sub_event.Hide(); RepairPulseWindowBox = null; }
void on_button_accept_clicked(object o, EventArgs args) { //foreach all lines... extrac intervalTimesString TreeIter myIter; string timeString = ""; bool iterOk = store.GetIterFirst (out myIter); if(iterOk) { string equal= ""; //first iteration should not appear '=' do { timeString = timeString + equal + (string) treeview_subevents.Model.GetValue (myIter, 1); equal = "="; } while (store.IterNext (ref myIter)); } //calculate other variables needed for pulse creation myPulse.TotalPulsesNum = Util.GetNumberOfJumps(timeString, false); //don't need a GetNumberOfRuns, this works myPulse.TimesString = timeString; //save it deleting the old first for having the same uniqueID Sqlite.Delete(Constants.PulseTable,myPulse.UniqueID); myPulse.InsertAtDB(false, Constants.PulseTable); /* SqlitePulse.Insert(myPulse.UniqueID.ToString(), myPulse.PersonID, myPulse.SessionID, myPulse.Type, myPulse.FixedPulse, totalPulsesNum, timeString, myPulse.Description ); */ //close the window RepairPulseWindowBox.repair_sub_event.Hide(); RepairPulseWindowBox = null; }
public static RepairPulseWindow Show(Gtk.Window parent, Pulse myPulse, int pDN) { if (RepairPulseWindowBox == null) { RepairPulseWindowBox = new RepairPulseWindow (parent, myPulse, pDN); } RepairPulseWindowBox.repair_sub_event.Show (); return RepairPulseWindowBox; }