public MainWindow()
        {
            InitializeComponent();

            string startupParameter = "";

            string[] commandLineArgs = Environment.GetCommandLineArgs();

            if (commandLineArgs.Length > 1)
            {
                // Skip first command line argument, as it is the current directory
                startupParameter = commandLineArgs[1];
            }

            // Check if startup parameter is '--write-defaults'
            if (startupParameter == "--write-defaults")
            {
                TranslationManager.Save();

                Environment.Exit(0);
                return;
            }

            TranslationManager.Startup(startupParameter);
        }
        private void FileSaveAsCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            SaveFileDialog fileDialog = new SaveFileDialog();

            // Sets filter and default file extension for file dialog
            fileDialog.DefaultExt = ".dat";
            fileDialog.Filter     = "DAT Files (*.dat)|*.dat|All Files (*.*)|*.*";

            // Show file dialog
            bool?fileChosen = fileDialog.ShowDialog();

            // If result has no value or value is false
            if (!fileChosen.HasValue || !fileChosen.Value)
            {
                // Stop attempting save
                return;
            }

            // Get chosen file path
            string filePath = fileDialog.FileName;

            // Save at chosen file path
            TranslationManager.Save(filePath);
        }
 private void FileSaveCommand_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     // Saves at current/default translations path
     TranslationManager.Save();
 }