개정판 498f0fc9
issue #771 Public Symbol Place, Register, Rename, Remove 추가
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
201 | 201 |
|
202 | 202 |
#region Event |
203 | 203 |
|
204 |
#region Symbol Add Event |
|
204 |
#region Private Symbol Add Event
|
|
205 | 205 |
private void Create_Symbol(object sender, RoutedEventArgs e) |
206 | 206 |
{ |
207 | 207 |
MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn(); |
... | ... | |
232 | 232 |
} |
233 | 233 |
DialogParameters parameters = new DialogParameters() |
234 | 234 |
{ |
235 |
Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args), |
|
235 |
Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args),
|
|
236 | 236 |
DefaultPromptResultValue = "Custom State", |
237 | 237 |
Content = "Name :", |
238 | 238 |
Header = "Insert Custom Symbol Name", |
... | ... | |
262 | 262 |
|
263 | 263 |
kr.co.devdoftech.cloud.FileUpload fileUploader = new kr.co.devdoftech.cloud.FileUpload(); |
264 | 264 |
filename = fileUploader.Run(App.ViewInfo.ProjectNO, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, Save.shortGuid() + ".png", Img_byte); |
265 |
|
|
266 |
save.SymbolSave(args.PromptResult, filename, data); |
|
265 |
|
|
266 |
if(RadTab.SelectedIndex == 0) |
|
267 |
{ |
|
268 |
save.SymbolSave(args.PromptResult, filename, data); |
|
269 |
} |
|
270 |
else |
|
271 |
{ |
|
272 |
save.SymbolSave_Public(args.PromptResult, filename, data, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.userData.DEPARTMENT); |
|
273 |
} |
|
267 | 274 |
|
268 | 275 |
DataBind(); |
269 | 276 |
} |
270 | 277 |
} |
271 | 278 |
#endregion |
272 | 279 |
|
273 |
#region Symbol Delete Event |
|
280 |
#region Private Symbol Delete Event
|
|
274 | 281 |
private void Remove_Symbol(object sender, RoutedEventArgs e) |
275 | 282 |
{ |
276 | 283 |
if (lstSymbolPrivate.SelectedItem == null) |
... | ... | |
282 | 289 |
|
283 | 290 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolCompleted += BaseClient_DeleteSymbolCompleted; |
284 | 291 |
Logger.sendReqLog("DeleteSymbolAsync: ", delItem_ID, 1); |
285 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID); |
|
286 |
|
|
292 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID, RadTab.SelectedIndex); |
|
293 |
} |
|
294 |
#endregion |
|
295 |
#region Public Symbol Delete Event |
|
296 |
private void Remove_Symbol_Public(object sender, RoutedEventArgs e) |
|
297 |
{ |
|
298 |
if (lstSymbolPublic.SelectedItem == null) |
|
299 |
{ |
|
300 |
DialogMessage_Alert("Please Select Symbol", "Alert"); |
|
301 |
return; |
|
302 |
} |
|
303 |
string delItem_ID = (lstSymbolPublic.SelectedItem as Symbol_Custom).ID; |
|
304 |
|
|
305 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolCompleted += BaseClient_DeleteSymbolCompleted; |
|
306 |
Logger.sendReqLog("DeleteSymbolAsync: ", delItem_ID, 1); |
|
307 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID, RadTab.SelectedIndex); |
|
287 | 308 |
} |
288 | 309 |
|
289 | 310 |
private void BaseClient_DeleteSymbolCompleted(object sender, ServiceDeepView.DeleteSymbolCompletedEventArgs e) |
... | ... | |
358 | 379 |
} |
359 | 380 |
#endregion |
360 | 381 |
|
361 |
#region Symbol Rename Event |
|
382 |
#region Private Symbol Rename Event
|
|
362 | 383 |
private void Rename_Symbol(object sender, RoutedEventArgs e) |
363 | 384 |
{ |
364 | 385 |
if (lstSymbolPrivate.SelectedItem == null) |
... | ... | |
382 | 403 |
} |
383 | 404 |
#endregion |
384 | 405 |
|
406 |
#region Public Symbol Rename Event |
|
407 |
private void Rename_Symbol_Public(object sender, RoutedEventArgs e) |
|
408 |
{ |
|
409 |
if (lstSymbolPublic.SelectedItem == null) |
|
410 |
{ |
|
411 |
DialogMessage_Alert("Please Select Symbol", "Alert"); |
|
412 |
return; |
|
413 |
} |
|
414 |
|
|
415 |
DialogParameters parameters = new DialogParameters() |
|
416 |
{ |
|
417 |
Closed = (obj, args) => this.MarkupReNamePromptClose("", args), |
|
418 |
//DefaultPromptResultValue = "Custom State", |
|
419 |
DefaultPromptResultValue = (lstSymbolPublic.SelectedItem as Symbol_Custom).Name, |
|
420 |
Content = "Name :", |
|
421 |
Header = "Update Custom Symbol Name", |
|
422 |
Theme = new VisualStudio2013Theme(), |
|
423 |
ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 }, |
|
424 |
}; |
|
425 |
RadWindow.Prompt(parameters); |
|
426 |
|
|
427 |
} |
|
428 |
#endregion |
|
385 | 429 |
#region Symbol Rename Close Event |
386 | 430 |
private void MarkupReNamePromptClose(string data, WindowClosedEventArgs args) |
387 | 431 |
{ |
388 | 432 |
if (args.DialogResult != null && args.DialogResult.Value) |
389 | 433 |
{ |
390 |
string _id = (lstSymbolPrivate.SelectedItem as Symbol_Custom).ID; |
|
391 |
string _name = args.PromptResult; |
|
392 |
|
|
393 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted; |
|
394 |
|
|
395 |
Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1); |
|
396 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name); |
|
434 |
if(RadTab.SelectedIndex == 0) |
|
435 |
{ |
|
436 |
string _id = (lstSymbolPrivate.SelectedItem as Symbol_Custom).ID; |
|
437 |
string _name = args.PromptResult; |
|
438 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted; |
|
439 |
Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1); |
|
440 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name, RadTab.SelectedIndex); |
|
441 |
} |
|
442 |
else |
|
443 |
{ |
|
444 |
string _id = (lstSymbolPublic.SelectedItem as Symbol_Custom).ID; |
|
445 |
string _name = args.PromptResult; |
|
446 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted; |
|
447 |
Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1); |
|
448 |
Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name, RadTab.SelectedIndex); |
|
449 |
} |
|
397 | 450 |
} |
398 | 451 |
} |
399 | 452 |
|
내보내기 Unified diff