private void saveButton_Click(object sender, EventArgs e)
 {
     if (m_persistence.Save())
     {
         Close();
     }
 }
Exemple #2
0
        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();
                }
            };
        }
Exemple #3
0
 private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     persistenceController.Save(new Model.PersistenceEntity()
     {
         Settings = settingsController.Settings,
         Months   = modelController.MonthsAsSet()
     });
 }
Exemple #4
0
 public void DebugSave()
 {
     PersistenceController.Save();
 }
Exemple #5
0
 void OnDisable()
 {
     _disabledOn = Time.time;
     Enabled     = false;
     _controller.Save(this);
 }