Пример #1
0
 private void BindImageWindow(ImageWindow window)
 {
     if (window.View != null && View != null)
     {
         try
         {
             //bind Time
             BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                         View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
         }
         catch (Exception ex)
         {
             ErrorDialog.Show("Failed to bind Image component", ex);
         }
     }
 }
Пример #2
0
        private void BindMapWindow(MapWindow window)
        {
            if (window.View != null && View != null)
            {
                try
                {
                    //bind Time
                    BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                                View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)

                    //bind Captions (note: must do 2nd else freezes, not sure why - would expect the reverse order to be needed)
                    //BindingUtils.BindProperties(View, IActivityProperties.PropertyCaptions, //Note: Since Map component doesn't save/load captions itself, it should use as source the Activity, not the other way around, else order of component loading (e.g. 1st load Captions component in Activity and then Map component) causes loss of captions in the Captions component (gets null value from Map component via the Container two-way binding)
                    //                            window.View, IMapViewerProperties.PropertyCaptions); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
                }
                catch (Exception ex)
                {
                    ErrorDialog.Show("Failed to bind Map component", ex);
                }
            }
        }
Пример #3
0
        } //TODO: check why it won't sync smoothly (see what was doing in LvS, maybe ignore time events that are very close to current time) //most probably need to ignore small time differences at sync

        private void BindCaptionsGridWindow(CaptionsWindow window)
        {
            if (window.View != null && View != null)
            {
                try
                {
                    //bind Time
                    BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                                View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)

                    //bind Captions (note: must do 2nd else freezes, not sure why - would expect the reverse order to be needed)
                    BindingUtils.BindProperties(window.View, ICaptionsGridProperties.PropertyCaptions,
                                                View, IActivityProperties.PropertyCaptions); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
                }
                catch (Exception ex)
                {
                    ErrorDialog.Show("Failed to bind Captions component", ex);
                }
            }
        }
Пример #4
0
        private void BindMediaPlayerWindow(MediaPlayerWindow window)
        {
            if (window.View != null && View != null)
            {
                try
                {
                    //bind Time
                    BindingUtils.BindProperties(window.View, IViewProperties.PropertyTime,
                                                View, IViewProperties.PropertyTime); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)

                    //bind Captions (note: must do 2nd else freezes, not sure why - would expect the reverse order to be needed)
                    BindingUtils.BindProperties(View, IActivityProperties.PropertyCaptions,            //Note: Since Clip component doesn't save/load captions itself, it should use as source the Activity, not the other way around, else order of component loading (e.g. 1st load Captions component in Activity and then Clip component) causes loss of captions in the Captions component (gets null value from Clip component via the Container two-way binding)
                                                window.View, IMediaPlayerProperties.PropertyCaptions); //TODO: should rebind after changing view if the window is inside a BaseWindow (get its View and bind to it)
                }
                catch (Exception ex)
                {
                    ErrorDialog.Show("Failed to bind Clip component", ex);
                }
            }
        } //TODO: check why it won't sync smoothly (see what was doing in LvS, maybe ignore time events that are very close to current time) //most probably need to ignore small time differences at sync