コード例 #1
0
ファイル: CategorySourceView.cs プロジェクト: abock/cubano
 private void OnActiveSourceChanged(SourceEventArgs args)
 {
     Banshee.Base.ThreadAssist.ProxyToMain (delegate {
         foreach (var label in labels) {
             label.IsSelected = label.Source == args.Source;
         }
     });
 }
コード例 #2
0
 private void OnActiveSourceChanged(SourceEventArgs args)
 {
     Banshee.ServiceStack.Application.Invoke (delegate {
         foreach (var label in labels) {
             label.IsSelected = label.Source == args.Source;
         }
     });
 }
コード例 #3
0
ファイル: ImportDialog.cs プロジェクト: thoja21/banshee-1
 private void OnSourceUpdated(SourceEventArgs args)
 {
     if (args.Source is IImportSource)
     {
         ThreadAssist.ProxyToMain(delegate {
             TreeIter iter;
             if (FindSourceIter(out iter, (IImportSource)args.Source))
             {
                 source_model.SetValue(iter, 1, args.Source.Name);
             }
         });
     }
 }
コード例 #4
0
ファイル: ImportDialog.cs プロジェクト: thoja21/banshee-1
 private void OnSourceRemoved(SourceEventArgs args)
 {
     if (args.Source is IImportSource)
     {
         ThreadAssist.ProxyToMain(delegate {
             TreeIter iter;
             if (FindSourceIter(out iter, (IImportSource)args.Source))
             {
                 source_model.Remove(ref iter);
             }
         });
     }
 }
コード例 #5
0
        private static void HandleSourceAdded(SourceEventArgs args)
        {
            SmartPlaylistSource playlist = args.Source as SmartPlaylistSource;

            if (playlist == null)
            {
                return;
            }

            StartTimer(playlist);
            playlists.Add(playlist);
            SortPlaylists();
        }
コード例 #6
0
        private static void HandleSourceRemoved(SourceEventArgs args)
        {
            SmartPlaylistSource playlist = args.Source as SmartPlaylistSource;

            if (playlist == null)
            {
                return;
            }

            playlists.Remove(playlist);

            StopTimer();
        }
コード例 #7
0
ファイル: PlayQueueActions.cs プロジェクト: thoja21/banshee-1
        private void OnSourceUpdated(SourceEventArgs args)
        {
            if (ServiceManager.SourceManager.ActiveSource is PlayQueueSource)
            {
                this["AddToPlayQueueAfterAction"].Visible = false;
            }
            else
            {
                this["AddToPlayQueueAfterAction"].Visible = true;
            }

            OnUpdated(null, null);
        }
コード例 #8
0
 public void RemoveSource(string sourceId)
 {
     // check dictionary because of OnDestroy
     if (_sourcesInPipeline != null)
     {
         _sourcesInPipeline.Remove(sourceId);
         SourceEventArgs e = new SourceEventArgs();
         e.sourceId  = sourceId;
         e.newSource = false;
         e.newStats  = "";
         OnChangedSourceData(e);
     }
 }
コード例 #9
0
        private void ModernTab_SelectedSourceChanged(object sender, SourceEventArgs e)
        {
            if (e.Source.OriginalString.EndsWith("Vasco da Gama"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "14h25, 16h50, 21h10";
            }

            if (e.Source.OriginalString.EndsWith("Algarve Shopping"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "16h30, 21h30, 00h40";
            }

            if (e.Source.OriginalString.EndsWith("Viana Shopping"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "14h30, 16h20, 21h50";
            }

            if (e.Source.OriginalString.EndsWith("Glicínias Plaza"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "14h30, 16h10, 21h20";
            }

            if (e.Source.OriginalString.EndsWith("Leiria Shopping"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "21h10, 00h20";
            }

            if (e.Source.OriginalString.EndsWith("Alvaláxia"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "14h00, 17h00, 00h20";
            }

            if (e.Source.OriginalString.EndsWith("Colombo"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "16h10, 21h20";
            }

            if (e.Source.OriginalString.EndsWith("Dolce Vita Porto"))
            {
                var sessoes = (TextBox)this.FindName("sessoes_textbox");
                sessoes.Text = "16h20, 21h20, 00h20";
            }
        }
コード例 #10
0
        private void ModernTab_SelectedSourceChanged(object sender, SourceEventArgs e)
        {
            if (e.Source.OriginalString.EndsWith("Vasco da Gama"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5";
            }

            if (e.Source.OriginalString.EndsWith("Algarve Shopping"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5, 6, 7";
            }

            if (e.Source.OriginalString.EndsWith("Viana Shopping"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5, 6";
            }

            if (e.Source.OriginalString.EndsWith("Glicínias Plaza"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5";
            }

            if (e.Source.OriginalString.EndsWith("Leiria Shopping"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5, 6";
            }

            if (e.Source.OriginalString.EndsWith("Alvaláxia"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4";
            }

            if (e.Source.OriginalString.EndsWith("Colombo"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5, 6, 7, 8";
            }

            if (e.Source.OriginalString.EndsWith("Dolce Vita Porto"))
            {
                var result = (TextBox)this.FindName("salas_textbox");
                result.Text = "1, 2, 3, 4, 5, 6";
            }
        }
コード例 #11
0
        void mySwamp_SourcesChangeEvent(object sender, SourceEventArgs args)
        {
            int    e   = args.EventId;
            Source src = args.Source;

            // EventIds areCrestron.SimplSharpPro.AudioDistribution.SourceEventIds;
            // NameFeedbackEventId
            if (e == SourceEventIds.NameFeedbackEventId)
            {
                // Source Name Changed?
            }
            else if (e == SourceEventIds.CompensationFeedbackEventId)
            {
                // Who Cares
            }
        }
コード例 #12
0
ファイル: SourceActions.cs プロジェクト: shaw1337/banshee
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            ThreadAssist.ProxyToMain(delegate {
                UpdateActions();

                if (last_source != null)
                {
                    last_source.Updated -= HandleActiveSourceUpdated;
                }

                if (ActiveSource != null)
                {
                    ActiveSource.Updated += HandleActiveSourceUpdated;
                }
            });
        }
コード例 #13
0
        private void _source_SourceEvent(object sender, SourceEventArgs e)
        {
            if (e.Event == SourceEventType.Loaded)
            {
                wavelengthDataSnapshot = null;
                cachedSeconds          = 0;
                cachedPosition         = 0;
                byteToResolutionRatio  = 0;

                // new track loaded into the source. Get the waveform data as fast as possible.
                Dispatcher.BeginInvoke((Action) delegate
                {
                    UpdateWaveform();
                });
            }
        }
コード例 #14
0
 private void menu_SelectedSourceChanged(object sender, SourceEventArgs e)
 {
     if (loader != null)
     {
         int index = e.Source.ToString().IndexOf("#");
         Service.getRubrique().SelectedRubrique = e.Source.ToString().Substring(index + 1);
         string cat = Service.getRubrique().SelectedRubrique;
         if (e.Source.ToString().Trim().Contains(loader.LastLoad?.ToString().Trim()))
         {
             BookListTransition tr = new BookListTransition();
             // loader.Transition.move(tr);
             view = new BookList();
             loader.Transition.move(view);
         }
     }
 }
コード例 #15
0
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            artwork_manager = ServiceManager.Get <ArtworkManager> ();

            if (!artwork_manager.IsCachedSize(image_size))
            {
                artwork_manager.AddCachedSize(image_size);
            }
            if (artwork_manager != null)
            {
                artwork_manager.ChangeCacheSize(ImageSize, GetAllAlbumsCount() + 3);
            }

            artwork_initialized = true;

            ServiceManager.SourceManager.ActiveSourceChanged -= HandleActiveSourceChanged;
        }
コード例 #16
0
        private void HandleSourceRemoved(SourceEventArgs args)
        {
            PlaylistSource source = args.Source as PlaylistSource;

            if (source == null)
            {
                return;
            }

            playlists.Remove(source);

            // Delete it from the database
            Globals.Library.Db.Execute(String.Format(
                                           "DELETE FROM SmartPlaylists WHERE PlaylistId = {0}",
                                           source.Id
                                           ));
        }
コード例 #17
0
        private void ModernTab_SelectedSourceChanged2(object sender, SourceEventArgs e)
        {
            var cinema_list = (ModernTab)this.FindName("cinemas_list");

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Vasco da Gama"))
            {
                if (e.Source.OriginalString.EndsWith("1") || e.Source.OriginalString.EndsWith("4") || e.Source.OriginalString.EndsWith("6"))
                {
                    var capacidade = (TextBox)this.FindName("capacidade_textbox");
                    capacidade.Text = "300";
                }
                else
                {
                    var capacidade = (TextBox)this.FindName("capacidade_textbox");
                    capacidade.Text = "150";
                }
            }
        }
コード例 #18
0
        private void _ctrl_SourceEvent(SourceEventArgs sourceEventArgs)
        {
            var row = (DataGridViewRow)sourceGrid.Rows[0].Clone();

            row.Cells[0].Value = sourceEventArgs.FSWname;
            row.Cells[1].Value = sourceEventArgs.TimeStamp.ToLongTimeString();
            row.Cells[2].Value = sourceEventArgs.EventType;
            row.Cells[3].Value = sourceEventArgs.Path;
            if (sourceGrid.InvokeRequired)
            {
                SetSourceEventCallback d = _ctrl_SourceEvent;
                Invoke(d, new object[] { sourceEventArgs });
            }
            else
            {
                sourceGrid.Rows.Insert(0, row);
            }
        }
コード例 #19
0
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            if (current_source != null && current_source.TrackModel != null)
            {
                current_source.TrackModel.Selection.Changed -= HandleSelectionChanged;
                current_source = null;
            }

            ITrackModelSource new_source = ActiveSource as ITrackModelSource;

            if (new_source != null)
            {
                new_source.TrackModel.Selection.Changed += HandleSelectionChanged;
                current_source = new_source;
            }

            Banshee.Base.ThreadAssist.ProxyToMain(UpdateActions);
        }
コード例 #20
0
        protected override void InputModule_NewSource(object sender, SourceEventArgs e)
        {
            // Since I'm a conveyor, if I am one of the multiple output modules of a module,
            // I could be receiving a notification for a Source that is not for me. I need to check.
            if (e.ReceivingModule != this)
            {
#if DEBUG_PRINT
                Debug.Log("[" + name + "] This Source is not for me.");
#endif
                return;
            }
#if DEBUG_PRINT
            Debug.Log("[" + name + "] received new source from " +
                      e.EmittingModule.name + ": " + e.IncomingSource.name);
#endif
            Source inputSource = e.IncomingSource;
            inputSource.SetCurrentParent(this, false, false);
            _sourcesOnConveyor.Enqueue(inputSource);
            _lastAddedSource = inputSource;
            _newSourceAdded  = true;
            DataChanged(GetStats());
        }
コード例 #21
0
ファイル: TrackActions.cs プロジェクト: thoja21/banshee-1
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            FilterFocused = false;

            if (current_source != null && current_source.TrackModel != null)
            {
                current_source.TrackModel.Reloaded          -= OnReloaded;
                current_source.TrackModel.Selection.Changed -= HandleSelectionChanged;
                current_source = null;
            }

            ITrackModelSource new_source = ActiveSource as ITrackModelSource;

            if (new_source != null)
            {
                new_source.TrackModel.Selection.Changed += HandleSelectionChanged;
                new_source.TrackModel.Reloaded          += OnReloaded;
                current_source = new_source;
                Selection      = new_source.TrackModel.Selection;
            }

            ThreadAssist.ProxyToMain(UpdateActions);
        }
コード例 #22
0
        protected override void InputModule_NewSource(object sender, SourceEventArgs e)
        {
            Source inputSource = e.IncomingSource;

            inputSource.SetCurrentParent(this);
            // if the Assembler takes the same type of input, put the source alternatively
            if (_sourceType1 == _sourceType2)
            {
                int x = queueSwitchCounter % 2;
                if (x == 0)
                {
                    _firstInputSourcesQueue.Enqueue(inputSource);
                }
                else
                {
                    _secondInputSourcesQueue.Enqueue(inputSource);
                }
                queueSwitchCounter++;
            }
            else
            {
                if (inputSource.Type == _sourceType1)
                {
                    _firstInputSourcesQueue.Enqueue(inputSource);
                }
                else if (inputSource.Type == _sourceType2)
                {
                    _secondInputSourcesQueue.Enqueue(inputSource);
                }
                else
                {
                    Debug.LogError("[" + name + "] not receiving the expected type of source: " + inputSource.name + " " + inputSource.Type);
                }
            }
            DataChanged(GetStats());
        }
コード例 #23
0
ファイル: Timeline.cs プロジェクト: kopffarben/audion.cscore
        private void _source_SourceEvent(object sender, SourceEventArgs e)
        {
            Dispatcher.BeginInvoke((Action) delegate
            {
                if (Source.Length > TimeSpan.Zero)
                {
                    if (progressLine != null)
                    {
                        // The source has data. Show various UI.
                        progressLine.Visibility = Visibility.Visible;
                    }
                }
                else
                {
                    if (progressLine != null)
                    {
                        // The source does not have data. Hide various UI.
                        progressLine.Visibility = Visibility.Collapsed;
                    }
                }

                UpdateTimeline();
            });
        }
コード例 #24
0
        private void OnActiveSourceChanged (SourceEventArgs args)
        {
            ThreadAssist.ProxyToMain (delegate {
                Source source = ServiceManager.SourceManager.ActiveSource;

                search_entry_align.Visible = view_container.SearchSensitive = source != null && source.CanSearch;

                if (source == null) {
                    return;
                }

                view_container.SearchEntry.Ready = false;
                view_container.SearchEntry.CancelSearch ();

                /* Translators: this is a verb (command), not a noun (things) */
                var msg = source.Properties.Get<string> ("SearchEntryDescription") ?? Catalog.GetString ("Search");
                view_container.SearchEntry.EmptyMessage = msg;
                view_container.SearchEntry.TooltipText = msg;

                if (source.FilterQuery != null) {
                    view_container.SearchEntry.Query = source.FilterQuery;
                    view_container.SearchEntry.ActivateFilter ((int)source.FilterType);
                }

                if (view_container.Content != null) {
                    view_container.Content.ResetSource ();
                }

                if (previous_track_model != null) {
                    previous_track_model.Reloaded -= HandleTrackModelReloaded;
                    previous_track_model = null;
                }

                if (source is ITrackModelSource) {
                    previous_track_model = (source as ITrackModelSource).TrackModel;
                    previous_track_model.Reloaded += HandleTrackModelReloaded;
                }

                if (previous_source != null) {
                    previous_source.Properties.PropertyChanged -= OnSourcePropertyChanged;
                }

                previous_source = source;
                previous_source.Properties.PropertyChanged += OnSourcePropertyChanged;

                UpdateSourceContents (source);

                UpdateSourceInformation ();
                view_container.SearchEntry.Ready = true;

                SetSimple (source.Properties.Get<bool> ("Nereid.SimpleUI"));
            });
        }
コード例 #25
0
 private void HandleActiveSourceChanged(SourceEventArgs args)
 {
     if (args.Source==music_library) {
         clutterflow_actions.Visible = true;
     } else {
         clutterflow_actions.Visible = false;
     }
 }
コード例 #26
0
 private void ModernTab_SelectedSourceChanged2(object sender, SourceEventArgs e)
 {
 }
コード例 #27
0
ファイル: DapSync.cs プロジェクト: pacificIT/banshee
 private void OnSourceRemoved(SourceEventArgs a)
 {
     RemoveLibrary (a.Source);
 }
コード例 #28
0
ファイル: ConnectedMessageBar.cs プロジェクト: knocte/banshee
        private void OnActiveSourceChanged(SourceEventArgs args)
        {
            if (source != null && source != args.Source) {
                source.MessageNotify -= OnSourceMessageNotify;
            }

            ConnectSource (args.Source);
        }
コード例 #29
0
ファイル: SourceActions.cs プロジェクト: gclark916/banshee
        private void HandleActiveSourceChanged (SourceEventArgs args)
        {
            ThreadAssist.ProxyToMain (delegate {
                UpdateActions ();

                if (last_source != null) {
                    last_source.Updated -= HandleActiveSourceUpdated;
                }

                if (ActiveSource != null) {
                    ActiveSource.Updated += HandleActiveSourceUpdated;
                }
            });
        }
コード例 #30
0
ファイル: DapService.cs プロジェクト: gclark916/banshee
 private void OnSourceRemoved (SourceEventArgs args)
 {
     DapSource dap_source = args.Source as DapSource;
     if (dap_source != null) {
         UnmapDevice (dap_source.Device.Uuid);
     }
 }
コード例 #31
0
 private void HandleActiveSourceChanged(SourceEventArgs args)
 {
     FilterView.PMButton.SetSilent (InPartyMode);
 }
コード例 #32
0
ファイル: MprisService.cs プロジェクト: mono-soc-2011/banshee
 private void OnSourceUpdated (SourceEventArgs args)
 {
     var source = args.Source as AbstractPlaylistSource;
     if (source != null) {
         player.HandlePlaylistChange (source);
     }
 }
コード例 #33
0
ファイル: MprisService.cs プロジェクト: mono-soc-2011/banshee
 private void OnSourceCountChanged (SourceEventArgs args)
 {
     if (args.Source is AbstractPlaylistSource) {
         player.AddPropertyChange (PlaylistProperties.PlaylistCount);
     }
 }
コード例 #34
0
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            artwork_manager = ServiceManager.Get<ArtworkManager> ();

            if (!artwork_manager.IsCachedSize (image_size)) {
                artwork_manager.AddCachedSize (image_size);
            }
            if (artwork_manager != null) {
                artwork_manager.ChangeCacheSize (ImageSize, GetAllAlbumsCount () + 3);
            }

            artwork_initialized = true;

            ServiceManager.SourceManager.ActiveSourceChanged -= HandleActiveSourceChanged;
        }
コード例 #35
0
 void HandleActiveSourceChanged(SourceEventArgs args)
 {
     column_cell_rating.ReadOnly = !args.Source.HasEditableTrackProperties;
 }
コード例 #36
0
 private void OnActiveSourceChanged (SourceEventArgs args)
 {
     ThreadAssist.ProxyToMain (OnActiveSourceChangedGui);
 }
コード例 #37
0
 private void OnSourceUpdated(SourceEventArgs args)
 {
     Banshee.ServiceStack.Application.Invoke (delegate {
         UpdateSources ();
     });
 }
コード例 #38
0
 private void OnSourceChildSourceAdded (SourceEventArgs args)
 {
     ThreadAssist.ProxyToMain (delegate {
         AddSource (args.Source, FindSource (args.Source.Parent));
     });
 }
コード例 #39
0
 private void OnSourceUpdated (SourceEventArgs args)
 {
     OnUpdated (null, null);
 }
コード例 #40
0
        private void ModernTab_SelectedSourceChanged3(object sender, SourceEventArgs e)
        {
            var cinemas_list = (ModernTab)this.FindName("cinemas_list");
            var filmes_list  = (ModernTab)this.FindName("filmes_list");

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Alvaláxia"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "1";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "2";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Alvaláxia"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "5";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "6";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "7";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Alvaláxia"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "1";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "2";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "5";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "6";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Vasco da Gama"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "1";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "2";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "5";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Algarve Shopping"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "2";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "5";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "6";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Viana Shopping"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "6";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Glicínias Plaza"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "1";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "2";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                }
            }
            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Leiria Shopping"))
            {
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "3";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "4";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "5";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                }
                if (filmes_list.SelectedSource.OriginalString.EndsWith("O Livro da Selva"))
                {
                    if (e.Source.OriginalString.EndsWith("Normal"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("3D"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "-";
                    }
                    if (e.Source.OriginalString.EndsWith("IMAX"))
                    {
                        var result = (TextBox)this.FindName("salas_textbox");
                        result.Text = "6";
                    }
                }
            }
        }
コード例 #41
0
ファイル: LibrarySyncOptions.cs プロジェクト: knocte/banshee
 private void OnChildSourceAdded(SourceEventArgs args)
 {
     AddPlaylist (args.Source);
 }
コード例 #42
0
 private void OnSourceRemoved(SourceEventArgs args)
 {
     UnmonitorLibrary (args.Source as LibrarySource);
 }
コード例 #43
0
ファイル: PodcastActions.cs プロジェクト: dufoli/banshee
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            if (last_source != null) {
                foreach (IFilterListModel filter in last_source.AvailableFilters) {
                    filter.Selection.Changed -= OnSelectionChanged;
                }
                last_source.TrackModel.Selection.Changed -= OnSelectionChanged;
                last_source = null;
            }

            last_source = args.Source as DatabaseSource;
            if (IsPodcastSource) {
                if (last_source != null) {
                    foreach (IFilterListModel filter in last_source.AvailableFilters) {
                        filter.Selection.Changed += OnSelectionChanged;
                    }
                    last_source.TrackModel.Selection.Changed += OnSelectionChanged;
                }
            } else {
                last_source = null;
            }

            OnSelectionChanged (null, null);
        }
コード例 #44
0
        private void ModernTab_SelectedSourceChanged2(object sender, SourceEventArgs e)
        {
            var cinemas_list = (ModernTab)this.FindName("cinemas_list");

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Vasco da Gama"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "1, 2";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3, 4";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "5";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Algarve Shopping"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "2, 3";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "4";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "5, 6";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Alvaláxia"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "1, 2";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "4";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Colombo"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "4, 5";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "6, 7";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Dolce Vita Porto"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "1, 2";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "5";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "6";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Viana Shopping"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "4, 5";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "6";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Glicínias Plaza"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "1";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "2";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3, 4";
                }
            }

            if (cinemas_list.SelectedSource.OriginalString.EndsWith("Leiria Shopping"))
            {
                if (e.Source.OriginalString.EndsWith("Má Vizinhança 2"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "3, 4";
                }
                if (e.Source.OriginalString.EndsWith("Um Dia de Mãe"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "5";
                }
                if (e.Source.OriginalString.EndsWith("O Livro da Selva"))
                {
                    var result = (TextBox)this.FindName("salas_textbox");
                    result.Text = "6";
                }
            }
        }
コード例 #45
0
ファイル: DapSync.cs プロジェクト: pacificIT/banshee
 private void OnSourceAdded(SourceEventArgs a)
 {
     AddLibrary (a.Source, true);
 }
コード例 #46
0
ファイル: CategorySourceView.cs プロジェクト: abock/cubano
 private void OnSourceUpdated(SourceEventArgs args)
 {
     Banshee.Base.ThreadAssist.ProxyToMain (delegate {
         UpdateSources ();
     });
 }
コード例 #47
0
ファイル: CubanoWindow.cs プロジェクト: abock/cubano
        private void OnActiveSourceChanged(SourceEventArgs args)
        {
            Banshee.Base.ThreadAssist.ProxyToMain (delegate {
                Source source = ServiceManager.SourceManager.ActiveSource;

                header.SearchEntry.SearchSensitive = source != null && source.CanSearch;

                if (source == null) {
                    return;
                }

                header.SearchEntry.Entry.Ready = false;
                header.SearchEntry.Entry.CancelSearch ();

                if (source.FilterQuery != null) {
                    header.SearchEntry.Entry.Query = source.FilterQuery;
                    header.SearchEntry.Entry.ActivateFilter ((int)source.FilterType);
                }

                if (view_container.Content != null) {
                    view_container.Content.ResetSource ();
                }

                if (previous_track_model != null) {
                    previous_track_model.Reloaded -= HandleTrackModelReloaded;
                    previous_track_model = null;
                }

                if (source is ITrackModelSource) {
                    previous_track_model = (source as ITrackModelSource).TrackModel;
                    previous_track_model.Reloaded += HandleTrackModelReloaded;
                }

                if (previous_source != null) {
                    previous_source.Properties.PropertyChanged -= OnSourcePropertyChanged;
                }

                UpdateSourceHistory (previous_source, source);

                previous_source = source;
                previous_source.Properties.PropertyChanged += OnSourcePropertyChanged;

                UpdateSourceContents (source);

                UpdateSourceInformation ();
                header.SearchEntry.Entry.Ready = true;
            });
        }
 private void HandleActiveSourceChanged(SourceEventArgs args)
 {
     UpdateActions ();
 }
コード例 #49
0
 private void OnSourceUpdated(SourceEventArgs args)
 {
     OnUpdated(null, null);
 }
コード例 #50
0
ファイル: BansheeMetrics.cs プロジェクト: thoja21/banshee-1
 private void OnActiveSourceChanged(SourceEventArgs args)
 {
     active_source_changed.PushSample(GetSourceString(ServiceManager.SourceManager.ActiveSource));
 }
コード例 #51
0
 private void OnActiveSourceChanged (SourceEventArgs args)
 {
     active_source_changed.PushSample (GetSourceString (ServiceManager.SourceManager.ActiveSource));
 }
コード例 #52
0
 private void OnActiveSourceChanged(SourceEventArgs args)
 {
     ThreadAssist.ProxyToMain(OnActiveSourceChangedGui);
 }
コード例 #53
0
 private void OnSourceUpdated (SourceEventArgs args)
 {
     if (args.Source == ServiceManager.SourceManager.ActiveSource) {
         ThreadAssist.ProxyToMain (delegate {
             UpdateSourceInformation ();
         });
     }
 }
コード例 #54
0
 private void HandleActiveSourceChanged(SourceEventArgs args)
 {
     FilterView.PMButton.SetSilent(InPartyMode);
 }
コード例 #55
0
 private void OnSourceChildSourceRemoved (SourceEventArgs args)
 {
     ThreadAssist.ProxyToMain (delegate {
         RemoveSource (args.Source);
     });
 }
コード例 #56
0
ファイル: SourceModel.cs プロジェクト: SyaskiMasyaski/banshee
 private void OnSourceChildSourceAdded(SourceEventArgs args)
 {
     Banshee.Base.ThreadAssist.ProxyToMain(delegate {
         AddSource(args.Source, FindSource(args.Source.Parent));
     });
 }
コード例 #57
0
ファイル: TrackActions.cs プロジェクト: kelsieflynn/banshee
        private void HandleActiveSourceChanged(SourceEventArgs args)
        {
            FilterFocused = false;

            if (current_source != null && current_source.TrackModel != null) {
                current_source.TrackModel.Reloaded -= OnReloaded;
                current_source.TrackModel.Selection.Changed -= HandleSelectionChanged;
                current_source = null;
            }

            ITrackModelSource new_source = ActiveSource as ITrackModelSource;
            if (new_source != null) {
                new_source.TrackModel.Selection.Changed += HandleSelectionChanged;
                new_source.TrackModel.Reloaded += OnReloaded;
                current_source = new_source;
                Selection = new_source.TrackModel.Selection;
            }

            ThreadAssist.ProxyToMain (UpdateActions);
        }
コード例 #58
0
ファイル: SourceModel.cs プロジェクト: SyaskiMasyaski/banshee
 private void OnSourceRemoved(SourceEventArgs args)
 {
     Banshee.Base.ThreadAssist.ProxyToMain(delegate {
         RemoveSource(args.Source);
     });
 }
コード例 #59
0
 private void OnSourceUpdated (SourceEventArgs args)
 {
     if (ServiceManager.SourceManager.ActiveSource is PlayQueueSource) {
         this["AddToPlayQueueAfterAction"].Visible = false;
     } else {
         this["AddToPlayQueueAfterAction"].Visible = true;
     }
     
     OnUpdated (null, null);
 }
コード例 #60
0
ファイル: LibrarySyncOptions.cs プロジェクト: knocte/banshee
 private void OnChildSourceRemoved(SourceEventArgs args)
 {
     RemovePlaylist (args.Source, false);
 }