/// <summary> /// not necesarry method here /// </summary> public void setMemento(Oqat.PublicRessources.Model.Memento memento) { }
public void setMemento(Oqat.PublicRessources.Model.Memento memento) { throw new NotImplementedException(); }
/// <summary> /// Sets the memento to the current state of this. /// </summary> public void setMemento(Oqat.PublicRessources.Model.Memento memento) { if (memento == null) throw new ArgumentNullException("Given memento is null."); if (memento.state!=null && memento.state is int) { Object obj = memento.state; radioButton = (int)obj; } }
public void loadVideo(object sender, Oqat.PublicRessources.Model.VideoEventArgs vid) { MessageBox.Show("Presentation process(..) called."); }
/// <summary> /// Sets a Memento as the current state of the Object. /// </summary> public void setMemento(Oqat.PublicRessources.Model.Memento memento) { if (memento.state is double[]) { Object obj = memento.state; var colorValues = (double[])obj; redValue = colorValues[0]; greenValue = colorValues[1]; blueValue = colorValues[2]; } }
/// <summary> /// Loads a video object into the player. /// Displays the frame at position. /// </summary> /// <param name="video">the video object to be loaded and played</param> /// <param name="position">zero-based indes of the frame to which the player should jump in the video. Default is first frame (0)</param> public void setVideo(Oqat.PublicRessources.Model.IVideo video, int position = 0) { if (i.Dispatcher.CheckAccess()) { lock (setVideoContextLock) { if (video == null || video.vidInfo == null || video.vidPath == null) throw new ArgumentException("Given video was not initialized properly."); flush(); this.video = video; RenderOptions.SetBitmapScalingMode(i, BitmapScalingMode.NearestNeighbor); RenderOptions.SetEdgeMode(i, EdgeMode.Aliased); // image writeableBitmap = new WriteableBitmap( video.vidInfo.width, video.vidInfo.height, 96, 96, PixelFormats.Bgr32, null); i.Source = writeableBitmap; playButton.Visibility = System.Windows.Visibility.Visible; pauseButton.Visibility = System.Windows.Visibility.Collapsed; positionSlider.Maximum = video.vidInfo.frameCount; playerControls.DataContext = this; Binding jtfReadPosbind = new Binding("positionReader"); jtfReadPosbind.Mode = System.Windows.Data.BindingMode.OneWay; jtfReadPosbind.Converter = new intStringConverter(); jumpToFrameTextBox.SetBinding(System.Windows.Controls.TextBox.TextProperty, jtfReadPosbind); Binding slReadPosBind = new Binding("positionReader"); slReadPosBind.Mode = System.Windows.Data.BindingMode.OneWay; slReadPosBind.Converter = new intDoubleConverter(); positionSlider.SetBinding(System.Windows.Controls.Slider.ValueProperty, slReadPosBind); video.handler.PropertyChanged += OnPropertyChanged; // draw Frame on panel getFrame(position); // prepare playTickerThread + Sync stopPlayTickerThread = false; pausePlayTicker.Reset(); // waitPlayTickerThreadStop.Set(); if (playTickerThread.ThreadState != System.Threading.ThreadState.Running) playTickerThread.Start(); } } else { playButton.Dispatcher.Invoke((Action)(() => { setVideo(video, position); })); } }
/// <summary> /// Sets a Memento as the current state of the Object. /// </summary> public void setMemento(Oqat.PublicRessources.Model.Memento memento) { Object obj = memento.state; noise = (float)obj; }