Esempio n. 1
0
        private async void UpdateLogBtn_Click(object sender, RoutedEventArgs e)
        {
            var logDialog = new Control.UpdateLogDialog();

            logDialog.LoadLog();
            await logDialog.ShowAsync();
        }
Esempio n. 2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            UI_Init();
            if (Setting.DemoAccount)
            {
                data = await MainDataProvider.GetDemoData();

                UpdateUI();
            }
            else
            {
                data             = new MainDataProvider(2);
                data.DataUpdate += async() =>
                {
                    try
                    {
                        await Dispatcher.RunAsync(CoreDispatcherPriority.High, () => {
                            UpdateUI();
                        });
                    }
                    catch (Exception)
                    {
                    }
                };
            }
            if (Setting.FileStart)
            {
                var loadRes = Setting.Data.Load(Setting.FileData);
                await new Control.FileActivatedDialog(loadRes).ShowAsync();
            }
            string ver = SystemInformation.ApplicationVersion.ToFormattedString();

            if ((string)Setting.GetSetting("version", "") != ver)
            {
                Setting.SetSetting("version", ver);
                var logDialog = new Control.UpdateLogDialog();
                logDialog.LoadLog();
                await logDialog.ShowAsync();
            }
            this.NavigationCacheMode    = NavigationCacheMode.Enabled;
            toastTaskCheckBox.IsChecked = await Setting.Task.isWhiteListToastTaskReg();

            if (Setting.ToastStart)
            {
                pivotView.SelectedIndex = 1;
            }
        }