Пример #1
0
        private async void Initialize()
        {
            bool exist = await ApplicationData.Current.LocalFolder.FileExistsAsync("db.sqlite");

            if (!exist)
            {
                await SyncHelper.CopyDbFileFromOneDrive();
            }

            DalBase.CreateBackup();
            DalBase.CreateDb();

            DalBase.ConvertCategories();
            DalBase.CheckDefaultCategory();

            DalBase.AddItemsIfEmpty();

            ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(360, 530));

            SetTitleBar();

            if (OperationsAppBarRadioButton != null)
            {
                OperationsAppBarRadioButton.IsChecked = true;
            }

            if (Strona_glowna_ListBoxItem != null)
            {
                Strona_glowna_ListBoxItem.IsChecked = true;
            }

            WhatsNewMessageDialog.CheckForNewerAppVersion();
            SyncHelper.CheckSyncBase();
        }