private void BasicATK_Auto_Click(object sender, EventArgs e) { Characters_Weapons cw = new Characters_Weapons(); try { cw.ShowDialog(); if (cw.Output() != -1) { radioButton2.Checked = true; BasicATK_Manual.Text = cw.Output().ToString(); } } catch (NullReferenceException) { _ = MessageBox.Show("文件似乎正在被占用。\n请关闭相应的表格文件后重试。", "提示"); } catch (ObjectDisposedException) { } }
public void Characters() { Characters_Weapons cw = new Characters_Weapons(); try { cw.ShowDialog(); if (cw.Output() != -1) { ATK_Basic.Current = cw.Output(); } } catch (NullReferenceException) { _ = MessageBox.Show("文件似乎正在被占用。\n请关闭相应的表格文件后重试。", "提示"); } catch (ObjectDisposedException) { } Calculate(); }