프로젝트

일반

사용자정보

개정판 c460df05

IDc460df052ab698d5c84131eb0b35c69414c2c2c3
상위 4c8bb207
하위 04a7385a

김동진이(가) 6년 이상 전에 추가함

m-talk 활성화

차이점 보기:

KCOM/Messenger/ConversationView.xaml
103 103
        </ScrollViewer>
104 104
        <Border BorderBrush="#e0e2e2" BorderThickness="0,2,0,0" Grid.Row="1" Background="#fbfcfd">
105 105
            <StackPanel Orientation="Horizontal">
106
                <Image Source="clip.png" Width="18" Height="18" Margin="5,0" x:Name="btnFile"/>
106
                <Image Source="clip.png" Width="18" Height="18" Margin="5,0" x:Name="btnFile" Visibility="Collapsed"/>
107 107
                <Image Source="check_pen.png" Width="18" Height="18" Margin="5,0" x:Name="btnMark"/>
108
                <Image Source="email.png" Width="18" Height="18" Margin="5,0" x:Name="btnMail"/>
108
                <Image Source="email.png" Width="18" Height="18" Margin="5,0" x:Name="btnMail" Visibility="Collapsed"/>
109 109
            </StackPanel>
110 110
        </Border>
111 111
        <Border  Grid.Row="2" Background="#fbfcfd">
KCOM/Messenger/ConversationView.xaml.cs
38 38

  
39 39
        private void BtnMark_Click(object sender, RoutedEventArgs e)
40 40
        {
41
            //MessageBox.Show("데모 버전에서는 지원하지 않습니다", "안내");
42 41
            if (main.dzMainMenu.SelectLayer.Children.Count > 0)
43 42
            {
44
                //this.ParentOfType<KCOM.Views.MainMenu>().zoomAndPanControl.ZoomTo(rect);
45

  
46 43
                DialogParameters parameters = new DialogParameters()
47 44
                {
48 45
                    Closed = (obj, args) => this.MarkupNameUpdatePromptClose(args),
49
                    //DefaultPromptResultValue = "Custom State",
50 46
                    Content = "메모 :",
51 47
                    Header = "앵커에 대한 메모을 남겨주세요",
52 48
                    Theme = new VisualStudio2013Theme(),
......
90 86
                {
91 87
                    Controls.AdornerFinal finalItem = main.dzMainMenu.SelectLayer.Children[0] as Controls.AdornerFinal;
92 88
                    Rect rect = new Rect(new Point(finalItem.BorderSize.Left - 100, finalItem.BorderSize.Top - 100), new Point(finalItem.BorderSize.Right + 100, finalItem.BorderSize.Bottom + 100));
93

  
94
                    using (KCOMDataModel.DataModel.CIEntities entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString()))
89
                    KCOMDataModel.DataModel.TALK message = new KCOMDataModel.DataModel.TALK
90
                    {
91
                        TEXT = args.PromptResult,
92
                        MSGSIDE = (int)MessageSide.Me,
93
                        MEMBER_ID = App.ViewInfo.UserID,
94
                        MEMBER_NAME = App.UserName,
95
                        MSGTYPE = (int)MessageType.Anchor,
96
                        TIMESTAMP = DateTime.Now,
97
                        DOCUMENT_ID = App.ViewInfo.DocumentItemID,
98
                        RECT_X = rect.X,
99
                        RECT_Y = rect.Y,
100
                        RECT_WIDTH = rect.Width,
101
                        RECT_HEIGHT = rect.Height,
102
                        PAGENUMBER = Common.ViewerDataModel.Instance.PageNumber
103
                    };
104

  
105
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddMessage(App.ViewInfo.ProjectNO, message);
106

  
107
                    List<KCOMDataModel.DataModel.TALK> messagelist = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMessage(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID);
108

  
109
                    messagelist.ForEach(a =>
95 110
                    {
96
                        Common.ViewerDataModel.Instance.k_talkMessageSet.Clear();
97
                        entity.TALK.AddObject(new KCOMDataModel.DataModel.TALK
98
                        {
99
                            TEXT = args.PromptResult,
100
                            MSGSIDE = (int)MessageSide.Me,
101
                            MEMBER_ID = App.ViewInfo.UserID,
102
                            MEMBER_NAME = String.IsNullOrEmpty(App.UserName) ? entity.MEMBER.Where(d => d.ID == App.ViewInfo.UserID).FirstOrDefault().NAME : App.UserName,
103
                            MSGTYPE = (int)MessageType.Anchor,
104
                            TIMESTAMP = DateTime.Now,
105
                            DOCUMENT_ID = App.ViewInfo.DocumentItemID,
106
                            RECT_X = rect.X,
107
                            RECT_Y = rect.Y,
108
                            RECT_WIDTH = rect.Width,
109
                            RECT_HEIGHT = rect.Height,
110
                            PAGENUMBER = Common.ViewerDataModel.Instance.PageNumber,                             
111
                        });
112
                        entity.SaveChanges();
113

  
114
                        entity.TALK.Where(data => data.DOCUMENT_ID == App.ViewInfo.DocumentItemID).ToList().ForEach(a =>
115
                        {
116
                            Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
117
                        });
118
                    }
111
                        Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
112
                    });
119 113

  
120 114
                    tbContent.Text = "";
121 115
                    tbContent.Focus();
122

  
123
                    //Common.ViewerDataModel.Instance.k_talkMessageSet.Add(new KCOMDataModel.DataModel.TALK
124
                    //{
125
                    //    Text = args.PromptResult,
126
                    //    Side = MessageSide.Me,
127
                    //    AnchorBound = rect,
128
                    //    UserName = "조장원",
129
                    //    PageNumber = main.dzMainMenu.pageNavigator.CurrentPage.PageNumber,
130
                    //    MsgStype = MessageType.Anchor,
131
                    //    Timestamp = DateTime.Now,
132
                    //});
133
                    //this.DataContext = this;
116
                    (lstMessage.Parent as ScrollViewer).ScrollToEnd();
134 117
                }
135 118
            }
136 119
        }
......
156 139
            if (App.ParameterMode)
157 140
            {
158 141
                ClickAnchorCommand = new Telerik.Windows.Controls.DelegateCommand(SaveAuthorization);
159

  
142
                if (string.IsNullOrEmpty(App.UserName))
143
                {
144
                    App.UserName = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMember(App.ViewInfo.ProjectNO, App.ViewInfo.UserID).NAME;
145
                }
160 146
                if (Common.ViewerDataModel.Instance.k_talkMessageSet.Count() == 0)
161 147
                {
162
                    using (KCOMDataModel.DataModel.CIEntities entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString()))
148
                    List<KCOMDataModel.DataModel.TALK> messagelist = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMessage(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID);
149

  
150
                    messagelist.ForEach(a =>
163 151
                    {
164
                        entity.TALK.Where(data => data.DOCUMENT_ID == App.ViewInfo.DocumentItemID).ToList().ForEach(a =>
165
                        {
166
                            Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
167
                        });
168
                    }
152
                        Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
153
                    });
154
                    (lstMessage.Parent as ScrollViewer).ScrollToEnd();
169 155
                }
170 156
                tbContent.KeyDown += async (s, ea) => await OnKeyDownHandler(s, ea);
157

  
171 158
            }
172 159
        }
173 160

  
......
192 179

  
193 180
        private void AddText()
194 181
        {
195
            using (KCOMDataModel.DataModel.CIEntities entity = new KCOMDataModel.DataModel.CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString()))
182
            Common.ViewerDataModel.Instance.k_talkMessageSet.Clear();
183
            
184
            KCOMDataModel.DataModel.TALK message = new KCOMDataModel.DataModel.TALK
196 185
            {
197
                Common.ViewerDataModel.Instance.k_talkMessageSet.Clear();
198
                entity.TALK.AddObject(new KCOMDataModel.DataModel.TALK
199
                {
200
                    TEXT = tbContent.Text,
201
                    MSGSIDE = (int)MessageSide.Me,
202
                    MEMBER_ID = App.ViewInfo.UserID,
203
                    MEMBER_NAME = String.IsNullOrEmpty(App.UserName) ? entity.MEMBER.Where(d => d.ID == App.ViewInfo.UserID).FirstOrDefault().NAME : App.UserName ,
204
                    MSGTYPE = (int)MessageType.Normal,
205
                    TIMESTAMP = DateTime.Now,
206
                    DOCUMENT_ID = App.ViewInfo.DocumentItemID,
207
                });
208
                entity.SaveChanges();
209

  
210
                entity.TALK.Where(data => data.DOCUMENT_ID == App.ViewInfo.DocumentItemID).ToList().ForEach(a =>
211
                {
212
                    Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
213
                });
214
            }
186
                TEXT = tbContent.Text,
187
                MSGSIDE = (int)MessageSide.Me,
188
                MEMBER_ID = App.ViewInfo.UserID,
189
                MEMBER_NAME = App.UserName,
190
                MSGTYPE = (int)MessageType.Normal,
191
                TIMESTAMP = DateTime.Now,
192
                DOCUMENT_ID = App.ViewInfo.DocumentItemID
193
            };
215 194

  
216
            tbContent.Text = "";
217
            tbContent.Focus();
195
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddMessage(App.ViewInfo.ProjectNO, message);
218 196

  
219
            //강인구 추가
220
            (lstMessage.Parent as ScrollViewer).ScrollToEnd();
197
            List<KCOMDataModel.DataModel.TALK> messagelist = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetMessage(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID);
221 198

  
222
            //ReLoadTalkMessageSet();
223
            //Common.ViewerDataModel.Instance.k_talkMessageSet.Add(new Message
224
            //{
225
            //    Text = tbContent.Text,
226
            //    Side = MessageSide.Me,
227
            //    Timestamp = DateTime.Now,
228
            //});
229

  
230
            //tbContent.Text = "";
231
            //tbContent.Focus();
199
            messagelist.ForEach(a =>
200
            {
201
                Common.ViewerDataModel.Instance.k_talkMessageSet.Add(a);
202
            });
203
            tbContent.Text = "";
204
            tbContent.Focus();            
205
            (lstMessage.Parent as ScrollViewer).ScrollToEnd();
206
            
232 207
        }
233 208
    }
234 209
}
KCOM/Views/MainMenu.xaml
536 536
                    </telerik:RadPane>
537 537
                </telerik:RadPaneGroup>
538 538
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Office2016">
539
                    <telerik:RadPane Header="M-TALK" CanFloat="False" CanUserClose="False" Visibility="Collapsed"  ContextMenuTemplate="{x:Null}" IsPinned="False" telerik:StyleManager.Theme="Office2016"  x:Name="talkPane">
539
                    <telerik:RadPane Header="M-TALK" CanFloat="False" CanUserClose="False" ContextMenuTemplate="{x:Null}" IsPinned="False" telerik:StyleManager.Theme="Office2016"  x:Name="talkPane">
540 540
                        <messanger:ConversationView/>
541 541
                    </telerik:RadPane>
542 542
                </telerik:RadPaneGroup>

내보내기 Unified diff

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