public ScrollableMaps(Boolean files) { HauteurGPS = Math.Abs(bordBas - bordHaut); LargeurGPS = Math.Abs(bordGauche - bordDroit); dayToInt = new Dictionary <int, String>(); this.fillStationCoordonates(); colorList = GetAllColors(); dayToInt.Add(1, "Monday"); dayToInt.Add(2, "Tuesday"); dayToInt.Add(3, "Wednesday"); dayToInt.Add(4, "Thursday"); dayToInt.Add(5, "Friday"); dayToInt.Add(6, "Saturday"); dayToInt.Add(7, "Sunday"); initPictureOfMap(); createChoiceTimeList(); createChangeTypeButton(); DateTime time = new DateTime(2025, 1, 1); DateTime timeS = new DateTime(1970, 1, 2); if (LocalDataBase.statsTabHeure == null) { LocalDataBase.getRemplissageByDayHisto(timeS, time); LocalDataBase.getRemplissageByHourHisto(timeS, time); LocalDataBase.getRemplissageByHourOuvresHisto(timeS, time); } this.legend(); }
/* * Constructeur */ public StatsChartsVelib(Boolean files) { this.fillStationPOIS(); this.fillStationAlt(); dayToInt = new Dictionary <String, int>(); intToEchelle = new Dictionary <int, String>(); intToEchelle.Add(0, "Par Heures"); intToEchelle.Add(1, "Par jour de la semaine"); intToEchelle.Add(2, "Par semaines"); dayToInt.Add("Monday", 0); dayToInt.Add("Tuesday", 1); dayToInt.Add("Wednesday", 2); dayToInt.Add("Thursday", 3); dayToInt.Add("Friday", 4); dayToInt.Add("Saturday", 5); dayToInt.Add("Sunday", 6); lastIndexgeotop = 0; lastIndexgeobot = 0; lastIndexTimetop = 0; lastIndexTimebot = 0; time = new DateTime(2025, 1, 1); timeS = new DateTime(1970, 1, 2); if (LocalDataBase.statsTabHeure == null) { LocalDataBase.getRemplissageByDayHisto(timeS, time); LocalDataBase.getRemplissageByHourHisto(timeS, time); LocalDataBase.getRemplissageByHourOuvresHisto(timeS, time); } this.fillStationPOIS(); this.fillStationAlt(); colors = new List <string>(); this.GetAllColors(); }
private void DateChangement_MouseClick(Object sender, EventArgs e) { timeS = choixDateDeb.Value; time = choixDateFin.Value; LocalDataBase.getRemplissageByDayHisto(timeS, time); LocalDataBase.getRemplissageByHourHisto(timeS, time); LocalDataBase.getRemplissageByHourOuvresHisto(timeS, time); }
public static IRepositoriy <User> GetInstance() { if (_repositoriy == null) { _repositoriy = new Repository(LocalDataBase.GetInstance()); _localData.MockDataList(); } return(_repositoriy); }
private void ChangeOutputType(object sender, UserEventArgs <BitmapType> e) { ((PictureBox)ImageController).Image = null; currentOutputType = e.item; var elements = (List <LocalDataGraphicsElement>)LocalDataBase.GetTypedElements(currentOutputType); if (elements != null) { ((GraphicsInfoControlMenu)ListController).SetListBoxItems(elements); } }
private void fillStationCoordonates() { coordonnees = new Dictionary <int, KeyValuePair <double, double> >(); ArrayList donneesStation = LocalDataBase.getStationsDetails(); Dictionary <String, String> tempLine; for (int i = 0; i < donneesStation.Count; i++) { tempLine = (Dictionary <String, String>)donneesStation[i]; coordonnees[int.Parse(tempLine["id"])] = new KeyValuePair <double, double>(double.Parse(tempLine["lng"].Replace(".", ",")), double.Parse(tempLine["lat"].Replace(".", ","))); } }
private void fillStationAlt() { altitudes = new Dictionary <int, int>(); ArrayList donneesStation = LocalDataBase.getStationsDetails(); Dictionary <String, String> tempLine; for (int i = 0; i < donneesStation.Count; i++) { tempLine = (Dictionary <String, String>)donneesStation[i]; altitudes[int.Parse(tempLine["id"])] = int.Parse(tempLine["altitude"].Replace(".", ",")); } }
private void fillStationPOIS() { poiNumber = new Dictionary <int, int>(); ArrayList donneesStation = LocalDataBase.getStationsDetails(); Dictionary <String, String> tempLine; for (int i = 0; i < donneesStation.Count; i++) { tempLine = (Dictionary <String, String>)donneesStation[i]; poiNumber[int.Parse(tempLine["id"])] = int.Parse(tempLine["poiCount"].Replace(".", ",")); } }
public void SaveResultsToBitmap(object sender, UserEventArgs <BaseModelParameters> e) { var bmp = MatrixAdapter.instance.DrawToBitmap(e.item); var type = BitmapType.Матрица; var nameDialog = new AskBlockNameDialog(); nameDialog.bmpType = type; nameDialog.ShowDialog(); if (nameDialog.OKExited && nameDialog.OutText != null) { var element = new LocalDataGraphicsElement(nameDialog.OutText, bmp, type); LocalDataBase.AddData(element); System.Windows.Forms.MessageBox.Show("Данные успешно внесены!"); } }
//Сохранение в рисунок private void SaveCurves(object sender, EventArgs e) { var bmp = GraphicsAdapter.instance.DrawToBitmap(); var type = BitmapType.График; var nameDialog = new AskBlockNameDialog(); nameDialog.bmpType = type; nameDialog.ShowDialog(); if (nameDialog.OKExited && nameDialog.OutText != null) { var element = new LocalDataGraphicsElement(nameDialog.OutText, bmp, type); LocalDataBase.AddData(element); System.Windows.Forms.MessageBox.Show("Данные успешно внесены!"); } }
// Click pour execution private void execution(object sender, EventArgs args) { // Dates DateTime start = panel.getDateStart(); DateTime end = panel.getDateEnd(); // Type de vector int vector = panel.getSelectedVector(); // Type de distance String distance = panel.getSelectedDistance(); // Nombre de cluster int cluster = panel.getNbCluster(); // Type de codage string codage = panel.getCodage(); Dictionary <int, Dictionary <int, double> > data = new Dictionary <int, Dictionary <int, double> >(); switch (vector) { case 1: data = LocalDataBase.getRemplissageByHourOuvres(start, end); break; case 2: data = LocalDataBase.getRemplissageByHourWE(start, end); break; case 3: data = LocalDataBase.getRemplissageByHalfHour(start, end); break; case 4: data = LocalDataBase.getRemplissageByDay(start, end); break; case 5: data = LocalDataBase.getVarianceByHour(start, end); break; default: data = LocalDataBase.getRemplissageByHour(start, end); break; } Console.WriteLine("J'ai les donnees"); Kmeans(data, cluster, distance, codage); }
static void Main(string[] args) { LocalDataBase database = new LocalDataBase(); database.Cost = 5000; database.ChildCost = 2500; database.PushDummyData(); ReservationService reservationService = new ReservationService(database); Boolean quit = false; char key = '0'; while (!quit) { switch (key) { case '1': key = ListRooms(reservationService); break; case '2': key = CreateReservation(reservationService); break; case '3': key = ListReservations(reservationService); break; case '4': key = GetReservationCost(reservationService); break; case 'q': quit = true; break; default: key = MainMenu(); break; } } }
public static Person GetPerson() { List <Person> ppl = new List <Person>(); LocalDataBase.GetPeople(ref ppl); if (ppl.Count == 0) { Person person = new Person("Mike"); person.Amount = 5000; person.CurrencyID = 2; LocalDataBase.AddPerson(person); return(person); } else { return(ppl[ppl.Count - 1] as Person); } }
private void SaveDataRequest(object sender, EventArgs e) { if (currentBlock != null) { var blDialog = new AskBlocksDialog(); blDialog.ShowDialog(); var tempList = new List <BaseModelParameters>(); if (blDialog.ExitedOnOK) { for (var i = 0; i < 3; i++) { if (blDialog.SavedBlocks[i]) { tempList.Add(currentBlock[i].modelData); } } LocalDataBase.AddBlocks(new MParametersList(blDialog.TextOut, tempList)); } } else { MessageBox.Show("Не выполнено ни единого расчета!"); } }
public void ListCheckedStateChanged(object sender, ListCheckedEventArgs e) { LocalDataBase.EnableBlocks(e.checkState, e.message); ((BlocksControlMenu)CustomMenu).ResetListData(LocalDataBase.GetAllBlocksList()); BlocksDataAdapter.instance.Fill(LocalDataBase.GetEnabledBlocksList()); }
private void button_refresh_Click(object sender, EventArgs e) { ResetListData(LocalDataBase.GetAllBlocksList()); }
public DataRepository() { Context = new LocalDataBase(); }
private void ChangeItem(object sender, MessageEventArgs e) { ((PictureBox)ImageController).Image = LocalDataBase.GetElement(e.message, currentOutputType).Picture; ((PictureBox)ImageController).SizeMode = PictureBoxSizeMode.StretchImage; }
public ReservationService(LocalDataBase database) { DataBase = database; }
private void LocalDataBase_DataUpdated(object sender, EventArgs e) { ResetEntry(); Base = LocalDataBase.GetEnries(FilterStatus); }
private void button20_Click(object sender, EventArgs e) { LocalDataBase l = new LocalDataBase(); l.addCollumnToReenvio(); }