public DiseaseChooseDialogForm(DiseasesService diseasesService) { _diseasesService = diseasesService; InitializeComponent(); _dataGridViewService = new DataGridViewService(DiseasesDataGridView); }
public ClientChooseDialogForm(ClientsService clientsService) { _clientsService = clientsService; InitializeComponent(); _clientsDataGridViewService = new DataGridViewService(ClientsDataGridView); }
public RecipeMedicamentsForm(int recipeId, RecipesMedicamentsService recipesMedicamentsService) { _recipeId = recipeId; _recipesMedicamentsService = recipesMedicamentsService; InitializeComponent(); _dataGridViewService = new DataGridViewService(RecipeMedicamentsDataGridView); }
public DosagesForm(DiseaseMedicament diseaseMedicament, DosagesService dosagesService) { _diseaseMedicament = diseaseMedicament; _dosagesService = dosagesService; InitializeComponent(); _dosagesDataGridViewService = new DataGridViewService(DosagesDataGridView); }
public MainFormController(DatabaseService databaseService, DataGridViewService dataGridViewService, ImageStatService imageStatService, ConfigService configService, FileSystemService fileSystemService, ImageService imageService) { _databaseService = databaseService; _dataGridViewService = dataGridViewService; _imageStatService = imageStatService; _configService = configService; _fileSystemService = fileSystemService; _imageService = imageService; }
public SubstitutesForm(Medicament medicament, SubstitutesService substitutesService, MedicamentsService medicamentsService) { _medicament = medicament; _substitutesService = substitutesService; _medicamentsService = medicamentsService; InitializeComponent(); _originalDataGridViewService = new DataGridViewService(OriginalDataGridView); _substituteDataGridViewService = new DataGridViewService(SubstituteDataGridView); }
public void DataGridViewService_Pages_Correctly_First_Page() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Should().HaveCount(25); }
public void DataGridViewService_Updates_MetaData() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; service.ApplyMetaData(GenerateList(), ref metaData).ToList(); metaData.totalRows.Should().Be(137); }
public void DataGridViewService_Sorts_By_Id_For_Missing_SortOrder() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Id).Should().BeInAscendingOrder(); }
public void DataGridViewService_Sorts_By_Id_For_Invalid_Property() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { sortColumn = "Wrong", rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Id).Should().BeInAscendingOrder(); }
public void DataGridViewService_Sorts_Correctly() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { sortColumn = "Name", rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Name).Should().BeInAscendingOrder(); }
public SymptomsForm(SymptomsService symptomsService, DiseasesSymptomsService diseasesSymptomsService, DiseasesService diseasesService) { _symptomsService = symptomsService; _diseasesSymptomsService = diseasesSymptomsService; _diseasesService = diseasesService; InitializeComponent(); _dataGridViewService = new DataGridViewService(SymptomsDataGridView); }
public DiseasesSymptomsForm(int?diseaseId, int?symptomId, DiseasesSymptomsService diseasesSymptomsService, DiseasesService diseasesService, SymptomsService symptomsService) { _initialDiseaseId = diseaseId; _initialSymptomId = symptomId; _diseasesSymptomsService = diseasesSymptomsService; _diseasesService = diseasesService; _symptomsService = symptomsService; InitializeComponent(); _dataGridViewService = new DataGridViewService(DiseasesSymptomsDataGridView); }
public MedicamentsForm(MedicamentsService medicamentsService, DiseasesService diseasesService, DiseasesMedicamentsService diseasesMedicamentsService, SubstitutesService substitutesService, DosagesService dosagesService) { _medicamentsService = medicamentsService; _diseasesService = diseasesService; _diseasesMedicamentsService = diseasesMedicamentsService; _substitutesService = substitutesService; _dosagesService = dosagesService; InitializeComponent(); _dataGridViewService = new DataGridViewService(MedicamentsDataGridView); }
public RecipesForm(RecipesService recipesService, RecipesMedicamentsService recipesMedicamentsService, MedicamentsService medicamentsService, ClientsService clientsService, DiseasesService diseasesService, RecipeCreator recipeCreator) { _recipesService = recipesService; _recipesMedicamentsService = recipesMedicamentsService; _medicamentsService = medicamentsService; _clientsService = clientsService; _diseasesService = diseasesService; _recipeCreator = recipeCreator; InitializeComponent(); _recipesDataGridViewService = new DataGridViewService(RecipesDataGridView); }
public DiseasesForm(DiseasesService diseasesService, DiseasesMedicamentsService diseasesMedicamentsService, DiseasesSymptomsService diseasesSymptomsService, MedicamentsService medicamentsService, SymptomsService symptomsService, DosagesService dosagesService) { _diseasesService = diseasesService; _diseasesMedicamentsService = diseasesMedicamentsService; _diseasesSymptomsService = diseasesSymptomsService; _medicamentsService = medicamentsService; _symptomsService = symptomsService; _dosagesService = dosagesService; InitializeComponent(); _dataGridViewService = new DataGridViewService(DiseasesDataGridView); }
public MetroMainForm(MainFormController controller, DataGridViewService dataGridViewService, ImageStatService imageStatService, FormSettingsService formSettingsService) { _controller = controller; _dataGridViewService = dataGridViewService; _imageStatService = imageStatService; _formSettingsService = formSettingsService; InitializeComponent(); _progressBarWidget = new MetroProgressBarWidget(metroProgressBar1, progressPercent, progressLabel); // metroStyleManager1.Theme = metroStyleManager1.Theme == MetroThemeStyle.Light ? MetroThemeStyle.Dark : MetroThemeStyle.Light; // this.Theme = metroStyleManager1.Theme; // this.Refresh(); // dependencies // handlers Messaging.OnTalk += OnTalkHandler; Messaging.OnProgress += OnProgressHandler; FormClosing += Form1_FormClosing; Load += form_Load; stopButton.Click += stopButton_Click; startbutton.Click += startbutton_Click; metroButton1.Click += cleanSetsButton_Click; analyseButton.Click += analyseButton_Click; extraSetAnalysisCheckbox.CheckedChanged += extraSetAnalysisCheckbox_CheckedChanged; statsAnalysisRange.ValueChanged += statsAnalysisRange_ValueChanged; minSimilarityScoreNumericUpDown.ValueChanged += minSimilarityScoreNumericUpDown_ValueChanged; imageSetsListbox.SelectedIndexChanged += imageSetsListbox_SelectedIndexChanged; imagesGridView.Click += imagesGridView_Click; imagesGridView.DoubleClick += imagesGridView_DoubleClick; // start methods _controller.TestConnection(); SetImageCountText(); imageSetsListbox.Items.Clear(); LoadUiFromSavedOptions(); // hacks for visual performance MakeDoubleBufferedHack(this, true); MakeDoubleBufferedHack(imagesGridView, true); }
public DiseasesMedicamentsForm(int?diseaseId, int?medicamentId, DiseasesMedicamentsService diseasesMedicamentsService, DiseasesService diseasesService, MedicamentsService medicamentsService, DosagesService dosagesService) { _initialDiseaseId = diseaseId; _initialMedicamentId = medicamentId; _diseasesMedicamentsService = diseasesMedicamentsService; _diseasesService = diseasesService; _medicamentsService = medicamentsService; _dosagesService = dosagesService; InitializeComponent(); _dataGridViewService = new DataGridViewService(DiseasesMedicamentsDataGridView); }
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { DataGridViewService.VisibleRowOrder(dataGridView1, e); }
/// <summary> /// 在发生所有单元格绘制之后,执行行级绘制时发生的事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { DataGridViewService.VisibleRowOrder(dataGridView1, e); // 项目 Common 的 DataGridService 类,作用:设置单元格样式 }