public PopularChannelCard( ChannelView channel, GestureTapCallback onTap = null, Key key = null ) : base(key: key) { this.channel = channel; this.onTap = onTap; }
public void updateNormalChannelLite(NormalChannelLite channel) { if (!this.channelDict.TryGetValue(key: channel.id, out var channelView)) { this.channelDict[key : channel.id] = ChannelView.fromNormalChannelLite(channel : channel); return; } channelView.updateFromNormalChannelLite(channel: channel); }
public void updateChannel(Channel channel) { if (!this.channelDict.TryGetValue(key: channel.id, out var channelView)) { this.channelDict[key : channel.id] = ChannelView.fromChannel(channel : channel); return; } channelView.updateFromChannel(channel: channel); }
public ImageController(BaseView bv, ChannelView cv, HistogramView hv) { imageModel = new ImageModel(); baseView = bv; channelView = cv; channelView.setImageModel(this.imageModel); histogramView = hv; undoBuffer = new ImageBuffer(); redoBuffer = new ImageBuffer(); }
public DiscoverChannelCard( ChannelView channel, GestureTapCallback onTap = null, GestureTapCallback joinChannel = null, Key key = null ) : base(key: key) { this.channel = channel; this.onTap = onTap; this.joinChannel = joinChannel; }
public override Widget build(BuildContext context) { return(new StoreConnector <AppState, MessengerScreenViewModel>( converter: state => { var joinedChannels = state.channelState.joinedChannels.Select( channelId => { ChannelView channel = state.channelState.channelDict[key: channelId]; channel.isTop = state.channelState.channelTop.TryGetValue(key: channelId, out var isTop) && isTop; return channel; }).ToList();
public JoinedChannelCard( ChannelView channel, string myUserId = null, GestureTapCallback onTap = null, Key key = null ) : base(key: key) { this.channel = channel; this.myUserId = myUserId; this.onTap = onTap; }
public override Widget build(BuildContext context) { return(new StoreConnector <AppState, ChannelShareScreenViewModel>( converter: state => { ChannelView channel = !state.channelState.channelDict.ContainsKey(this.channelId) ? ChannelView.fromChannel(new Channel()) : state.channelState.channelDict[this.channelId]; channel.isTop = state.channelState.channelTop.TryGetValue(key: this.channelId, out var isTop) && isTop; return new ChannelShareScreenViewModel { channel = channel }; },
private void OnChannelsCllectionChangedHandle(object sender, NotifyCollectionChangedEventArgs args) { #region ChannelView switch (args.Action) { case NotifyCollectionChangedAction.Add: { foreach (var item in args.NewItems) { var channel = item as Channel; if (null != channel) { var channelView = new ChannelView(channel); channelViews.Add(channel.ChannelID, channelView); pnlView.Controls.Add(channelView); } } } break; case NotifyCollectionChangedAction.Remove: { foreach (var item in args.OldItems) { var channel = item as Channel; if (channelViews.ContainsKey(channel.ChannelID)) { var channelView = channelViews[channel.ChannelID]; if (null != channelView) { pnlView.Controls.Remove(channelView); channelView.Dispose(); } channelViews.Remove(channel.ChannelID); } } } break; case NotifyCollectionChangedAction.Reset: break; case NotifyCollectionChangedAction.Move: break; case NotifyCollectionChangedAction.Replace: break; } #endregion ViewRender(); }
public override Widget build(BuildContext context) { return(new StoreConnector <AppState, ChannelDetailScreenViewModel>( converter: state => { ChannelView channel = !state.channelState.channelDict.ContainsKey(this.channelId) ? ChannelView.fromChannel(new Channel()) : state.channelState.channelDict[this.channelId]; channel.isTop = state.channelState.channelTop.TryGetValue(key: this.channelId, out var isTop) && isTop; return new ChannelDetailScreenViewModel { channel = channel, members = channel.memberIds.Select( memberId => channel.membersDict[key: memberId] ).ToList() }; },
private void Create() { Channel m = new Channel(); //实例化一个新的model ChannelEditViewModel evm = new ChannelEditViewModel(m, _testerService.Items); //实例化一个新的view model evm.DisplayName = "Channel-Create"; evm.commandType = CommandType.Create; var ChannelViewInstance = new ChannelView(); //实例化一个新的view ChannelViewInstance.DataContext = evm; ChannelViewInstance.ShowDialog(); //设置viewmodel属性 if (evm.IsOK == true) { _channelService.SuperAdd(m); } }
private void ContentControl_Load(object sender, EventArgs e) { _channelView = new ChannelView <TChannel, TTrack>(); _eventView = new EventView <Event>(); // check network status UpdateNetworkStatus(NetworkInterface.GetIsNetworkAvailable()); Task.Factory.StartNew(BindEvents); // local properties RefreshPlaylistButton.Image = P.Resources.icon_repeat; ViewEventsSplitButton.Image = P.Resources.icon_calendar; ViewPlaylistsSplitButton.Image = P.Resources.icon_web; SortPlaylistSplitButton.Image = P.Resources.icon_sort; PlayerTypeSplitButton.Image = P.Resources.icon_sound.ToBitmap(); OptionsButton.Image = P.Resources.icon_options; ExceptionStatusMessage.Image = P.Resources.icon_warning; MainNotifyIcon.Icon = P.Resources.DIIconOld; // SWITCH DYNAMICALLY BASED ON CHANNEL LISTENING TO MainNotifyIcon.ContextMenuStrip = ChannelsContextMenu; MainNotifyIcon.Text = P.Resources.ApplicationTitle; RefreshCounterLabel.Text = P.Resources.PlaylistRefreshText; _refreshCounter.Stop(); ViewPlaylistsSplitButton.DropDown = PlaylistsContextMenu; SortPlaylistSplitButton.DropDown = SortContextMenu; PlayerTypeSplitButton.DropDown = PlayersContextMenu; PlayerTypeSplitButton.Text = Components.Utilities.SplitName(Settings.Default.PlayerType); FeedbackButton.ToolTipText = P.Resources.SupportPageUrl; // memory counter //System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); //t.Interval = 1000; //t.Start(); //t.Tick += (s, ea) => //{ // MemoryStatus.Text = string.Format("{0} {1}", ((long)Process.GetCurrentProcess(). / 1024).ToString(), "KB"); //}; // end }
private void SaveAs() { Channel m = new Channel(); //实例化一个新的model ChannelEditViewModel evm = new ChannelEditViewModel(m, _testerService.Items); //实例化一个新的view model evm.Name = _selectedItem.Name; //evm.Tester = _selectedItem.Tester; evm.Tester = evm.AllTesters.SingleOrDefault(i => i.Id == _selectedItem.Tester.Id); //所以改用Id来找到List里的item evm.AssetUseCount = _selectedItem.AssetUseCount; evm.DisplayName = "Channel-Save As"; evm.commandType = CommandType.SaveAs; var ChannelViewInstance = new ChannelView(); //实例化一个新的view ChannelViewInstance.DataContext = evm; ChannelViewInstance.ShowDialog(); if (evm.IsOK == true) { _channelService.SuperAdd(m); } }
public void UpdateCell(Channel channel) { if(channel == Channel) return; Channel = channel; if(ChannelView == null) ChannelView = new ChannelView(); ChannelView.Update(Channel); this.ContentView.AddSubview(ChannelView); SetNeedsDisplay (); }
public FavoritesForm(ChannelView <TChannel, TTrack> channelView) { InitializeComponent(); _channelView = channelView; }