コード例 #1
0
        private async Task SaveConf()
        {
            if (_importInProgress)
            {
                return;
            }

            if (TripRef.Sample)
            {
                Toast.DisplayTwoLines(_res.GetString("SampleMode"), _res.GetString("NoSampleModification"), "Icons/toastImageAndText.png");
                return;
            }

            _changeInProgress = false;

            StartImport();

            // modification of summary from ViewHome only
            if (PageRef is ViewHome)
            {
                TripSummaryRef.FolderTopName           = TripName.Text;
                TripSummaryRef.LocationMain            = TripName.Text;
                TripSummaryRef.LocationFromTo          = TripLocation.Text;
                TripSummaryRef.SyncDropbox.Requested   = (bool)ChkDropbox.IsChecked;
                TripSummaryRef.SyncDropbox.Compression = SynchroManager.IntToCompr(ComboDropbox.SelectedIndex);
                TripSummaryRef.SyncUsb.Requested       = (bool)ChkUsb.IsChecked;
                TripSummaryRef.SyncUsb.Compression     = SynchroManager.IntToCompr(ComboUsb.SelectedIndex);

                // save summary
                await(PageRef as ViewHome).SaveSummary();
            }

            TripRef.Summary.FolderTopName = TripName.Text;

            // modification of Trip
            foreach (AlbumConfUserControl _albumConf in listAlbums)
            {
                if (_albumConf.AlbumRef.DisplayName != _albumConf.NameTopRef.Text)
                {
                    // was changed bu user
                    _albumConf.AlbumRef.DisplayName              = _albumConf.NameTopRef.Text;
                    _albumConf.AlbumRef.Summary.StrLocation      = _albumConf.NameTopRef.Text;
                    _albumConf.AlbumRef.Summary.StrLocationShort = _albumConf.NameTopRef.Text;
                }
                _albumConf.AlbumRef.DateArrival     = _albumConf.DateTopRef.Date.Date;
                _albumConf.AlbumRef.PositionPresent = (Boolean)_albumConf.CheckBoxRef.IsChecked;
            }

            await TripRef.Update(true, false, null, null, null, this);
        }
コード例 #2
0
 private void ComboUsb_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     TripSummaryRef.SyncUsb.Compression = SynchroManager.IntToCompr((sender as ComboBox).SelectedIndex);
     NotifyChange();
 }