private void PrintCurrentLabel() { if (!CheckLicense()) { return; } if (SelectedLabelView != null && SelectedLabelView.DataContext is LabelViewModel) { var pWin = new PrintWindow(RegionManager) { Title = "Print Label" }; var LVM = SelectedLabelView.DataContext as LabelViewModel; var pVM = pWin.DataContext as PrintWindowViewModel; if (pVM.Initialize(LVM.Label, LVM.ObjectList, LVM.RuleList)) { var pLV = new PrintLabelView() { DataContext = pVM }; pWin.SetPrintLabelView(pLV); pWin.Owner = Application.Current.MainWindow; pWin.ShowDialog(); } else { DialogService.ShowSimpleTextDialog(Application.Current.MainWindow, "Warning", "2개 이상의 Sequential Number 규칙이 적용되었습니다."); } } }