Example #1
0
        private void OnGetTextButtonClick(NEventArgs args)
        {
            NDataObject dataObject = NClipboard.GetDataObject();
            object      data       = dataObject.GetData(NDataFormat.TextFormat);

            if (data != null)
            {
                m_TextBox.Text = (string)data;
            }
        }
Example #2
0
        private void OnGetRTFButtonClick(NEventArgs args)
        {
            NDataObject dataObject = NClipboard.GetDataObject();

            byte[] data = dataObject.GetRTF();
            if (data != null)
            {
                m_RichText.LoadFromStream(new MemoryStream(data), new NRtfTextFormat());
            }
        }
Example #3
0
        private void OnGetRasterButtonClick(NEventArgs args)
        {
            // get a data object from the clipboard
            NDataObject dataObject = NClipboard.GetDataObject();

            // try get a raster from the data object
            object data = dataObject.GetData(NDataFormat.RasterFormat);

            if (data == null)
            {
                return;
            }

            // place it inside the image box
            NRaster raster = (NRaster)data;

            m_ImageBox.Image      = new NImage(raster);
            m_ImageBox.Visibility = ENVisibility.Visible;
        }