private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { //查看视频 VideoWindow v = new VideoWindow(Obj.SelectedAreaID); v.Show(); }
private void mainContainer_Click(object sender, RoutedEventArgs e) { VideoWindow videoView = new VideoWindow() { VideoID = VideoID }; videoView.Show(); }
/// <summary> /// 历史监测记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void itemVideo_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; if (item != null && item.Tag != null) { string AreaId = item.Tag.ToString(); VideoWindow v = new VideoWindow(AreaId); v.Show(); } }
public void ShowVideoWindow() { try { VideoIPField.Clear(); VideoPortField.Clear(); VideoUIDField.Clear(); VideoPwdField.Clear(); VideoStatusBar.ClearStatus(); VideoWindow.Title = "云视讯设置"; var parms = new BUser().GetSysParams(30000001); if (parms.Count > 0) { var param1 = parms.Find(p => p.ParaData == 0); if (param1 != null) { VideoIPField.Text = param1.ParaDisplay; } var param2 = parms.Find(p => p.ParaData == 1); if (param2 != null) { VideoPortField.Text = param2.ParaDisplay; } var param3 = parms.Find(p => p.ParaData == 2); if (param3 != null) { VideoUIDField.Text = param3.ParaDisplay; } var param4 = parms.Find(p => p.ParaData == 3); if (param4 != null) { VideoPwdField.Text = param4.ParaDisplay; } } VideoWindow.Show(); } catch (Exception err) { WebUtility.WriteLog(EnmSysLogLevel.Error, EnmSysLogType.Exception, err.ToString(), Page.User.Identity.Name); WebUtility.ShowMessage(EnmErrType.Error, err.Message); } }
private void initializeVlcPlayerControl(bool showVideoWindow) { try { initializeVideoWindow(); // if (showVideoWindow) { videoWindow.Show(); } // if (!videoWindow.VlcPlayerControl.IsInitialized) { videoWindow.VlcPlayerControl.Initialize(this); } } catch (Exception erd) { gCls.show_error(erd.Message.ToString()); return; } }
private void OpenImage() { ClientTweet tweet = selectTweet; if (tweet == null) { return; } if (tweet.originalTweet == null) { return; } if (tweet.isMedia == false) { return; } string url = string.Empty; foreach (ClientMedia item in tweet.dicPhoto.Values) { if (item.type == "photo") { url = item.display_url; ImageWindow win = new ImageWindow(tweet, url); win.Show(); break; } } for (int i = 0; i < tweet.mediaEntities.media.Count; i++) { if (tweet.mediaEntities.media[i].type == "animated_gif" || tweet.mediaEntities.media[i].type == "video") { VideoWindow win = new VideoWindow(tweet); win.Show(); break; } } }
protected override void OnClick() { base.OnClick(); if (IsPopupVideo && !_videoShown) { if (_fromURL) { _player.Play(ClipName); } else { _player.Play(Clip); } _videoWindow.Show(); _videoShown = true; } else { NavigationMap.MoveToRoom(Id); } }
private void contextClick_Video(object sender, RoutedEventArgs e) { ClientTweet tweet = selectTweet; if (tweet == null) { return; } MenuItem item = sender as MenuItem; if (item == null) { return; } string url = item.Header.ToString(); VideoWindow window = new VideoWindow(selectTweet); window.Show(); //if(tweet.tweetMovie.display_url==url) //{ // System.Diagnostics.Process.Start(tweet.tweetMovie.expanded_url); // TweetInstence.AddTweet(ePanel.eOpen, tweet); //} //foreach(ClientMedia media in tweet.dicPhoto.Values) //{ // if(media.display_url==url) // { // System.Diagnostics.Process.Start(media.expanded_url); // TweetInstence.AddTweet(ePanel.eOpen, tweet); // break; // } //} //VideoWindow win = new VideoWindow(tweet, item.Header.ToString()); //win.Show(); }
private void User_ActiveEvent(int id, string name, int command) { if (command == ElementCommands.InfoModule) { Connection.SendMessage(new MessageClass(Connection.ID, id, Commands.GetInfo, 0)); } if (command == ElementCommands.SendModule) { Random r = new Random(); int gid = -1; bool ok = true; while (ok) { ok = false; gid = r.Next(1, Int32.MaxValue / 2); for (int i = 0; i < Setupers.Count; i++) { if (gid == Setupers[i].ID) { ok = true; } } } var setup = new SetupWindow(gid, id, name, Connection); Setupers.Add(setup); setup.Owner = this; setup.CloseEvent += (SetupWindow window) => { Setupers.Remove(window); GC.Collect(); }; setup.Show(); } if (command == ElementCommands.VideoModule) { Random r = new Random(); int gid = -1; bool ok = true; while (ok) { ok = false; gid = r.Next(1, Int32.MaxValue / 2); for (int i = 0; i < VideoWindows.Count; i++) { if (gid == VideoWindows[i].ID) { ok = true; } } } var video = new VideoWindow(gid, id, name, Connection); VideoWindows.Add(video); video.CloseEvent += (VideoWindow window) => { VideoWindows.Remove(window); GC.Collect(); }; video.Show(); } if (command == ElementCommands.FileModule) { Random r = new Random(); int gid = -1; bool ok = true; while (ok) { ok = false; gid = r.Next(1, Int32.MaxValue / 2); for (int i = 0; i < VideoWindows.Count; i++) { if (gid == VideoWindows[i].ID) { ok = true; } } } var fileWindow = new FileWindow(gid, id, name, Connection); FileWindows.Add(fileWindow); fileWindow.CloseEvent += (FileWindow window) => { FileWindows.Remove(window); GC.Collect(); }; fileWindow.Show(); } }
private void flex_FlashCallback(FlexCallbackCommand cmd, List <string> args) { UserViewModel uvm = DataContext as UserViewModel; if (uvm != null && uvm.RoomWindowVM != null) { switch (cmd) { case FlexCallbackCommand.ReportStatus: IsEnabled = true; if (args != null && args.Count == 1) { if (args[0] == FlexStatusStrings.ConnectSucceed) { RtmpConnectSuccessful(); } else { //TODO Connect Red5 failed. } } break; case FlexCallbackCommand.LoadComplete: IsEnabled = true; break; case FlexCallbackCommand.VideoStateChanged: int vState = 0; if (uvm.IsMe() && args.Count > 0) { if (int.TryParse(args[0], out vState)) { uvm.RoomWindowVM.RoomClient.VideoStateChanged(uvm.RoomWindowVM.RoomVM.Id, vState); } } break; case FlexCallbackCommand.AudioStateChanged: int aState = 0; if (args.Count > 0) { if (int.TryParse(args[0], out aState)) { uvm.RoomWindowVM.RoomClient.AudioStateChanged(uvm.RoomWindowVM.RoomVM.Id, aState); switch (aState) { case FlexCallbackCommandNames.AV_State_Normal: if (uvm.IsMe()) { uvm.RoomWindowVM.StartAudioRecording(); } else { uvm.RoomWindowVM.StartAudioPlaying(uvm.Id); } break; case FlexCallbackCommandNames.AV_State_Paused: if (uvm.IsMe()) { uvm.RoomWindowVM.PauseAudioRecording(); } else { uvm.RoomWindowVM.StopAudioPlaying(uvm.Id); } break; case FlexCallbackCommandNames.AV_State_Resumed: if (uvm.IsMe()) { uvm.RoomWindowVM.StartAudioRecording(); } else { uvm.RoomWindowVM.StartAudioPlaying(uvm.Id); } break; default: break; } } } break; case FlexCallbackCommand.TakePicture: break; case FlexCallbackCommand.ExtendVideo: VideoWindowViewModel vm = new VideoWindowViewModel(uvm); vm.Initialize(); VideoWindow window = new VideoWindow(vm, false); window.Topmost = true; window.Show(); break; } } if (FlashCallback != null) { FlashCallback(cmd, args); } }
private void flex_FlashCallback(FlexCallbackCommand cmd, List<string> args) { UserViewModel uvm = DataContext as UserViewModel; if (uvm != null && uvm.RoomWindowVM != null) switch (cmd) { case FlexCallbackCommand.ReportStatus: IsEnabled = true; if (args != null && args.Count == 1) { if (args[0] == FlexStatusStrings.ConnectSucceed) { RtmpConnectSuccessful(); } else { //TODO Connect Red5 failed. } } break; case FlexCallbackCommand.LoadComplete: IsEnabled = true; break; case FlexCallbackCommand.VideoStateChanged: int vState = 0; if (uvm.IsMe() && args.Count > 0) { if (int.TryParse(args[0], out vState)) { uvm.RoomWindowVM.RoomClient.VideoStateChanged(uvm.RoomWindowVM.RoomVM.Id, vState); } } break; case FlexCallbackCommand.AudioStateChanged: int aState = 0; if (args.Count > 0) { if (int.TryParse(args[0], out aState)) { uvm.RoomWindowVM.RoomClient.AudioStateChanged(uvm.RoomWindowVM.RoomVM.Id,aState); switch (aState) { case FlexCallbackCommandNames.AV_State_Normal: if (uvm.IsMe()) { uvm.RoomWindowVM.StartAudioRecording(); } else { uvm.RoomWindowVM.StartAudioPlaying(uvm.Id); } break; case FlexCallbackCommandNames.AV_State_Paused: if (uvm.IsMe()) { uvm.RoomWindowVM.PauseAudioRecording(); } else { uvm.RoomWindowVM.StopAudioPlaying(uvm.Id); } break; case FlexCallbackCommandNames.AV_State_Resumed: if (uvm.IsMe()) { uvm.RoomWindowVM.StartAudioRecording(); } else { uvm.RoomWindowVM.StartAudioPlaying(uvm.Id); } break; default: break; } } } break; case FlexCallbackCommand.TakePicture: break; case FlexCallbackCommand.ExtendVideo: VideoWindowViewModel vm = new VideoWindowViewModel(uvm); vm.Initialize(); VideoWindow window = new VideoWindow(vm,false); window.Topmost = true; window.Show(); break; } if (FlashCallback != null) { FlashCallback(cmd, args); } }
private void Button_WatchNow_Click(object sender, RoutedEventArgs e) { VideoWindow win2 = new VideoWindow(); win2.Show(); }
/// <summary> /// Open a window with Kinect output /// </summary> public void ShowVideoWindow() { VideoWindow m_videoWindow = new VideoWindow(); m_videoWindow.Show(); }