Пример #1
0
        private async void editServers_Click(object sender, EventArgs e)
        {
            _browserRefreshTimer.Stop(); // Stop the refresh timer

            var serverEditor = new ServerEditor(_context);
            var dlgResult    = serverEditor.ShowDialog();

            // This should probably be injected
            var serverUpdater = new UpdateServerIds();
            await serverUpdater.Update(_context, true);

            if (dlgResult == DialogResult.OK)
            {
                _context.Settings.SaveSettings();
            }

            await _context.UpdateServerStatuses();

            _browserRefreshTimer.Start(); // Start the refresh timer back up
        }
Пример #2
0
        private async void editServers_Click(object sender, EventArgs e)
        {
            _browserRefreshTimer.Stop(); // Stop the refresh timer

            var serverEditor = new ServerEditor(_context);
            var dlgResult = serverEditor.ShowDialog();

            // This should probably be injected
            var serverUpdater = new UpdateServerIds();
            await serverUpdater.Update(_context, true);

            if (dlgResult == DialogResult.OK)
                _context.Settings.SaveSettings();

            await _context.UpdateServerStatuses();

            _browserRefreshTimer.Start(); // Start the refresh timer back up
        }