コード例 #1
0
        public DiseaseChooseDialogForm(DiseasesService diseasesService)
        {
            _diseasesService = diseasesService;

            InitializeComponent();

            _dataGridViewService = new DataGridViewService(DiseasesDataGridView);
        }
コード例 #2
0
        public ClientChooseDialogForm(ClientsService clientsService)
        {
            _clientsService = clientsService;

            InitializeComponent();

            _clientsDataGridViewService = new DataGridViewService(ClientsDataGridView);
        }
コード例 #3
0
        public RecipeMedicamentsForm(int recipeId, RecipesMedicamentsService recipesMedicamentsService)
        {
            _recipeId = recipeId;
            _recipesMedicamentsService = recipesMedicamentsService;

            InitializeComponent();

            _dataGridViewService = new DataGridViewService(RecipeMedicamentsDataGridView);
        }
コード例 #4
0
ファイル: DosagesForm.cs プロジェクト: Igasus/PrihodkoCourse
        public DosagesForm(DiseaseMedicament diseaseMedicament, DosagesService dosagesService)
        {
            _diseaseMedicament = diseaseMedicament;
            _dosagesService    = dosagesService;

            InitializeComponent();

            _dosagesDataGridViewService = new DataGridViewService(DosagesDataGridView);
        }
コード例 #5
0
 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;
 }
コード例 #6
0
        public SubstitutesForm(Medicament medicament, SubstitutesService substitutesService, MedicamentsService medicamentsService)
        {
            _medicament         = medicament;
            _substitutesService = substitutesService;
            _medicamentsService = medicamentsService;

            InitializeComponent();

            _originalDataGridViewService   = new DataGridViewService(OriginalDataGridView);
            _substituteDataGridViewService = new DataGridViewService(SubstituteDataGridView);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        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);
        }
コード例 #9
0
        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();
        }
コード例 #10
0
        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();
        }
コード例 #11
0
        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();
        }
コード例 #12
0
        public SymptomsForm(SymptomsService symptomsService,
                            DiseasesSymptomsService diseasesSymptomsService,
                            DiseasesService diseasesService)
        {
            _symptomsService = symptomsService;

            _diseasesSymptomsService = diseasesSymptomsService;
            _diseasesService         = diseasesService;

            InitializeComponent();

            _dataGridViewService = new DataGridViewService(SymptomsDataGridView);
        }
コード例 #13
0
        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);
        }
コード例 #14
0
        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);
        }
コード例 #15
0
ファイル: RecipesForm.cs プロジェクト: Igasus/PrihodkoCourse
        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);
        }
コード例 #16
0
ファイル: DiseasesForm.cs プロジェクト: Igasus/PrihodkoCourse
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
        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);
        }
コード例 #19
0
 private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewService.VisibleRowOrder(dataGridView1, e);
 }
コード例 #20
0
 /// <summary>
 /// 在发生所有单元格绘制之后,执行行级绘制时发生的事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewService.VisibleRowOrder(dataGridView1, e);  // 项目 Common 的 DataGridService 类,作用:设置单元格样式
 }