private void SaveSetting()
        {
            var crt = new LEProfile(Path.GetFileName(App.StandaloneFilePath),
                                    Guid.NewGuid().ToString(),
                                    false,
                                    tbAppParameter.Text,
                                    _cultureInfos[cbLocation.SelectedIndex].Name,
                                    _timezones[cbTimezone.SelectedIndex].Id,
                                    cbStartAsAdmin.IsChecked != null && (bool)cbStartAsAdmin.IsChecked,
                                    cbRedirectRegistry.IsChecked != null && (bool)cbRedirectRegistry.IsChecked,
                                    cbStartAsSuspend.IsChecked != null && (bool)cbStartAsSuspend.IsChecked
                                    );

            LEConfig.SaveApplicationConfigFile(App.StandaloneFilePath, crt);
        }
        private void bSaveAppSetting_Click(object sender, RoutedEventArgs e)
        {
            var crt = new LEProfile
            {
                Name           = Path.GetFileName(App.StandaloneFilePath),
                Guid           = Guid.NewGuid().ToString(),
                ShowInMainMenu = false,
                Parameter      =
                    I18n.GetString("EnterArgument") == tbAppParameter.Text ? String.Empty : tbAppParameter.Text,
                DefaultFont    = cbDefaultFont.Text,
                Location       = _cultureInfos[cbLocation.SelectedIndex].Name,
                Timezone       = _timezones[cbTimezone.SelectedIndex].Id,
                RunWithSuspend = cbStartAsSuspend.IsChecked != null && (bool)cbStartAsSuspend.IsChecked
            };

            LEConfig.SaveApplicationConfigFile(App.StandaloneFilePath, crt);

            //Run the application.
            Process.Start(
                Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "LEProc.exe"),
                string.Format("-run \"{0}\"", App.StandaloneFilePath.Replace(".le.config", "")));

            Application.Current.Shutdown();
        }