private void DetailedBindingForm_frmStatusChanged(object sender, FormStatusChangedEventArgs e) { switch (e.FrmStatus) { case FormStatus.Init: MessageBox.Show("Init"); break; case FormStatus.OnEditMode: //MessageBox.Show("OnEditMode"); tambahBtn.Enabled = false; simpanBtn.Image = Properties.Resources.Save_50px_1; m_Control.EnableInput(this); break; case FormStatus.Ready: //MessageBox.Show("Ready"); tambahBtn.Enabled = true; simpanBtn.Image = Properties.Resources.Pencil_Tip_50px; m_Control.DisableInput(this); break; case FormStatus.NewRecord: //MessageBox.Show("NewRecord"); tambahBtn.Enabled = false; simpanBtn.Image = Properties.Resources.Save_50px; m_Control.EnableInput(this); nomorTextBox.Focus(); break; default: MessageBox.Show("Default"); break; } }
protected void OnStatusChanged(FormStatusChangedEventArgs e) { //Report Changes frmStatusChanged?.Invoke(this, e); }