Пример #1
0
        public bool CreateSourceWindow(Identity id, Display display)
        {
            if (SourceType != null)
            {
                //STAS - тут теперь необходимо передавать так же и слайд и еще блин конфигурацию
                Source source = SourceType.CreateNewSource(
                    PresentationController.Instance.SelectedSlide,
                    PresentationController.Configuration.ModuleConfiguration,
                    DesignerClient.Instance.PresentationWorker.GetGlobalDeviceSources(), 
                    display);

                if (source != null)
                {
                    source.Id = id.NextID.ToString();
                    source.ResourceDescriptor = this.Mapping;
                }

                Window wnd = display.CreateWindow(source, PresentationController.Instance.SelectedSlide);
                if (wnd != null)
                {
                    if (wnd.Width == 0)
                        wnd.Width = InitialWidth;
                    if (wnd.Height == 0)
                        wnd.Height = InitialHeight;
                }

                this.Window = wnd;
                return this.Window != null && this.Window.Source != null;
            }
            return false;
        }