private void MotherboardPartialForm_ToolSelected(object sender, ITool e) { MotherboardPartialForm form = (MotherboardPartialForm)sender; _toolPartialForm.LoadData(form.Motherboard, e); Open(_toolPartialForm); }
public MainForm ( [NotNull] I18n i18n, [NotNull] Model model, [NotNull] ReadMePartialForm readMePartialForm, [NotNull] MotherboardsPartialForm motherboardsPartialForm, [NotNull] MotherboardPartialForm motherboardPartialForm, [NotNull] BiosesPartialForm biosesPartialForm, [NotNull] ToolPartialForm toolPartialForm, [NotNull] AboutPartialForm aboutPartialForm ) { _i18n = i18n ?? throw new ArgumentNullException(nameof(i18n)); _model = model ?? throw new ArgumentNullException(nameof(model)); _readMePartialForm = readMePartialForm ?? throw new ArgumentNullException(nameof(readMePartialForm)); _motherboardPartialForm = motherboardPartialForm ?? throw new ArgumentNullException(nameof(motherboardPartialForm)); _motherboardsPartialForm = motherboardsPartialForm ?? throw new ArgumentNullException(nameof(motherboardsPartialForm)); _biosesPartialForm = biosesPartialForm ?? throw new ArgumentNullException(nameof(biosesPartialForm)); _toolPartialForm = toolPartialForm ?? throw new ArgumentNullException(nameof(toolPartialForm)); _aboutPartialForm = aboutPartialForm ?? throw new ArgumentNullException(nameof(aboutPartialForm)); _motherboardsPartialForm.MotherboardSelected += MotherboardsPartialForm_MotherboardSelected; _motherboardPartialForm.ToolSelected += MotherboardPartialForm_ToolSelected; InitializeComponent(); _i18n.Language = ConfigurationManager.AppSettings[nameof(I18n.Language)]; Open(_readMePartialForm); ApplyI18n(_i18n); }