프로젝트

일반

사용자정보

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

markus / TEST_WPF / MainWindow.xaml.cs @ 101da246

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

1
//using MarkupToPDF.Controls.Line;
2
using KCOMDataModel.DataModel;
3
using System;
4
using System.Collections.Generic;
5
using System.Collections.ObjectModel;
6
using System.ComponentModel;
7
using System.Globalization;
8
using System.Linq;
9
using System.Text;
10
using System.Windows;
11
using System.Windows.Controls;
12
using System.Windows.Data;
13
using System.Windows.Documents;
14
using System.Windows.Input;
15
using System.Windows.Media;
16
using System.Windows.Media.Imaging;
17
using System.Windows.Navigation;
18
using System.Windows.Shapes;
19
using TEST_WPF.TalkPane;
20

    
21
namespace TEST_WPF
22
{
23
    /// <summary>
24
    /// Interaction logic for MainWindow.xaml
25
    /// </summary>
26
    public partial class MainWindow : Window , INotifyPropertyChanged
27
    {
28
        public event PropertyChangedEventHandler PropertyChanged;
29
        protected void OnPropertyChanged(string name) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(name)); } }
30

    
31
        private List<TALK> _MessageSet { get; set; }
32
        public List<TALK> MessageSet
33
        {
34
            get
35
            {
36
                return _MessageSet;
37
            }
38
            set
39
            {
40

    
41
                _MessageSet = value;
42
                OnPropertyChanged("MessageSet");
43
            }
44
        }
45

    
46
        public MainWindow() 
47
        {
48
            InitializeComponent();
49
            //this.DataContext = new TalkPane.MessageViewModel();
50
            this.Loaded += MainWindow_Loaded;
51
        }
52

    
53
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
54
        {
55
            using (CIEntities entity = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString("000000").ToString()))
56
            {
57
                //entity.TALK.AddObject(new TALK
58
                //{
59
                //    DOCUMENT_ID = "1111111",
60
                //    MEMBER_ID = "ara707",
61
                //    MEMBER_NAME = "김아라",
62
                //    MSGSIDE = (int)MessageSide.You,
63
                //    MSGTYPE = (int)MessageType.Normal,
64
                //    TEXT = "MARKUS는 도프텍이 준비한 야심한 마크업 프로그램입니다",
65
                //    TIMESTAMP = DateTime.Now,
66
                //});
67

    
68
                //entity.SaveChanges();
69
                MessageSet = entity.TALK.ToList();
70
                this.DataContext = this;
71
            }
72
        }
73
    }
74
}
75
        
클립보드 이미지 추가 (최대 크기: 500 MB)