protected override void OnDestroyed() { if (dragTimerID != 0) { GLib.Source.Remove(dragTimerID); dragTimerID = 0; } DisconnectSignals(); blackboard.Dispose(); blackboard = null; timerule.Dispose(); timerule = null; eventEditionTimerule.Dispose(); eventEditionTimerule = null; volumeWindow.Dispose(); volumeWindow = null; jumpsWindow.Dispose(); jumpsWindow = null; zoomWindow.Dispose(); zoomWindow = null; rateWindow.Dispose(); rateWindow = null; ViewModel = null; base.OnDestroyed(); }
public SynchronizationWidget() { this.Build(); zoomscale.CanFocus = false; zoomscale.Adjustment.Lower = 0; zoomscale.Adjustment.Upper = 100; zoomoutimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-zoom-out", 14); zoominimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-zoom-in", 14); timerule = new Timerule(new WidgetWrapper(timerulearea)); timerule.AutoUpdate = true; camerasTimeline = new CamerasTimelineView(new WidgetWrapper(timelinearea)); camerasLabels = new CamerasLabelsView(new WidgetWrapper(labelsarea)); // Set some sane defaults labels_vbox.WidthRequest = Sizes.TimelineLabelsWidth; // We need to align the timerule and the beginning of labels list timerulearea.HeightRequest = Sizes.TimelineCameraHeight; menu = new PeriodsMenu(); videoPlayerView = App.Current.GUIToolkit.GetPlayerView(); videoplayerbox.PackStart(videoPlayerView as Widget, true, true, 0); videoplayerbox.ShowAll(); Helpers.Misc.SetFocus(this, false); Bind(); }
public void Setup() { var drawingToolkitMock = new Mock <IDrawingToolkit> (); drawingToolkitMock.Setup(d => d.CreateSurfaceFromIcon(It.IsAny <string> (), It.IsAny <bool> (), It.IsAny <bool> ())). Returns(Mock.Of <ISurface> ()); App.Current.DrawingToolkit = drawingToolkitMock.Object; widgetMock = new Mock <IWidget> (); timerule = new Timerule(widgetMock.Object); videoPlayer = new VideoPlayerVM(); timerule.SetViewModel(videoPlayer); videoPlayerMock = new Mock <IVideoPlayerController> (); videoPlayer.Player = videoPlayerMock.Object; }
public SynchronizationWidget() { this.Build(); zoomscale.CanFocus = false; zoomscale.Adjustment.Lower = 0; zoomscale.Adjustment.Upper = 100; zoomoutimage.Pixbuf = Helpers.Misc.LoadIcon("longomatch-zoom-out", 14); zoominimage.Pixbuf = Helpers.Misc.LoadIcon("longomatch-zoom-in", 14); // Only main cam has audio for now main_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon("longomatch-control-volume-hi", IconSize.Button); sec_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon("longomatch-control-volume-off", IconSize.Button); main_cam_audio_button.Active = true; sec_cam_audio_button.Active = false; // We control visibility of those widgets, they are hidden at startup sec_cam_vbox.NoShowAll = true; sec_cam_didactic_label.NoShowAll = true; timerule = new Timerule(new WidgetWrapper(timerulearea)); camerasTimeline = new CamerasTimeline(new WidgetWrapper(timelinearea)); camerasLabels = new CamerasLabels(new WidgetWrapper(labelsarea)); // Set some sane defaults labels_vbox.WidthRequest = StyleConf.TimelineLabelsWidth; // We need to align the timerule and the beginning of labels list timerulearea.HeightRequest = StyleConf.TimelineCameraHeight; main_cam_label.ModifyFont(FontDescription.FromString(Config.Style.Font + " bold 14")); sec_cam_label.ModifyFont(FontDescription.FromString(Config.Style.Font + " bold 14")); main_cam_playerbin.Mode = PlayerViewOperationMode.Synchronization; sec_cam_playerbin.Mode = PlayerViewOperationMode.Synchronization; ConnectSignals(); LongoMatch.Gui.Helpers.Misc.SetFocus(this, false); menu = new PeriodsMenu(); }
public SynchronizationWidget() { this.Build (); zoomscale.CanFocus = false; zoomscale.Adjustment.Lower = 0; zoomscale.Adjustment.Upper = 100; zoomoutimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-out", 14); zoominimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-zoom-in", 14); // Only main cam has audio for now main_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-control-volume-hi", IconSize.Button); sec_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-control-volume-off", IconSize.Button); main_cam_audio_button.Active = true; sec_cam_audio_button.Active = false; // We control visibility of those widgets, they are hidden at startup sec_cam_vbox.NoShowAll = true; sec_cam_didactic_label.NoShowAll = true; timerule = new Timerule (new WidgetWrapper (timerulearea)); camerasTimeline = new CamerasTimeline (new WidgetWrapper (timelinearea)); camerasLabels = new CamerasLabels (new WidgetWrapper (labelsarea)); // Set some sane defaults labels_vbox.WidthRequest = StyleConf.TimelineLabelsWidth; // We need to align the timerule and the beginning of labels list timerulearea.HeightRequest = StyleConf.TimelineCameraHeight; main_cam_label.ModifyFont (FontDescription.FromString (Config.Style.Font + " bold 14")); sec_cam_label.ModifyFont (FontDescription.FromString (Config.Style.Font + " bold 14")); main_cam_playerbin.Mode = PlayerViewOperationMode.Synchronization; sec_cam_playerbin.Mode = PlayerViewOperationMode.Synchronization; ConnectSignals (); LongoMatch.Gui.Helpers.Misc.SetFocus (this, false); menu = new PeriodsMenu (); }
public Timeline() { this.Build(); this.timerule = new Timerule(new WidgetWrapper(timerulearea)); this.timeline = new PlaysTimeline(new WidgetWrapper(timelinearea)); this.labels = new TimelineLabels(new WidgetWrapper(labelsarea)); focusbuttonimage.Pixbuf = Helpers.Misc.LoadIcon("longomatch-dash-center-view", Gtk.IconSize.Menu, 0); focusbutton.CanFocus = false; focusbutton.Clicked += HandleFocusClicked; focusscale.CanFocus = false; focusscale.Adjustment.Lower = 0; focusscale.Adjustment.Upper = 12; focusscale.ValueChanged += HandleValueChanged; timerulearea.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT; leftbox.WidthRequest = StyleConf.TimelineLabelsWidth; labelsarea.SizeRequested += (o, args) => { leftbox.WidthRequest = args.Requisition.Width; }; hbox1.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT; scrolledwindow1.Vadjustment.ValueChanged += HandleScrollEvent; scrolledwindow1.Hadjustment.ValueChanged += HandleScrollEvent; timeoutID = 0; zoominimage.Pixbuf = LongoMatch.Gui.Helpers.Misc.LoadIcon("longomatch-zoom-in", 14); zoomoutimage.Pixbuf = LongoMatch.Gui.Helpers.Misc.LoadIcon("longomatch-zoom-out", 14); // Synchronize the zoom widget height with scrolledwindow's scrollbar's. scrolledwindow1.HScrollbar.SizeAllocated += (object o, SizeAllocatedArgs args) => { int spacing = (int)scrolledwindow1.StyleGetProperty("scrollbar-spacing"); zoomhbox.HeightRequest = args.Allocation.Height + spacing; }; menu = new PlaysMenu(); periodsmenu = new PeriodsMenu(); }
public VideoPlayerView() { this.Build(); // The editor keeps changing that value to false. var panedChild = ((Paned.PanedChild)(this.videohpaned [this.videobox])); panedChild.Resize = true; timerulearea.HeightRequest = DConstants.TIMERULE_PLAYER_HEIGHT; timerule = new Timerule(new WidgetWrapper(timerulearea)) { PlayerMode = true, ContinuousSeek = true, AutoUpdate = true, AdjustSizeToDuration = true, }; editeventtimeruledrawingarea.HeightRequest = DConstants.TIMERULE_PLAYER_HEIGHT; eventEditionTimerule = new EventEditionTimeruleView(new WidgetWrapper(editeventtimeruledrawingarea)); rateLabel.ModifyFont(FontDescription.FromString(App.Current.Style.Font + " 8px")); jumpsLabel.ModifyFont(FontDescription.FromString(App.Current.Style.Font + " 8px")); zoomLabel.ModifyFont(FontDescription.FromString(App.Current.Style.Font + " 8px")); CreateTimeText(); eventNameLabel.Ellipsize = EllipsizeMode.End; centerplayheadbuttonimage.Image = App.Current.ResourcesLocator.LoadIcon("vas-dash-center-view", Sizes.PlayerCapturerIconSize); DurationButtonImage.Image = App.Current.ResourcesLocator.LoadIcon("vas-control-duration", 15); // Force tooltips to be translatable as there seems to be a bug in stetic // code generation for translatable tooltips. centerplayheadbutton.TooltipMarkup = Catalog.GetString("Center Playhead"); volumeWindow = new SliderView(0, 101, 1, 1); volumeWindow.FormatValue = (double val) => { return(val + "%"); }; jumpsWindow = new SliderView(0, App.Current.StepList.Count, 1, 1); jumpsWindow.FormatValue = (double val) => { return(App.Current.StepList [(int)val] + "s"); }; zoomWindow = new SliderView(0, App.Current.ZoomLevels.Count, 1, 1); zoomWindow.FormatValue = (double val) => { return((App.Current.ZoomLevels [(int)val] * 100) + "%"); }; rateWindow = new SliderView(0, App.Current.RateList.Count, 1, 1); rateWindow.FormatValue = (double val) => { return(App.Current.RateList [(int)val] + "X"); }; blackboard = new Blackboard(new WidgetWrapper(blackboarddrawingarea)); blackboarddrawingarea.Visible = false; blackboarddrawingarea.NoShowAll = true; ConnectSignals(); totalbox.NoShowAll = true; Misc.SetFocus(totalbox, false); mainviewport.CanFocus = true; maineventbox.ModifyBg(StateType.Normal, Misc.ToGdkColor(App.Current.Style.ScreenBase)); controlsbox.HeightRequest = Sizes.PlayerCapturerControlsHeight; cameraConfigsOutOfScreen = new List <CameraConfig> (); CreateWindows(); Bind(); }