// GET /Channel/ChannelList
        public ActionResult ChannelList()
        {
            var channels = new List <Channel>
            {
                new Channel {
                    Id = 1, Name = "Test Channel 1", Posts = new List <Post>()
                }
            };
            var posts = new List <Post>
            {
                new Post {
                    Id = 1, Message = "This is test message 1", PostTime = DateTime.Now
                },
                new Post {
                    Id = 2, Message = "This is test message 2", PostTime = DateTime.Now
                }
            };

            var viewModel = new ChannelListViewModel
            {
                Channel = channels,
                Posts   = posts
            };

            return(View(viewModel));
        }
        internal PeerCastAppViewModel(PeerCastApplication application)
        {
            this.application = application;
            var peerCast = application.PeerCast;

            channelList = new ChannelListViewModel(peerCast);
            peerCast.AddChannelMonitor(this);
        }
        internal PeerCastAppViewModel(PeerCastApplication application)
        {
            this.application = application;
            settings         = application.Settings.Get <WPFSettings>();
            var peerCast = application.PeerCast;

            channelList = new ChannelListViewModel(peerCast);
            peerCast.AddChannelMonitor(this);
            WindowTitle = CreateWindowTitle();
        }
        internal PeerCastAppViewModel(PeerCastApplication application)
        {
            this.application = application;
            var peerCast = application.PeerCast;

            channelList = new ChannelListViewModel(peerCast);
            setting     = new SettingViewModel(application);

            peerCast.ChannelAdded   += OnChannelChanged;
            peerCast.ChannelRemoved += OnChannelChanged;
        }
        // GET /Channel/Post
        public ActionResult Posts()
        {
            var posts = new List <Post>
            {
                new Post {
                    Id = 1, Message = "This is test message 1", PostTime = DateTime.Now
                },
                new Post {
                    Id = 2, Message = "This is test message 2", PostTime = DateTime.Now
                }
            };

            var viewModel = new ChannelListViewModel
            {
                Posts = posts
            };

            return(View(viewModel));
        }
Esempio n. 6
0
        public ChannelPage()
        {
            InitializeComponent();

            this.Loaded += ChannelPage_Loaded;

            _channelViewModel = new ChannelListViewModel();

            _channelFactory = new ChannelListFactory();
            _channelFactory.HttpSucessHandler += channelFactory_GetChannelsByListSucceed;
            _channelFactory.HttpFailorTimeOut  = http_FailorTimeOut;

            _tagFactory = new TagFactory();
            _tagFactory.HttpSucessHandler += tagFactory_GetTagsSucceed;
            _tagFactory.HttpFailorTimeOut  = http_FailorTimeOut;

            channelList.ItemsSource           = _channelViewModel;
            channelTagControl.TagChanged     += OnTagChanged;
            channelOrderControl.OrderChanged += OnTagChanged;
            channelSelectedControl.SetSource(channelTagControl);
        }
Esempio n. 7
0
        public ChannelPage()
        {
            InitializeComponent();

            this.Loaded += ChannelPage_Loaded;

            _channelViewModel = new ChannelListViewModel();

            _channelFactory = new ChannelListFactory();
            _channelFactory.HttpSucessHandler += channelFactory_GetChannelsByListSucceed;
            _channelFactory.HttpFailorTimeOut = http_FailorTimeOut;

            _tagFactory = new TagFactory();
            _tagFactory.HttpSucessHandler += tagFactory_GetTagsSucceed;
            _tagFactory.HttpFailorTimeOut = http_FailorTimeOut;

            channelList.ItemsSource = _channelViewModel;
            channelTagControl.TagChanged += OnTagChanged;
            channelOrderControl.OrderChanged += OnTagChanged;
            channelSelectedControl.SetSource(channelTagControl);
        }
Esempio n. 8
0
        public ChannelPage()
        {
            this.InitializeComponent();

            this.Loaded += load_Handler;
            snapChannelListView.LayoutUpdated += load_Handler;
            this.NavigationCacheMode           = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;

            _channelViewModel              = new ChannelListViewModel();
            _channelViewModel.Groups       = new ObservableCollection <ChannelListGroup>();
            this.DefaultViewModel["Items"] = _channelViewModel.Groups;

            _channelFactory = new ChannelListFactory();
            _channelFactory.HttpSucessHandler += channelFactory_GetChannelsByListSucceed;
            _channelFactory.HttpFailorTimeOut  = http_FailorTimeOut;

            _tagFactory = new TagFactory();
            _tagFactory.HttpSucessHandler += tagFactory_GetTagsSucceed;
            _tagFactory.HttpFailorTimeOut  = http_FailorTimeOut;
            tagBar.TagChanged             += OnTagChanged;
        }
Esempio n. 9
0
        public ChannelPage()
        {
            this.InitializeComponent();

            this.Loaded += load_Handler;
            snapChannelListView.LayoutUpdated += load_Handler;
            this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;

            _channelViewModel = new ChannelListViewModel();
            _channelViewModel.Groups = new ObservableCollection<ChannelListGroup>();
            this.DefaultViewModel["Items"] = _channelViewModel.Groups;

            _channelFactory = new ChannelListFactory();
            _channelFactory.HttpSucessHandler += channelFactory_GetChannelsByListSucceed;
            _channelFactory.HttpFailorTimeOut = http_FailorTimeOut;

            _tagFactory = new TagFactory();
            _tagFactory.HttpSucessHandler += tagFactory_GetTagsSucceed;
            _tagFactory.HttpFailorTimeOut = http_FailorTimeOut;
            tagBar.TagChanged += OnTagChanged;
        }
Esempio n. 10
0
        private void LoadViewModels()
        {
            ResultViewModelProperty = new ResultViewModel();
            OriginalChannelListViewModelProperty = new ChannelListViewModel();
            CompareChannelListViewModelProperty  = new ChannelListViewModel();

            CompareDirectoryProperty  = Settings.Default.ComparissonFilesDirectory;
            OriginalDirectoryProperty = Settings.Default.OriginalsFileDirectory;

            IsDssTableExplorerProperty = true;
            IsSTBScannerProperty       = false;
            IsGCTProperty = false;

            RaisePropertyChanged("ResultViewModelProperty");
            RaisePropertyChanged("OriginalChannelListViewModelProperty");
            RaisePropertyChanged("CompareChannelListViewModelProperty");

            RaisePropertyChanged("CompareDirectoryProperty");
            RaisePropertyChanged("OriginalDirectoryProperty");

            RaisePropertyChanged("IsDssTableExplorerProperty");
            RaisePropertyChanged("IsSTBScannerProperty");
            RaisePropertyChanged("IsGCTProperty");
        }
 public ChannelListView(ChannelListViewModel viewModel)
     : this()
 {
     this.DataContext = viewModel;
 }
Esempio n. 12
0
 public ChannelListPage()
 {
     InitializeComponent();
     BindingContext = new ChannelListViewModel(Navigation);
 }