コード例 #1
0
        private void btnAttachScreenshot_Click_1(object sender, RoutedEventArgs e)
        {
            var ap = DataContext as ArgPoint;

            if (ap == null)
            {
                return;
            }

            var screenshotWnd = new ScreenshotCaptureWnd((System.Drawing.Bitmap b) =>
            {
                var attach = AttachmentManager.AttachScreenshot(ap, b);
                if (attach != null)
                {
                    var seldId    = SessionInfo.Get().person.Id;
                    attach.Person = PrivateCenterCtx.Get().Person.FirstOrDefault(p0 => p0.Id == seldId);

                    ap.ChangesPending = true;
                    UISharedRTClient.Instance.clienRt.SendStatsEvent(
                        StEvent.ScreenshotAdded,
                        ap.Person.Id,
                        ap.Topic.Discussion.Id,
                        ap.Topic.Id,
                        DeviceType.Wpf);

                    UpdateOrderedMedia();
                    BeginAttachmentNumberInjection();
                }
            });

            screenshotWnd.ShowDialog();
        }
コード例 #2
0
        private void btnAttachScreenshot_Click_1(object sender, RoutedEventArgs e)
        {
            if (_d == null)
            {
                return;
            }

            var screenshotWnd = new ScreenshotCaptureWnd((System.Drawing.Bitmap b) =>
            {
                var attach = AttachmentManager.AttachScreenshot(null, b);
                if (attach != null)
                {
                    attach.Person     = getFreshPerson();
                    attach.Discussion = _d;

                    insertMedia(attach);
                }
            });

            screenshotWnd.ShowDialog();
        }
コード例 #3
0
ファイル: HtmlEditWnd.xaml.cs プロジェクト: gdlprj/duscusys
        private void btnAttachScreenshot_Click_1(object sender, RoutedEventArgs e)
        {
            if (_d == null)
                return;

            var screenshotWnd = new ScreenshotCaptureWnd((System.Drawing.Bitmap b) =>
                {
                    var attach = AttachmentManager.AttachScreenshot(null, b);
                    if (attach != null)
                    {
                        attach.Person = getFreshPerson();
                        attach.Discussion = _d;

                        insertMedia(attach);
                    }
                });
            screenshotWnd.ShowDialog();
        }
コード例 #4
0
ファイル: EditableBadge.xaml.cs プロジェクト: gdlprj/duscusys
        private void btnAttachScreenshot_Click_1(object sender, RoutedEventArgs e)
        {
            var ap = DataContext as ArgPoint;
            if (ap == null)
                return;

            var screenshotWnd = new ScreenshotCaptureWnd((System.Drawing.Bitmap b) =>
                {
                    var attach = AttachmentManager.AttachScreenshot(ap, b);
                    if (attach != null)
                    {
                        var seldId = SessionInfo.Get().person.Id;
                        attach.Person = PrivateCenterCtx.Get().Person.FirstOrDefault(p0 => p0.Id == seldId);

                        ap.ChangesPending = true;
                        UISharedRTClient.Instance.clienRt.SendStatsEvent(
                            StEvent.ScreenshotAdded,
                            ap.Person.Id,
                            ap.Topic.Discussion.Id,
                            ap.Topic.Id,
                            DeviceType.Wpf);

                        UpdateOrderedMedia();
                        BeginAttachmentNumberInjection();
                    }
                });
            screenshotWnd.ShowDialog();
        }