private void saveButton_Click(object sender, EventArgs e) { if (m_persistence.Save()) { Close(); } }
private void Init() { m_uow = Scout.Core.Data.GetUnitOfWork(); m_persistenceController = new PersistenceController(m_uow); m_areaData = Scout.Core.Data.GetList <Site>(m_uow).All(); areaGrid.DataSource = m_areaData; WireEvents(); colStatus.ColumnEdit = new AreaStatusComboObserver(m_uow); colDomainStatus.ColumnEdit = new AreaStatusComboObserver(m_uow); colSflStatus.ColumnEdit = new AreaStatusComboObserver(m_uow); saveButton.Click += (s, e) => { if (m_persistenceController.Save()) { Close(); } }; cancelButton.Click += (s, e) => { if (m_persistenceController.Cancel()) { Close(); } }; }
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { persistenceController.Save(new Model.PersistenceEntity() { Settings = settingsController.Settings, Months = modelController.MonthsAsSet() }); }
public void DebugSave() { PersistenceController.Save(); }
void OnDisable() { _disabledOn = Time.time; Enabled = false; _controller.Save(this); }