|
@@ -640,14 +640,14 @@ import Cocoa
|
|
|
func loadFunctionGuide() -> Void {
|
|
|
|
|
|
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
|
|
|
- self.loadOpenFileFunctionGuide()
|
|
|
+ self.loadOpenFileFunctionGuide(.openFileNormal)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- func loadOpenFileFunctionGuide() -> Void {
|
|
|
+ func loadOpenFileFunctionGuide(_ showType: KMGuideInfoType) -> Void {
|
|
|
|
|
|
- if KMGuideInfoWindowController.availableShow(.openFileNormal) {
|
|
|
+ if showType == .openFileNormal && KMGuideInfoWindowController.availableShow(.openFileNormal) {
|
|
|
// KMGuideInfoWindowController *guideWC = [KMGuideInfoWindowController currentWC];
|
|
|
// guideWC.type = KMGuideInfoTypeOpenFileNormal;
|
|
|
// guideWC.openPanelRect = [self.window.contentView convertRect:self.toolbarController.viewPanelModeBox.frame fromView:self.toolbarController.viewPanelModeBox.superview];
|
|
@@ -702,8 +702,62 @@ import Cocoa
|
|
|
guideWC.show()
|
|
|
|
|
|
|
|
|
- } else if KMGuideInfoWindowController.availableShow(.digitalSignGuide) {
|
|
|
+ } else if showType == .digitalSignGuide && KMGuideInfoWindowController.availableShow(.digitalSignGuide) {
|
|
|
+ // KMGuideInfoWindowController *guideWC = [KMGuideInfoWindowController currentWC];
|
|
|
+ // guideWC.type = KMGuideInfoTypeDigitalSignGuide;
|
|
|
+ // guideWC.digitalBoxRect = [self.window.contentView convertRect:self.toolbarController.digitalSignBox.frame fromView:self.toolbarController.digitalSignBox.superview];
|
|
|
+ // guideWC.window.collectionBehavior |= self.window.collectionBehavior & NSWindowCollectionBehaviorCanJoinAllSpaces;
|
|
|
+ // guideWC.finishHandle = ^(KMGuideInfoWindowController * _Nonnull windowVC, enum KMGuideActionType type) {
|
|
|
+ // if (type == KMGuideActionTypeWindowNewFinish ||
|
|
|
+ // type == KMGuideActionTypeWindowDigitalFinish) {
|
|
|
+ // [self checkFirstTrialController];
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+ //
|
|
|
+ // CGRect rect = self.window.frame;
|
|
|
+ // rect.size.height -= 20;
|
|
|
+ // [guideWC.window setFrame:rect display:NO];
|
|
|
+ // [guideWC.window setMinSize:rect.size];
|
|
|
+ // [guideWC.window setMaxSize:rect.size];
|
|
|
+ // [self.window addChildWindow:guideWC.window ordered:NSWindowAbove];
|
|
|
+ // [guideWC show];
|
|
|
|
|
|
+ let guideWC = KMGuideInfoWindowController.currentWC()
|
|
|
+ guideWC.type = .digitalSignGuide
|
|
|
+ let digitalPanelItem:KMToolbarItemView = self.toolbarController.findItem(KMDocumentDigitalSignToolbarItemIdentifier)!
|
|
|
+ guideWC.digitalBoxRect = (self.view.window?.contentView?.convert(digitalPanelItem.frame, from: digitalPanelItem.superview))!
|
|
|
+ guideWC.window?.collectionBehavior = [.canJoinAllSpaces]
|
|
|
+ guideWC.finishHandle = { [weak self] windowVC, type in
|
|
|
+
|
|
|
+ }
|
|
|
+ var rect = self.view.window!.frame
|
|
|
+ rect.size.height -= 20
|
|
|
+ guideWC.window?.setFrame(rect, display: false)
|
|
|
+ guideWC.window?.minSize = rect.size
|
|
|
+ guideWC.window?.maxSize = rect.size
|
|
|
+ self.view.window?.addChildWindow(guideWC.window!, ordered: .above)
|
|
|
+ guideWC.show()
|
|
|
+
|
|
|
+ } else if showType == .pdfCompareGuide && KMGuideInfoWindowController.availableShow(.pdfCompareGuide) {
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
|
|
|
+ let guideWC = KMGuideInfoWindowController.currentWC()
|
|
|
+ guideWC.type = .pdfCompareGuide
|
|
|
+
|
|
|
+ let digitalPanelItem:KMToolbarItemView = self.toolbarController.findItem(KMDocumentDigitalSignToolbarItemIdentifier)!
|
|
|
+ guideWC.digitalBoxRect = (self.view.window?.contentView?.convert(digitalPanelItem.frame, from: digitalPanelItem.superview))!
|
|
|
+
|
|
|
+ let compareItem:KMToolbarItemView = self.toolbarController.findItem(KMToolbarComparisonItemIdentifier)!
|
|
|
+ guideWC.compareItemRect = (self.view.window?.contentView?.convert(compareItem.frame, from: compareItem.superview))!
|
|
|
+
|
|
|
+ guideWC.window?.collectionBehavior = [.canJoinAllSpaces]
|
|
|
+ var rect = self.view.window!.frame
|
|
|
+ rect.size.height -= 20
|
|
|
+ guideWC.window?.setFrame(rect, display: false)
|
|
|
+ guideWC.window?.minSize = rect.size
|
|
|
+ guideWC.window?.maxSize = rect.size
|
|
|
+ self.view.window?.addChildWindow(guideWC.window!, ordered: .above)
|
|
|
+ guideWC.show()
|
|
|
+ }
|
|
|
} else {
|
|
|
|
|
|
}
|