Example #1
0
 private ILocalization GetLocalizationStrings(AppLocalization local)
 {
     ILocalization loc;
     switch (local)
     {
     case AppLocalization.Russian:
     loc=new RuLocalization();
     break;
     default:
     loc=new EnLocalization();
     break;
     }
     return loc;
 }
Example #2
0
 /// <summary>
 /// This method sets language of the main window
 /// </summary>  
 public void SetLanguage(AppLocalization local)
 {
     Settings.Localization=local;
     lang=GetLocalizationStrings(Settings.Localization);
 }
Example #3
0
 // Public
 public DefaultAppSettings()
 {
     autorun=false;
     height=600;
     width=800;
     localization=AppLocalization.English;
     confirmClipboardClear=true;
     confirmExit=true;
     showNotifyIcon=true;
     trayMinimize=true;
     showNotifications=true;
 }
Example #4
0
 // Public
 public AppSettings()
 {
     CurrentUser=Registry.CurrentUser;
     Autorun=
     CurrentUser.OpenSubKey
     (
     @"Software\Microsoft\Windows\CurrentVersion\Run",
     true
     );
     AppKey=
     SafeRegistryMethods.GetRegistrySubKey
     (
     CurrentUser,
     @"Software\CW"
     );
     defSettings=new DefaultAppSettings();
     height=
     SafeRegistryMethods.GetIntValue
     (
     AppKey,
     "Height",
     defSettings.Height
     );
     if(height<0)
     height=defSettings.Height;
     width=
     SafeRegistryMethods.GetIntValue
     (
     AppKey,
     "Width",
     defSettings.Width
     );
     if(width<0)
     width=defSettings.Width;
     localization=
     SafeRegistryMethods.GetEnumValue
     (
     AppKey,
     "Localization",
     defSettings.Localization
     );
     confirmClipboardClear=
     SafeRegistryMethods.GetBoolValue
     (
     AppKey,
     "ConfirmClipboardClear",
     defSettings.ConfirmClipboardClear
     );
     confirmExit=
     SafeRegistryMethods.GetBoolValue
     (
     AppKey,
     "ConfirmExit",
     defSettings.ConfirmExit
     );
     showNotifyIcon=
     SafeRegistryMethods.GetBoolValue
     (
     AppKey,
     "ShowNotifyIcon",
     defSettings.ShowNotifyIcon
     );
     trayMinimize=
     SafeRegistryMethods.GetBoolValue
     (
     AppKey,
     "TrayMinimize",
     defSettings.TrayMinimize
     );
     showNotifications=
     SafeRegistryMethods.GetBoolValue
     (
     AppKey,
     "ShowNotifications",
     defSettings.ShowNotifications
     );
 }
Example #5
0
 public LocalizationSwitcher()
 {
     Localization=default(AppLocalization);
 }