コード例 #1
0
        public ClipboardEventChainBlocker()
        {
            m_form = new ClipboardBlockerForm();

            try
            {
                m_hChain = NativeMethods.SetClipboardViewer(m_form.Handle);
            }
            catch(Exception) { Debug.Assert(false); m_hChain = IntPtr.Zero; }
        }
コード例 #2
0
        public ClipboardEventChainBlocker()
        {
            m_form = new ClipboardBlockerForm();

            try
            {
                m_hChain = NativeMethods.SetClipboardViewer(m_form.Handle);
            }
            catch (Exception) { Debug.Assert(false); m_hChain = IntPtr.Zero; }
        }
コード例 #3
0
		public ClipboardEventChainBlocker()
		{
			if(NativeLib.IsUnix()) return; // Unsupported

			m_form = new ClipboardBlockerForm();

			try
			{
				m_hChain = NativeMethods.SetClipboardViewer(m_form.Handle);
			}
			catch(Exception) { Debug.Assert(false); }
		}
コード例 #4
0
        public ClipboardEventChainBlocker()
        {
            if (NativeLib.IsUnix())
            {
                return;                                // Unsupported
            }
            m_form = new ClipboardBlockerForm();

            try
            {
                m_hChain = NativeMethods.SetClipboardViewer(m_form.Handle);
            }
            catch (Exception) { Debug.Assert(false); }
        }
コード例 #5
0
		private void Dispose(bool bDisposing)
		{
			if(bDisposing && (m_form != null))
			{
				try
				{
					// Ignore return value (no assert); see documentation
					// of ChangeClipboardChain
					NativeMethods.ChangeClipboardChain(m_form.Handle, m_hChain);
				}
				catch(Exception) { Debug.Assert(false); }

				m_form.Dispose();
				m_form = null;
			}

			m_hChain = IntPtr.Zero;
		}
コード例 #6
0
        private void Dispose(bool bDisposing)
        {
            if (bDisposing && (m_form != null))
            {
                try
                {
                    // Ignore return value (no assert); see documentation
                    // of ChangeClipboardChain
                    NativeMethods.ChangeClipboardChain(m_form.Handle, m_hChain);
                }
                catch (Exception) { Debug.Assert(false); }

                m_form.Dispose();
                m_form = null;
            }

            m_hChain = IntPtr.Zero;
        }
コード例 #7
0
        public void Release()
        {
            if(m_form != null)
            {
                try
                {
                    if(NativeMethods.ChangeClipboardChain(m_form.Handle,
                        m_hChain) == false)
                    {
                        Debug.Assert(false);
                    }
                }
                catch(Exception) { Debug.Assert(false); }

                m_form.Dispose();
                m_form = null;
            }

            m_hChain = IntPtr.Zero;
        }
コード例 #8
0
        public void Release()
        {
            if (m_form != null)
            {
                try
                {
                    if (NativeMethods.ChangeClipboardChain(m_form.Handle,
                                                           m_hChain) == false)
                    {
                        Debug.Assert(false);
                    }
                }
                catch (Exception) { Debug.Assert(false); }

                m_form.Dispose();
                m_form = null;
            }

            m_hChain = IntPtr.Zero;
        }