correct port defaults for codeplug example; properly reset console settings;

pull/1/head
Bryan Biedenkapp 11 months ago
parent 3533d36d3c
commit 8a40626e44

@ -11,9 +11,9 @@ systems:
# Textual name to idenitify this peer in the FNE
Identity: "CONS OP1"
# FNE Address
address: "localhost"
address: "127.0.0.1"
# FNE Port
port: 3001
port: 62031
# Peer ID for FNE
peerId: 1234567
# Radio ID transmitted traffic will come from

@ -75,6 +75,7 @@ namespace dvmconsole
private double offsetY;
private bool isDragging;
private bool noSaveSettingsOnClose = false;
private SettingsManager settingsManager = new SettingsManager();
private SelectedChannelsManager selectedChannelsManager;
private FlashingBackgroundManager flashingManager;
@ -207,6 +208,7 @@ namespace dvmconsole
LoadCodeplug(openFileDialog.FileName);
settingsManager.LastCodeplugPath = openFileDialog.FileName;
noSaveSettingsOnClose = false;
settingsManager.SaveSettings();
}
}
@ -218,9 +220,13 @@ namespace dvmconsole
/// <param name="e"></param>
private void ResetSettings_Click(object sender, RoutedEventArgs e)
{
var confirmResult = MessageBox.Show("Are you sure to wish to reset console settings?", "Confirm Settings Reset", MessageBoxButton.YesNo, MessageBoxImage.Question);
var confirmResult = MessageBox.Show("Are you sure to wish to reset console settings?", "Reset Settings", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (confirmResult == MessageBoxResult.Yes)
{
MessageBox.Show("Settings will be reset after console restart.", "Reset Settings", MessageBoxButton.OK, MessageBoxImage.Information);
noSaveSettingsOnClose = true;
settingsManager.Reset();
}
}
/// <summary>
@ -849,7 +855,8 @@ namespace dvmconsole
settingsManager.ShowAlertTones = widgetSelectionWindow.ShowAlertTones;
GenerateChannelWidgets();
settingsManager.SaveSettings();
if (!noSaveSettingsOnClose)
settingsManager.SaveSettings();
}
}
@ -1196,7 +1203,9 @@ namespace dvmconsole
/// <param name="e"></param>
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
settingsManager.SaveSettings();
if (!noSaveSettingsOnClose)
settingsManager.SaveSettings();
base.OnClosing(e);
Application.Current.Shutdown();
}

Loading…
Cancel
Save

Powered by TurnKey Linux.