public void Display( IBinding binding ) { if( binding == null ) return; if( Window == null ) { Window = new CKWindow(); } Binding = binding; Rect r = Binding.GetWindowArea(); if( r != Rect.Empty ) { Window.Dispatcher.BeginInvoke( new Action( () => { Window.Opacity = .8; Window.Background = new System.Windows.Media.SolidColorBrush( System.Windows.Media.Color.FromRgb( 152, 120, 152 ) ); Window.ResizeMode = ResizeMode.NoResize; Window.WindowStyle = WindowStyle.None; Window.ShowInTaskbar = false; Window.Show(); Window.Left = r.Left; Window.Top = r.Top; Window.Width = r.Width; Window.Height = r.Height; Window.Topmost = true; } ) ); } }
public virtual void Subscribe( string name, CKWindow window ) { _name = name; _window = window; WindowManager.ServiceStatusChanged += WindowManager_ServiceStatusChanged; if( WindowManager.Status == InternalRunningStatus.Started ) { RegisterWindowManager(); } WindowBinder.ServiceStatusChanged += WindowBinder_ServiceStatusChanged; if( WindowBinder.Status == InternalRunningStatus.Started ) { RegisterWindowBinder(); } }
public static void RegisterWindow( this IWindowManager m, string name, CKWindow window ) { m.Register( new WindowElement( window, name ) ); }