프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MARKUSStart / Markus / MainWindow.xaml.cs @ c206d293

이력 | 보기 | 이력해설 | 다운로드 (2.01 KB)

1
using Newtonsoft.Json;
2
using System;
3
using System.Collections.Generic;
4
using System.Diagnostics;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows;
9
using System.Windows.Controls;
10
using System.Windows.Data;
11
using System.Windows.Documents;
12
using System.Windows.Input;
13
using System.Windows.Media;
14
using System.Windows.Media.Imaging;
15
using System.Windows.Navigation;
16
using System.Windows.Shapes;
17

    
18
namespace Markus
19
{
20
    /// <summary>
21
    /// MainWindow.xaml에 대한 상호 작용 논리
22
    /// </summary>
23
    public partial class MainWindow : Window
24
    {
25
        public MainWindow()
26
        {
27
            InitializeComponent();
28
        }
29

    
30
        private void Button_Click(object sender, RoutedEventArgs e)
31
        {
32
            string MarkusLink = "kcom://" + CreateMarkusParam(this.ProjectNO.Text, this.DocumentItemID.Text, UserID.Text, this.Partner.IsChecked , this.CreateFinal.IsChecked, this.NewComment.IsChecked);
33

    
34
            this.URL.Text = MarkusLink;
35
            ProcessStartInfo startInfo = null;
36

    
37
            startInfo = new ProcessStartInfo("iexplore.exe", MarkusLink);
38

    
39
            Process.Start(startInfo);
40
        }
41
        public static string CreateMarkusParam(string projectNo, string documentID, string userID, bool? partner, bool? createfinal, bool? newcomment)
42
        {
43
            ViewInfo viewInfo = new ViewInfo();
44

    
45
            viewInfo.DocumentItemID = documentID;
46
            viewInfo.ProjectNO = projectNo;
47
            viewInfo.UserID = userID;
48
            viewInfo.bPartner = partner;
49
            viewInfo.CreateFinalPDFPermission = createfinal;
50
            viewInfo.NewCommentPermission = newcomment;
51

    
52
            return ParamEncoding(JsonConvert.SerializeObject(viewInfo));
53

    
54
        }
55
        public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null)
56
        {
57

    
58
            if (oEncoding == null)
59
                oEncoding = System.Text.Encoding.UTF8;
60

    
61
            return Convert.ToBase64String(oEncoding.GetBytes(EncodingText));
62

    
63
        }
64
    }
65
}
클립보드 이미지 추가 (최대 크기: 500 MB)