public PeriodicElementInfoForm(PeriodicElementInfo elementInfo)
        {
            InitializeComponent();

            _elementInfo = elementInfo ?? throw new ArgumentNullException(nameof(elementInfo));

            Load            += onLoad;
            button_OK.Click += (_, _) => Close();
        }
Пример #2
0
        private void periodicElementButton_Click(object sender, EventArgs e)
        {
            var    button                   = (PeriodicElementButton)sender;
            string elementNumber            = button.ElementNumber.ToString();
            PeriodicElementInfo elementInfo = _periodicElementInfos[elementNumber];

            using var dlg = new PeriodicElementInfoForm(elementInfo);
            _             = dlg.ShowDialog(this);
        }