public Graph(System.Windows.Forms.CheckedListBox.CheckedItemCollection data, DateTime minDate, DateTime maxDate, ISaleService iSaleService, int mode, IReportService iReportService, ITimeSettingService iTimeSettingService, IProgramService iProgramService) { InitializeComponent(); fillColor(colorList); _data = data; _minDate = minDate; _maxDate = maxDate; _iSaleService = iSaleService; _iReportService = iReportService; _iTimeSettingService = iTimeSettingService; _iProgramService = iProgramService; this.chart1.ChartAreas[0].AxisX.MajorGrid.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Dash; chart1.ChartAreas.Add("area"); chart1.ChartAreas[0].AxisX.LabelStyle.Format = "dd-MM"; chart1.ChartAreas["area"].AxisX.Interval = 1; chart1.ChartAreas["area"].AxisX.IntervalType = DateTimeIntervalType.Days; chart1.ChartAreas["area"].AxisX.IntervalOffset = 1; chart1.ChartAreas["area"].AxisX.Minimum = minDate.ToOADate(); chart1.ChartAreas["area"].AxisX.Maximum = maxDate.ToOADate(); if (mode == 1) { drawQuantity(); label1.Text = "Quantity"; } else { drawEfficiency(); label1.Text = "Efficiency"; } }
public void SetValue() { if (mEntity == null) { mEntity = new List <Dictionary <string, object> >(); } System.Windows.Forms.CheckedListBox.CheckedItemCollection checkedMeans = this.clbMeans.CheckedItems; foreach (var item in checkedMeans) { var meanViewModel = item as MeaningViewModel; if (meanViewModel != null) { Dictionary <string, object> dic = new Dictionary <string, object>(); Meanings mean = allMeanings.Where(m => m.Id == meanViewModel.Id).First(); dic.Add("Mean", mean); dic.Add("Remark", DateTime.Now.ToString()); if (mEntity.Contains(dic)) { continue; } this.mEntity.Add(dic); } } }
public void Notify(LoggingEntery LE) { //print to ErrorExtendedRichTextBox Color TextColor; switch (LE.EnteryType) { case LoggingEntery.EnteryTypes.Debug: TextColor = Color.Green; break; case LoggingEntery.EnteryTypes.Informational: TextColor = Color.Black; break; case LoggingEntery.EnteryTypes.Warning: TextColor = Color.Yellow; break; case LoggingEntery.EnteryTypes.Error: TextColor = Color.DarkRed; break; case LoggingEntery.EnteryTypes.Critical: TextColor = Color.Red; break; default: TextColor = Color.Black; break; } MethodInvoker LastErrorTextBoxInvoker = delegate { string Message = string.Format("{0} {1} ({2})\n{3}\n*************\n", DateTime.Now, LE.Title, LE.EnteryType, LE.Message); ErrorExtendedRichTextBox.AppendText(Message, TextColor); }; ErrorExtendedRichTextBox.BeginInvoke(LastErrorTextBoxInvoker); //get selected notifyer System.Windows.Forms.CheckedListBox.CheckedItemCollection SelectedLoggers = ActiveLoggersCheckedListBox.CheckedItems; foreach (Logger L in SelectedLoggers) { if (L.LoggigLevel >= (int)LE.EnteryType) { try { L.Log(LE); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.ToString()); } } } }
public void Fill_videos_list(System.Windows.Forms.CheckedListBox.CheckedItemCollection list) { foreach (string item in list) { videos_list.Add(item); videosDownloadPercent.Add(0); } }
public Barriere(System.Windows.Forms.CheckedListBox.CheckedItemCollection selectedItems, ref List <Processus> lstProcessus, int id, ref List <Barriere> lstBarrieres) { barrierePassee = false; this.lstProcessus = lstProcessus; this.lstBarrieres = lstBarrieres; construireDictionnaire(selectedItems); this.id = id; }
private List <TipoJuego> GetCheckedItems(System.Windows.Forms.CheckedListBox.CheckedItemCollection checkedItems) { List <TipoJuego> list = new List <TipoJuego>(); foreach (object checkedItem in checkedItems) { list.Add((TipoJuego)checkedItem); } return(list); }
private List <int> GetLayerVisibles() { System.Windows.Forms.CheckedListBox.CheckedItemCollection checkedItems = this.cblVisibleLayers.CheckedItems; List <int> results = new List <int>(); foreach (object item in checkedItems) { results.Add((int)item); } return(results); }
public ModifyItems(System.Windows.Forms.CheckedListBox.CheckedItemCollection i) { foreach (listMusicItem e in i) { items.Add(e); } InitializeComponent(); doDefaultTexts(); InitData(); }
// Construire le dictionnaire private void construireDictionnaire(System.Windows.Forms.CheckedListBox.CheckedItemCollection selectedItems) { foreach (object selectedItem in selectedItems) { foreach (Processus processus in lstProcessus) { if (processus.getPID() == Convert.ToInt32(selectedItem)) { barriere.Add(Convert.ToInt32(selectedItem), genererNbAleatoire(processus)); } } } }
public LangCopier(string file, System.Windows.Forms.CheckedListBox.CheckedItemCollection checkedItemCollection) { Program.mainWindow.updateProgress(0); this.sInputPath = file; this.languages = LanguageHelper.GetLanguageList(checkedItemCollection); if (languages.Length == 0) { Log.AddLog("No target language was selected.", true); return; } LangCopyProcessor(); }
private void btnPutBack_Click(object sender, System.EventArgs e) { System.Windows.Forms.CheckedListBox.CheckedItemCollection index = lstSongs.CheckedItems; foreach (Card lol in index) { Debug.WriteLine("Putting back: " + lol.ToString()); songs.Add(lol); lstSongs.Items.Remove(lol); Debug.WriteLine("Songs remaining: " + songs.Count); } btnDraw.Enabled = true; btnPutBack.Enabled = false; lblPick2.Text = ""; }
public CritereRecherche(string nom, string prenom, string age, string ville, string codePostal, string mail, string telephone, string paiement, string certificat, string licence, System.Windows.Forms.CheckedListBox.CheckedItemCollection discipline, System.Windows.Forms.CheckedListBox.CheckedItemCollection niveau, System.Windows.Forms.CheckedListBox.CheckedItemCollection jour, System.Windows.Forms.CheckedListBox.CheckedItemCollection annees) { _nom = nom; _prenom = prenom; _ville = ville; _codePostal = codePostal; _age = age; _mail = mail; _telephone = telephone; _paiement = paiement; _certificat = certificat; _licence = licence; _discipline = discipline; _niveau = niveau; _jour = jour; _annees = annees; }
private void btnxacnhan_Click(object sender, EventArgs e) { if (themOrsua == "them") { if (checkdata()) { tensinhvien = txttensinhvien.Text; ghichu = txtghichu.Text; //duyệt combobox sơ rthichs System.Windows.Forms.CheckedListBox.CheckedItemCollection items = checkedListBoxsothich.CheckedItems; foreach (var sthich in items) { sothich += sthich + ","; } SinhVien sinhVien = new SinhVien(tensinhvien, namsinh, gioitinh, monhoc, sothich, ghichu); listSV.Add(sinhVien); dataGridSinhVien.DataSource = null; dataGridSinhVien.DataSource = listSV; checkedListBoxsothich.CheckOnClick = false; dataGridSinhVien.Refresh(); } } else { if (themOrsua == "sua") { if (checkdata()) { if (index >= 0) { listSV[index].tensinhvien = txttensinhvien.Text; listSV[index].ghichu = txtghichu.Text; } } } } lockObjetc(); }