/// <summary> /// If any of the interesting broadcast messages is seen, forward them to the owner MediaContext. /// </summary> private IntPtr MessageFilter(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (_isDisposed) { throw new ObjectDisposedException("MediaContextNotificationWindow"); } WindowMessage message = (WindowMessage)msg; Debug.Assert(_ownerMediaContext != null); if (message == WindowMessage.WM_DWMCOMPOSITIONCHANGED) { // // We need to register as MIL content to receive the Vista Magnifier messages // (see comments in ctor). // // We're going to attempt to attach to DWM every time the desktop composition // state changes to ensure that we properly handle DWM crashing/restarting/etc. // MS.Internal.HRESULT.Check(MilContent_AttachToHwnd(_hwndNotification.Value.Handle)); } else if (message == s_channelNotifyMessage) { _ownerMediaContext.NotifyChannelMessage(); } else if (message == s_dwmRedirectionEnvironmentChanged) { MediaSystem.NotifyRedirectionEnvironmentChanged(); } return(IntPtr.Zero); }
/// <summary> /// VisualBrush Constructor where the image is set to the parameter's value /// </summary> /// <param name="visual"> The Visual representing the contents of this Brush. </param> public BitmapCacheBrush(Visual visual) { if (this.Dispatcher != null) { MediaSystem.AssertSameContext(this, visual); Target = visual; } }
/// <summary> /// VisualBrush Constructor where the image is set to the parameter's value /// </summary> /// <param name="visual"> The Visual representing the contents of this Brush. </param> public VisualBrush(Visual visual) { if (this.Dispatcher != null) { MediaSystem.AssertSameContext(this, visual); Visual = visual; } }
/// <summary> /// StartDoc /// </summary> private void StartDoc(string jobName) { MediaSystem.Startup(); if (IsPremium()) { if (SpoolEdoc()) { // Job PrintSystemJobInfo jobinfo = _queue.AddJob(typeof(PrintSystemEDocumentJob)); _eDocJob = jobinfo.JobData as PrintSystemEDocumentJob; _eDocJob.Name = jobName; _eDocJob.Commit(); // Document PrintSystemDocument doc = _eDocJob.AddDocument("XAML Document"); doc.Name = "XAML Document"; doc.JobTicket = _jobTicket.XmlStream; doc.Commit(); // Rendition _eDocRendition = doc.AddRendition("Letter"); _eDocRendition.Name = "A4 Rendition"; _eDocRendition.JobTicket = _jobTicket.XmlStream; _eDocRendition.Commit(); } else { string filename = GetOutputFilename(); _stream = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite); _writer = new System.Xml.XmlTextWriter(_stream, System.Text.Encoding.UTF8); _writer.Formatting = System.Xml.Formatting.Indented; _writer.Indentation = 4; _writer.WriteStartElement("Document"); _writer.WriteAttributeString("xmlns", "http://schemas.microsoft.com/winfx/2006/xaml/presentation"); _writer.WriteAttributeString("xmlns:def", "http://schemas.microsoft.com/winfx/2006/xaml"); _writer.WriteStartElement("FixedPanel"); } } }