Exemplo n.º 1
0
        // ---------------------------------------------------------------------------------------------------



        // Back Button
        //----------------------------------------------------------------------------------------------------
        protected async override void OnBackKeyPress(CancelEventArgs e)
        {
            // Zurück abbrechen
            e.Cancel = true;


            // Abfragen ob gespeichert wird
            if (MessageBox.Show("", MyApp.Resources.AppResources.X002_use, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                // Wenn Hintergundfarbe
                if (colorType == "backgroundColor")
                {
                    MainPage.backgroundColor = colorNew;
                    await ClassFileMamagment.saveSettings();
                }

                // Wenn Rahmenfarbe
                else if (colorType == "frameColor")
                {
                    MainPage.frameColor = colorNew;
                    await ClassFileMamagment.saveSettings();
                }

                // Wenn Benutzerinformation Hintergrundfarbe
                else if (colorType == "userInformationBackgroundColor")
                {
                    MainPage.userInformationBackgroundColor = colorNew;
                    await ClassFileMamagment.saveSettings();
                }

                // Wenn Benutzerinformation Schriftfarbe
                else if (colorType == "userInformationFontColor")
                {
                    MainPage.userInformationFontColor = colorNew;
                    await ClassFileMamagment.saveSettings();
                }

                // Wenn Information Hintergrundfarbe
                else if (colorType == "informationBackgroundColor")
                {
                    MainPage.informationBackgroundColor = colorNew;
                    await ClassFileMamagment.saveSettings();
                }
            }


            // Zurück Navigieren
            NavigationService.GoBack();
        }
Exemplo n.º 2
0
        // Button // Ja
        private async void btnYes_Click(object sender, RoutedEventArgs e)
        {
            // Wenn Hintergundfarbe
            if (colorType == "backgroundColor")
            {
                MainPage.backgroundColor = colorNew;
                await ClassFileMamagment.saveSettings();
            }

            // Wenn Rahmenfarbe
            else if (colorType == "frameColor")
            {
                MainPage.frameColor = colorNew;
                await ClassFileMamagment.saveSettings();
            }

            // Wenn Benutzerinformation Hintergrundfarbe
            else if (colorType == "userInformationBackgroundColor")
            {
                MainPage.userInformationBackgroundColor = colorNew;
                await ClassFileMamagment.saveSettings();
            }

            // Wenn Benutzerinformation Schriftfarbe
            else if (colorType == "userInformationFontColor")
            {
                MainPage.userInformationFontColor = colorNew;
                await ClassFileMamagment.saveSettings();
            }

            // Wenn Information Hintergrundfarbe
            else if (colorType == "informationBackgroundColor")
            {
                MainPage.informationBackgroundColor = colorNew;
                await ClassFileMamagment.saveSettings();
            }

            // Zurück Navigieren
            NavigationService.GoBack();
        }