Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }