示例#1
0
        public void Copy()
        {
            try
            {
                if (_share.Data.Properties.ApplicationName != Constants.ApplicationName)
                {
                    _share.ReportSubmittedBackgroundTask();

                    var content = new DataPackage();
                    _values.CopyTo(content);

                    Windows.ApplicationModel.DataTransfer.Clipboard.SetContent(content);
                    Windows.ApplicationModel.DataTransfer.Clipboard.Flush();
                    Windows.ApplicationModel.DataTransfer.Clipboard.ContentChanged += OnClipboardContentChanged;

                    _share.DismissUI();
                }
                else
                {
                    _share.ReportCompleted();
                }
            }
            catch (Exception ex)
            {
                _share.ReportError(ex.Message);
            }
        }
示例#2
0
 private void DismissUI_Click(object sender, RoutedEventArgs e)
 {
     m_shareOperation.DismissUI();
 }