Example #1
0
        public static void Load(StartupEventArgs e)
        {
            if (e.Args != null && e.Args.Length > 0)
            {
                if (e.Args[0].ToLower() == "--clear")
                {
                    MainViewModel.ClearTileCache();
                    var language = new MainLanguage().Dictionary;
                    var dialog   = new MessageView()
                    {
                        WindowStartupLocation = WindowStartupLocation.CenterScreen,
                    };
                    var viewModel = dialog.DataContext as MessageViewModel;
                    viewModel.Content          = "";
                    viewModel.Title            = language["ClearSuccessTitle"];
                    viewModel.ShowCancelButton = false;
                    dialog.ShowDialog();
                }
            }
            else
            {
                bool fullScreen = GetBoolean(MakeKey(StartMenuKey, nameof(TileSize.Fullscreen)));
                TileSize.Fullscreen = fullScreen;
                bool showMoreTiles = GetBoolean(MakeKey(StartMenuKey, nameof(TileSize.ShowMoreTiles)));
                TileSize.ShowMoreTiles = showMoreTiles;

                new MainView().ShowDialog();
            }
        }
Example #2
0
        public static void Save()
        {
            var file = new JsonFile(FileName)
            {
                ObjectContent = new JsonObject
                {
                    new JsonProperty(nameof(DownloadPath), DownloadPath),
                    new JsonProperty(nameof(FileNameFormat), FileNameFormat),
                },
            };

            try
            {
                file.Save();
            }
            catch (UnauthorizedAccessException ex)
            {
                var language = new MainLanguage();
                var title    = language[MainLanguage.Keys.SettingsSaveFailedTitle];
                var message  = language[MainLanguage.Keys.SettingsSaveFailedMessage] + Environment.NewLine + ex.Message;
                MessageBox.Show(message, title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
#if !DEBUG
            catch (Exception)
            {
            }
#endif
        }
Example #3
0
 private static void fieldOfStudyLanguage(Document doc, MainLanguage Language)
 {
     doc.Add(new Paragraph("Język prowadzenia studiów: ".ToUpper())
             .Add(new Paragraph(EnumTranslator.Translate(Language.ToString()))
                  .SetTextAlignment(iText.Layout.Properties.TextAlignment.RIGHT))
             .SetFixedLeading(0.5f));
 }
Example #4
0
        void ReleaseDesignerOutlets()
        {
            if (Area != null)
            {
                Area.Dispose();
                Area = null;
            }

            if (CountryFlag != null)
            {
                CountryFlag.Dispose();
                CountryFlag = null;
            }

            if (MainCurrency != null)
            {
                MainCurrency.Dispose();
                MainCurrency = null;
            }

            if (MainLanguage != null)
            {
                MainLanguage.Dispose();
                MainLanguage = null;
            }

            if (NameLbl != null)
            {
                NameLbl.Dispose();
                NameLbl = null;
            }

            if (Population != null)
            {
                Population.Dispose();
                Population = null;
            }

            if (Region != null)
            {
                Region.Dispose();
                Region = null;
            }

            if (Subregion != null)
            {
                Subregion.Dispose();
                Subregion = null;
            }
        }
Example #5
0
        public static void CreateJumpList()
        {
            var jumpList = new JumpList();
            var language = new MainLanguage();

            jumpList.JumpItems.Add(new JumpTask
            {
                Title             = language[MainLanguage.Keys.DisallowProgram],
                Arguments         = "--disallow",
                Description       = language[MainLanguage.Keys.DisallowProgramDescription],
                IconResourceIndex = 1,
            });
            jumpList.JumpItems.Add(new JumpTask
            {
                Title             = language[MainLanguage.Keys.AllowProgram],
                Arguments         = "--allow",
                Description       = language[MainLanguage.Keys.AllowProgramDescription],
                IconResourceIndex = 2,
            });
            jumpList.ShowFrequentCategory = false;
            jumpList.ShowRecentCategory   = false;
            JumpList.SetJumpList(Application.Current, jumpList);
        }
Example #6
0
 public TranslatorStudent(string firstName, string secondName, string thirdName, Sex sex, int age, University university, int course, bool grant, bool freeEducation, MainLanguage mainLanguage, LanguageEnglish languageEnglish)
     : base(firstName, secondName, thirdName, sex, age, university, course, grant, freeEducation)
 {
     this.mainLanguage    = mainLanguage;
     this.languageEnglish = languageEnglish;
 }
Example #7
0
 public AntlrConverter()
 {
     ConvertedLanguages = MainLanguage.GetLanguageWithDependentLanguages();
 }
Example #8
0
 public CSharpRoslynParseTreeConverter()
 {
     ConvertedLanguages = MainLanguage.GetLanguageWithDependentLanguages();
 }