Exemplo n.º 1
0
        protected InfoTray(Recording.Keyframe kf, RecordingModel.FocusContainer focusedTray)
        {
            InitializeComponent();

            keyframe           = kf;
            BLUE               = (Color)FindResource("blue0");
            trayFocusContainer = focusedTray;

            //Model = new KeyframeModel(convertTime(kf.GetTime());
            Model      = new KeyframeModel(this);
            Model.Time = convertTime(kf.GetTime());
            kf.OnUpdateTime((t) => { Model.Time = convertTime(t); });

            this.DataContext = Model;

            lostFocusChild = () => { };

            //Task.Delay(0).ContinueWith((t) =>
            //{
            //    int i = 0;
            //    while(true)
            //    {
            //        Model.Time = i.ToString();
            //        i++;
            //        Thread.Sleep(500);
            //    }
            //});
        }
Exemplo n.º 2
0
            public InfoTrayK(Recording.Keyframe kf, RecordingModel.FocusContainer f) : base(kf, f)
            {
                kfK = (Recording.KeyframeK)kf;
                kfK.OnUpdateKA((ka) => { Model.Description = convertDesc(ka); });
                kfK.OnUpdateKey((k) => { Model.Info = convertInfo(k); });

                Model.Info        = convertInfo(kfK.GetKey());
                Model.Description = convertDesc(kfK.GetKA());
            }
Exemplo n.º 3
0
            public InfoTrayM(Recording.Keyframe kf, RecordingModel.FocusContainer f) : base(kf, f)
            {
                kfM = (Recording.KeyframeM)kf;
                selectMouseLocationHandle = EventsBuiltin.RegisterEvent <Overlay.Callbacks>(EventID.SELECT_MOUSE_LOCATION);
                kfM.OnUpdateLoc((x, y) => { Model.Description = convertDesc(x, y); });
                kfM.OnUpdateMA((ma) => { Model.Info = convertInfo(ma); });

                int[] loc = kfM.GetLoc();
                Model.Description = convertDesc(loc[0], loc[1]);
                Model.Info        = convertInfo(kfM.GetMA());
            }
Exemplo n.º 4
0
        public static InfoTray BuildNew(Recording.Keyframe kf, RecordingModel.FocusContainer f)
        {
            InfoTray tray;

            if (kf.Type == Recording.KFType.KEY)
            {
                tray = new InfoTrayK(kf, f);
            }
            else
            {
                tray = new InfoTrayM(kf, f);
            }

            return(tray);
        }