コード例 #1
0
        internal EditingCarForm()
        {
            InitializeComponent();

            DTP_Year.Value = DateTime.Now;


            Load += EditingCarForm_Load;

            TSB_Censel.Click += (s, e) => Close();

            LL_Model.Click += (s, e) => SelectionModel?.Invoke();

            TSB_Save.Click += async(s, e) => await Save?.Invoke();
        }
コード例 #2
0
 private void EditingVehicles_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.Enter)
     {
         SelectionModel?.Invoke();
     }
     else if (e.KeyCode == Keys.Enter)
     {
         TSB_Save.PerformClick();
     }
     else if (e.KeyCode == Keys.Escape)
     {
         Close();
     }
 }