Exemplo n.º 1
0
        public SubscriptionHamburgerMenuViewModel(int MainwindowHeight,
                                                  int MainwinndowWidth,
                                                  DataBaseAccess inDataBaseAccess,
                                                  YoutubeApiService inYoutubeApiService)
            : base(inDataBaseAccess, inYoutubeApiService)
        {
            model = new SubscriptionMenuModel(inDataBaseAccess, inYoutubeApiService);;

            //コントロールの初期化
            Height = MainwindowHeight - 20;
            Width  = MainwinndowWidth;
            SubScriptionMenuHeight    = Height;
            SubScriptionMenuWidth     = 280;
            VideoListPanelHeight      = Height;
            VideoListPanelWidth       = 700;
            VideoListPanelMargin      = new Thickness(48, 0, 0, 0);
            IsPaneOpen                = false;
            IsVideoListProgressActive = false;
            //MenuItemの生成
            Items = new ObservableSynchronizedCollection <HamburgerMenuImageItem>();
            BindingOperations.EnableCollectionSynchronization(Items, new object());

            VideoListItems = new ObservableSynchronizedCollection <VideoListItem>();
            BindingOperations.EnableCollectionSynchronization(VideoListItems, new object());

            //動画情報のウィンドウ
            VideoInfo = new VideoInfoViewModel();
            InitializeMenuItem();

            VideoItem = new VideoItemViewModel();
        }
Exemplo n.º 2
0
        //VideoInfoViewModel VideoInfo;

        /// <summary>
        /// デザイナ用引数なしコンストラクタ
        /// </summary>
        public SubscriptionHamburgerMenuViewModel()
        {
            model = new SubscriptionMenuModel();
            //コントロールの初期化
            Height = 580;            //windowタイトルを除いた高さ
            Width  = 900;
            SubScriptionMenuHeight = Height;
            SubScriptionMenuWidth  = 280;
            VideoListPanelHeight   = Height;
            VideoListPanelWidth    = 700;
            VideoListPanelMargin   = new Thickness(48, 0, 0, 0);

            IsPaneOpen = false;

            Items = new ObservableSynchronizedCollection <HamburgerMenuImageItem>();

            VideoListItems = new ObservableSynchronizedCollection <VideoListItem>();

            VideoListItems.Add(AddVideoItems("item1", @"C:\Users\03dai\source\repos\YoutubeLiveBrowser\YoutubeLiveBrowser\YoutubeLiveBrowser\bin\Debug\zui.jpg"));
            VideoListItems.Add(AddVideoItems("item1", @"C:\Users\03dai\source\repos\YoutubeLiveBrowser\YoutubeLiveBrowser\YoutubeLiveBrowser\bin\Debug\zui.jpg"));


            VideoInfo = new VideoInfoViewModel();
            //for (int i = 0; i < 20;i++)
            //{
            //	VideoListItems2.Add(AddVideoItems());
            //	//VideoListItems.Add(AddTile());
            //}
        }