internal static void UpdateCountryFiles(Dictionary <string, List <Tuple <string, string> > > changesCountryFiles, Form showWaitCursorForm = null)
        {
            try
            {
                if (showWaitCursorForm == null)
                {
                    showWaitCursorForm = EM_AppContext.Instance.GetActiveCountryMainForm();
                }
                showWaitCursorForm.Cursor = Cursors.WaitCursor;
                bool showOpenWarning = true;
                foreach (var ccChange in changesCountryFiles)
                {
                    string         country    = ccChange.Key;
                    EM_UI_MainForm ccMainForm = EM_AppContext.Instance.GetCountryMainForm(country);
                    if (ccMainForm != null)
                    {
                        if (showOpenWarning)
                        {
                            switch (UserInfoHandler.GetInfo(country.ToUpper() + " is open." + Environment.NewLine +
                                                            "Updating exchange rates requires a reset of the undo-functionality." + Environment.NewLine +
                                                            "That means you will not be able to undo any of your changes so far." + Environment.NewLine + Environment.NewLine +
                                                            "Do you still want to update exchange rates of " + country.ToUpper() + "?" + Environment.NewLine + Environment.NewLine +
                                                            "(Press Cancel to not be requested with respect to further open countries.)", MessageBoxButtons.YesNoCancel))
                            {
                            case DialogResult.No: continue;

                            case DialogResult.Cancel: showOpenWarning = false; break;
                            }
                        }
                        ccMainForm.GetUndoManager().Commit(); ccMainForm.GetUndoManager().Reset();
                    }
                    CountryConfigFacade ccf = CountryAdministrator.GetCountryConfigFacade(country);
                    foreach (var change in ccChange.Value)
                    {
                        ccf.GetSystemRowByName(change.Item1).ExchangeRateEuro = change.Item2;
                    }

                    if (ccMainForm != null)
                    {
                        ccMainForm.GetUndoManager().Commit(); ccMainForm.GetUndoManager().Reset(); ccMainForm.WriteXml();
                    }
                    else
                    {
                        CountryAdministrator.WriteXML(country);
                    }
                }
            }
            catch (Exception)
            {
            }
            finally { showWaitCursorForm.Cursor = Cursors.Default; }
        }