public FilterCriteriaViewModel(int id, string name, VideoPlayerViewModel viewModel)
 {
     this.id        = id;
     Name           = name;
     IsChecked      = false;
     this.viewModel = viewModel;
 }
Ejemplo n.º 2
0
 public FilterCriteriaViewModel(int id, string name, VideoPlayerViewModel viewModel)
 {
     this.id = id;
     Name = name;
     IsChecked = false;
     this.viewModel = viewModel;
 }
Ejemplo n.º 3
0
 public FilterViewModel(int columnId, string columnName, SortType sortType, BindableCollection<FilterCriteriaViewModel> filterCriteria, VideoPlayerViewModel viewModel)
 {
     this.columnId = columnId;
     this.ColumnHeaderName = columnName;
     this.sortType = sortType;
     this.filterCriteria = filterCriteria;
     this.viewModel = viewModel;
     IsAscendingChecked = false;
     IsDescendingChecked = false;
     IsNoneChecked = true;
     ApplyButtonVisibility = "Visible";
     RemoveButtonVisibility = "Collapsed";
     CloseButtonVisibility = "Visible";
 }
Ejemplo n.º 4
0
 public FilterViewModel(int columnId, string columnName, SortType sortType, BindableCollection <FilterCriteriaViewModel> filterCriteria, VideoPlayerViewModel viewModel)
 {
     this.columnId          = columnId;
     this.ColumnHeaderName  = columnName;
     this.sortType          = sortType;
     this.filterCriteria    = filterCriteria;
     this.viewModel         = viewModel;
     IsAscendingChecked     = false;
     IsDescendingChecked    = false;
     IsNoneChecked          = true;
     ApplyButtonVisibility  = "Visible";
     RemoveButtonVisibility = "Collapsed";
     CloseButtonVisibility  = "Visible";
 }
Ejemplo n.º 5
0
        private void initializeGrid(VideoPlayerViewModel vm)
        {
            Playlist playlist = vm.Parameter.playlist;
            double screenWidth = Window.Current.Bounds.Width;
            string[] displayColumns = playlist.displayColumns;
            var template = @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""> <Grid MinWidth='" + screenWidth + "'> <Grid.ColumnDefinitions> @ </Grid.ColumnDefinitions> % </Grid> </DataTemplate>";
            string columnDefinitions = "";
            string rowText = "";
            if (displayColumns != null)
            {
                for (int i = 0; i < displayColumns.Length; i++)
                {
                    ColumnDefinition col = new ColumnDefinition();
                    col.Width = new GridLength(130);
                    gridHeaders.ColumnDefinitions.Add(col);
                    columnDefinitions += String.Format(@"<ColumnDefinition Width=""{0}"" /> ", COLUMN_WIDTH);
                    rowText = rowText + @"<TextBlock Grid.Column=""X"" HorizontalAlignment = ""Center"" TextWrapping=""NoWrap"" VerticalAlignment=""Center"" Text =""{Binding Path=breakDownData[X]}""/>".Replace("X", i.ToString());
                    Border b = new Border();
                    b.BorderBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0, 0, 0));
                    b.BorderThickness = new Thickness(0, 0, 2, 0);
                    TextBlock t = new TextBlock();
                    Run text = new Run();
                    vm.GridHeadersTextSorted.Add(trimHeaderText(displayColumns[i], true));
                    vm.GridHeadersTextUnsorted.Add(trimHeaderText(displayColumns[i], false));
                    text.Text = vm.GridHeadersTextUnsorted.Last();
                    t.Inlines.Add(text);
                    b.SetValue(Grid.RowProperty, 0);
                    b.SetValue(Grid.ColumnProperty, i);
                    t.Style = (Style)Application.Current.Resources["VideoPlayer_TextBlockStyle_GridHeader"];

                    t.Tag = i;
                    t.PointerReleased += columnHeaderClick;

                    b.Child = t;
                    t.FontSize = GRID_HEADER_FONT_SIZE;
                    gridHeaders.Children.Add(b);
                }
            }
            template = template.Replace("@", columnDefinitions).Replace("%", rowText);

            var dt = (DataTemplate)XamlReader.Load(template);
            FilteredClips.ItemTemplate = dt;
        }
Ejemplo n.º 6
0
        private void initializeClipDataBar(VideoPlayerViewModel vm)
        {
            int i = 0;
            foreach (var header in vm.GridHeaders)
            {
                TextBlock textBlock_title = (TextBlock)XamlReader.Load(@"<TextBlock xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" Margin=""20,0,5,0"" FontWeight=""Bold"" Foreground=""{StaticResource HudlMediumGray}"" FontSize=""22"" Text=""{Binding GridHeaders[X]}""/>".Replace("X", i.ToString()));
                TextBlock textBlock_data = (TextBlock)XamlReader.Load(@"<TextBlock xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" DataContext=""{Binding SelectedClip}"" Margin=""5,0,10,0"" Foreground=""{StaticResource HudlMediumGray}"" FontSize=""22"" Text=""{Binding Path=breakDownData[X]}""/>".Replace("X", i.ToString()));
                ClipDataText.Children.Add(textBlock_title);
                ClipDataText.Children.Add(textBlock_data);

                i++;
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            videoMediaElement.Width = Window.Current.Bounds.Width;
            videoMediaElement.Height = Window.Current.Bounds.Height;
            videoPlayerViewModel = (VideoPlayerViewModel)this.DataContext;
            videoPlayerViewModel.GridHeadersTextSorted = new List<string>();
            videoPlayerViewModel.GridHeadersTextUnsorted = new List<string>();
            initializeGrid(videoPlayerViewModel);
            initializeClipDataBar(videoPlayerViewModel);
            controlsFaded = false;

            videoPlayerViewModel.listView = FilteredClips;
            videoPlayerViewModel.SortFilterPopupControl = SortFilterPopup;
            videoPlayerViewModel.ColumnHeaderTextBlocks = gridHeaders.Children.Select(border => (TextBlock)((Border)border).Child).ToList<TextBlock>();
            videoPlayerViewModel.setVideoMediaElement(videoMediaElement);
            videoPlayerViewModel.TopAppBar = TopAppBar;
            videoPlayerViewModel.BottomAppBar = BottomAppBar;
        }
Ejemplo n.º 8
0
 public AngleType(string name, VideoPlayerViewModel vm)
 {
     Name = name;
     IsChecked = true;
     CheckBoxEnabled = true;
     viewModel = vm;
 }