コード例 #1
0
        private void rbBike_Unchecked(object sender, RoutedEventArgs e)
        {
            chkExtraBike.IsEnabled     = true;
            chkExtraExtra.IsEnabled    = true;
            btnMinus.IsEnabled         = true;
            btnPlus.IsEnabled          = true;
            txtStartingPoint.IsEnabled = true;


            txtStartingPoint.Text        = Tombstoning.Load <string>("txtStartingPoint");
            tbNumberOfZonesSelected.Text = tempLastNumberOfZones;

            string extraBikeBillet = Tombstoning.Load <string>("chkExtraBikeChecked");

            if (!string.IsNullOrEmpty(extraBikeBillet))
            {
                if (extraBikeBillet.ToLower() == "true")
                {
                    chkExtraBike.IsChecked = true;
                }
            }

            string extraExtraBillet = Tombstoning.Load <string>("chkExtraExtraChecked");

            if (!string.IsNullOrEmpty(extraExtraBillet))
            {
                if (extraExtraBillet.ToLower() == "true")
                {
                    chkExtraExtra.IsChecked = true;
                }
            }

            EnableCreateMessageButtonBillet();
        }
コード例 #2
0
        private void rbBike_Checked(object sender, RoutedEventArgs e)
        {
            Tombstoning.Save("tbNumberOfZonesSelected", tbNumberOfZonesSelected.Text);

            tempLastNumberOfZones        = tbNumberOfZonesSelected.Text;
            tbNumberOfZonesSelected.Text = "";

            Tombstoning.Save("txtStartingPoint", txtStartingPoint.Text);
            txtStartingPoint.Text = "";

            Tombstoning.Save("chkExtraBikeChecked", chkExtraBike.IsChecked.ToString());
            Tombstoning.Save("chkExtraExtraChecked", chkExtraExtra.IsChecked.ToString());


            chkExtraBike.IsEnabled  = false;
            chkExtraExtra.IsEnabled = false;
            chkExtraBike.IsChecked  = false;
            chkExtraExtra.IsChecked = false;

            btnMinus.IsEnabled = false;
            btnPlus.IsEnabled  = false;

            txtStartingPoint.IsEnabled = false;

            btnCreateMessage.IsEnabled = true;
        }
コード例 #3
0
        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
        {
            //Billet
            Tombstoning.Save("StartingPoint", this.txtStartingPoint.Text);

            Tombstoning.Save("tbNumberOfZonesSelected", this.tbNumberOfZonesSelected.Text);
            Tombstoning.Save("rbAdult", this.rbAdult.IsChecked.ToString());
            Tombstoning.Save("rbChild", this.rbChild.IsChecked.ToString());
            Tombstoning.Save("rbBike", this.rbBike.IsChecked.ToString());
            Tombstoning.Save("chkExtraBike", this.chkExtraBike.IsChecked.ToString());
            Tombstoning.Save("chkExtraExtra", this.chkExtraExtra.IsChecked.ToString());

            //Klippekort panorama item
            Tombstoning.Save("txtStartingPointKlippeKort", this.txtStartingPointKlippeKort.Text);
            Tombstoning.Save("tbNumberOfZonesSelectedKlippeKort", this.tbNumberOfZonesSelectedKlippeKort.Text);
            Tombstoning.Save("rbAdultKlippeKort", this.rbAdultKlippeKort.IsChecked.ToString());
            Tombstoning.Save("rbChildKlippeKort", this.rbChildKlippeKort.IsChecked.ToString());
            Tombstoning.Save("btnCreateMessageKlippeKort", this.btnCreateMessageKlippeKort.IsEnabled.ToString());

            //Pivot item
            Tombstoning.Save("pivotControlSelectedItem", this.pivotControl.SelectedIndex);
        }
コード例 #4
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            #region Billet
            string startingPoint = Tombstoning.Load <string>("StartingPoint");

            if (!string.IsNullOrEmpty(startingPoint))
            {
                txtStartingPoint.Text = startingPoint;
            }

            string numberOfZonesSelected = Tombstoning.Load <string>("tbNumberOfZonesSelected");

            if (!string.IsNullOrEmpty(numberOfZonesSelected))
            {
                tbNumberOfZonesSelected.Text = numberOfZonesSelected;
            }

            string adultBillet = Tombstoning.Load <string>("rbAdult");
            if (!string.IsNullOrEmpty(adultBillet))
            {
                if (adultBillet.ToLower() == "true")
                {
                    rbAdult.IsChecked = true;
                }
            }

            string childBillet = Tombstoning.Load <string>("rbChild");
            if (!string.IsNullOrEmpty(childBillet))
            {
                if (childBillet.ToLower() == "true")
                {
                    rbChild.IsChecked = true;
                }
            }

            string bikeBillet = Tombstoning.Load <string>("rbBike");
            if (!string.IsNullOrEmpty(bikeBillet))
            {
                if (bikeBillet.ToLower() == "true")
                {
                    rbBike.IsChecked = true;
                }
            }

            string extraBikeBillet = Tombstoning.Load <string>("chkExtraBike");
            if (!string.IsNullOrEmpty(extraBikeBillet))
            {
                if (extraBikeBillet.ToLower() == "true")
                {
                    chkExtraBike.IsChecked = true;
                }
            }

            string extraExtraBillet = Tombstoning.Load <string>("chkExtraExtra");
            if (!string.IsNullOrEmpty(extraExtraBillet))
            {
                if (extraExtraBillet.ToLower() == "true")
                {
                    chkExtraExtra.IsChecked = true;
                }
            }

            #endregion

            #region Klippekort
            string startingPointKlippeKort = Tombstoning.Load <string>("txtStartingPointKlippeKort");
            if (!string.IsNullOrEmpty(startingPointKlippeKort))
            {
                txtStartingPointKlippeKort.Text = startingPointKlippeKort;
            }

            string numberOfZonesSelectedKlippeKort = Tombstoning.Load <string>("tbNumberOfZonesSelectedKlippeKort");
            if (!string.IsNullOrEmpty(numberOfZonesSelectedKlippeKort))
            {
                tbNumberOfZonesSelectedKlippeKort.Text = numberOfZonesSelectedKlippeKort;
            }

            string adultKlippeKort = Tombstoning.Load <string>("rbAdultKlippeKort");
            if (!string.IsNullOrEmpty(adultKlippeKort))
            {
                if (adultKlippeKort.ToLower() == "true")
                {
                    rbAdultKlippeKort.IsChecked = true;
                }
            }

            string childKlippeKort = Tombstoning.Load <string>("rbChildKlippeKort");
            if (!string.IsNullOrEmpty(childKlippeKort))
            {
                if (childKlippeKort.ToLower() == "true")
                {
                    rbChildKlippeKort.IsChecked = true;
                }
            }

            string createMessageKlippeKort = Tombstoning.Load <string>("btnCreateMessageKlippeKort");
            if (!string.IsNullOrEmpty(createMessageKlippeKort))
            {
                if (createMessageKlippeKort.ToLower() == "true")
                {
                    btnCreateMessageKlippeKort.IsEnabled = true;
                }
            }

            #endregion


            //int panoramaControlSelectedItem = Tombstoning.Load<int>("panoramaControlSelectedItem");
            //panoramaControl.DefaultItem = panoramaControl.Items[panoramaControlSelectedItem];

            //Pivot item
            int pivotControlSelectedItem = Tombstoning.Load <int>("pivotControlSelectedItem");
            pivotControl.SelectedIndex = pivotControlSelectedItem;
        }