Esempio n. 1
0
        private void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (VisualTreeExtensions.FindParent <DataGridRow>(e.OriginalSource as DependencyObject) != null)
            {
                AlbumListItem item = dataGrid.SelectedItem as AlbumListItem;
                if (item != null)
                {
                    switch (CurrentViewMode)
                    {
                    case CurrentViewMode.MediumTable:
                    {
                        ChangeViewCommandParameters changeViewParams = new ChangeViewCommandParameters();
                        changeViewParams.ViewMode = MainControls.CurrentViewMode.AlbumTable;

                        Big3.Hitbase.DataBaseEngine.Condition condition = new Big3.Hitbase.DataBaseEngine.Condition();
                        condition.Add(new SingleCondition(Field.Medium, Operator.Equal, item.Title));
                        changeViewParams.Condition = condition;

                        CatalogViewCommands.ChangeView.Execute(changeViewParams, this);
                        break;
                    }
                    }
                }
            }
        }
Esempio n. 2
0
        private void CommandChangeView_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            ChangeViewCommandParameters changeViewParams = e.Parameter as ChangeViewCommandParameters;

            CurrentViewMode = changeViewParams.ViewMode;
            ConditionFilter = changeViewParams.Condition;
            FillList();
        }