Selaa lähdekoodia

【综合】转档引导逻辑完善

niehaoyu 1 vuosi sitten
vanhempi
commit
c53c417214

+ 198 - 8
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -7,33 +7,223 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "4866007A-0701-444E-AFC7-C571286D5EE8"
+            uuid = "58215A11-E067-4E21-81D8-26BD345FE5C5"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/GuideInfo/Controllers/OpenFileGuide/KMOpenFileGuidePanel.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "130"
+            endingLineNumber = "130"
+            landmarkName = "updateViewColor()"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "58215A11-E067-4E21-81D8-26BD345FE5C5 - e377629d1c98e4c7"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master.KMOpenFileGuidePanel.updateViewColor() -&gt; ()"
+                  moduleName = "PDF Master"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/GuideInfo/Controllers/OpenFileGuide/KMOpenFileGuidePanel.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "130"
+                  endingLineNumber = "130"
+                  offsetFromSymbolStart = "1844">
+               </Location>
+               <Location
+                  uuid = "58215A11-E067-4E21-81D8-26BD345FE5C5 - 32c35c7a28ba4894"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master_DMG.KMOpenFileGuidePanel.updateViewColor() -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/GuideInfo/Controllers/OpenFileGuide/KMOpenFileGuidePanel.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "130"
+                  endingLineNumber = "130"
+                  offsetFromSymbolStart = "796">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "770E4A49-AE8B-4D16-BE6A-9C03F79E1C27"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "709"
-            endingLineNumber = "709"
+            startingLineNumber = "727"
+            endingLineNumber = "727"
             landmarkName = "loadOpenFileFunctionGuide(_:)"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "770E4A49-AE8B-4D16-BE6A-9C03F79E1C27 - 7f6d6c511fd317b4"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "function signature specialization &lt;Arg[0] = Dead, Arg[1] = Dead, Arg[3] = Dead&gt; of PDF_Master_DMG.KMMainViewController.mainToolDidClicked(PDF_Master_DMG.KMToolbarController, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarItemView, Swift.Array&lt;Swift.Int&gt;) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "953"
+                  endingLineNumber = "953"
+                  offsetFromSymbolStart = "52">
+               </Location>
+               <Location
+                  uuid = "770E4A49-AE8B-4D16-BE6A-9C03F79E1C27 - 7f6d6c511fd317b4"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "function signature specialization &lt;Arg[0] = Dead, Arg[1] = Dead, Arg[3] = Dead&gt; of PDF_Master_DMG.KMMainViewController.mainToolDidClicked(PDF_Master_DMG.KMToolbarController, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarItemView, Swift.Array&lt;Swift.Int&gt;) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "953"
+                  endingLineNumber = "953"
+                  offsetFromSymbolStart = "116">
+               </Location>
+               <Location
+                  uuid = "770E4A49-AE8B-4D16-BE6A-9C03F79E1C27 - 1c095f84a4a7372d"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #5 @Swift.MainActor () -&gt; () in PDF_Master_DMG.KMMainViewController.loadOpenFileFunctionGuide(PDF_Master_DMG.KMGuideInfoType) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "729"
+                  endingLineNumber = "729"
+                  offsetFromSymbolStart = "296">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "58215A11-E067-4E21-81D8-26BD345FE5C5"
+            uuid = "903D6DDB-4B0A-46CE-AC26-BED5BBAC004A"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/GuideInfo/Controllers/OpenFileGuide/KMOpenFileGuidePanel.swift"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "130"
-            endingLineNumber = "130"
-            landmarkName = "updateViewColor()"
+            startingLineNumber = "651"
+            endingLineNumber = "651"
+            landmarkName = "loadOpenFileFunctionGuide(_:)"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "903D6DDB-4B0A-46CE-AC26-BED5BBAC004A - 7f6d6c511fd317b4"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "function signature specialization &lt;Arg[0] = Dead, Arg[1] = Dead, Arg[3] = Dead&gt; of PDF_Master_DMG.KMMainViewController.mainToolDidClicked(PDF_Master_DMG.KMToolbarController, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarItemView, Swift.Array&lt;Swift.Int&gt;) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "953"
+                  endingLineNumber = "953"
+                  offsetFromSymbolStart = "52">
+               </Location>
+               <Location
+                  uuid = "903D6DDB-4B0A-46CE-AC26-BED5BBAC004A - 7f6d6c511fd317b4"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "function signature specialization &lt;Arg[0] = Dead, Arg[1] = Dead, Arg[3] = Dead&gt; of PDF_Master_DMG.KMMainViewController.mainToolDidClicked(PDF_Master_DMG.KMToolbarController, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarViewType, PDF_Master_DMG.KMToolbarItemView, Swift.Array&lt;Swift.Int&gt;) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "953"
+                  endingLineNumber = "953"
+                  offsetFromSymbolStart = "116">
+               </Location>
+               <Location
+                  uuid = "903D6DDB-4B0A-46CE-AC26-BED5BBAC004A - 5eaa69c29ceb85e0"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Master_DMG.KMMainViewController.loadOpenFileFunctionGuide(PDF_Master_DMG.KMGuideInfoType) -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "651"
+                  endingLineNumber = "651"
+                  offsetFromSymbolStart = "248">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "DB0771E1-CC58-41E1-A794-02CDE3656544"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "644"
+            endingLineNumber = "644"
+            landmarkName = "loadFunctionGuide()"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "DB0771E1-CC58-41E1-A794-02CDE3656544 - 1a8ffc9706f3f8c2"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 @Swift.MainActor () -&gt; () in PDF_Master_DMG.KMMainViewController.loadFunctionGuide() -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "646"
+                  endingLineNumber = "646"
+                  offsetFromSymbolStart = "88">
+               </Location>
+               <Location
+                  uuid = "DB0771E1-CC58-41E1-A794-02CDE3656544 - 1a8ffc9706f3f800"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "closure #1 @Swift.MainActor () -&gt; () in PDF_Master_DMG.KMMainViewController.loadFunctionGuide() -&gt; ()"
+                  moduleName = "PDF Master DMG"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "644"
+                  endingLineNumber = "644"
+                  offsetFromSymbolStart = "88">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
    </Breakpoints>

+ 29 - 26
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -649,31 +649,6 @@ import Cocoa
     
     func loadOpenFileFunctionGuide(_ showType: KMGuideInfoType) -> Void {
         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];
-//            guideWC.window.collectionBehavior |= self.window.collectionBehavior & NSWindowCollectionBehaviorCanJoinAllSpaces;
-//            guideWC.normalGuideFinishHandle = ^(KMGuideInfoWindowController * _Nonnull windowVC) {
-//                windowVC.rightPanelRect = [self.window.contentView convertRect:self.toolbarController.rightPanelModeBox.frame fromView:self.toolbarController.rightPanelModeBox.superview];
-//                guideWC.digitalBoxRect = [self.window.contentView convertRect:self.toolbarController.digitalSignBox.frame fromView:self.toolbarController.digitalSignBox.superview];
-//            };
-//            guideWC.finishHandle = ^(KMGuideInfoWindowController * _Nonnull windowVC, enum KMGuideActionType type) {
-//                if (type == KMGuideActionTypeWindowNewFinish ||
-//                    type == KMGuideActionTypeWindowDigitalFinish) {
-//                    [self checkFirstTrialController];
-//                }
-//            };
-//            guideWC.openFileToggleHandle = ^(KMGuideInfoWindowController * _Nonnull windowVC, enum KMGuideInfoType type) {
-//                [self loadOpenFileNormalProperty:type];
-//            };
-//            
-//            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 leftPanelItem:KMToolbarItemView = self.toolbarController.findItem("KMLeftControlToolbarItemIdentifier")!
             
             let guideWC = KMGuideInfoWindowController.currentWC()
@@ -745,9 +720,37 @@ import Cocoa
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
                 let guideWC = KMGuideInfoWindowController.currentWC()
                 guideWC.type = .convertGuide
-                
                 let digitalPanelItem:KMToolbarItemView = self.toolbarController.findItem(KMDocumentDigitalSignToolbarItemIdentifier)!
                 guideWC.digitalBoxRect = (self.view.window?.contentView?.convert(digitalPanelItem.frame, from: digitalPanelItem.superview))!
+                guideWC.purchaseHandle = { [weak self] windowVC in
+#if VERSION_DMG
+                    if IAPProductsManager.default().isAvailableAllFunction() {
+                        if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
+                            //Convert:
+                        } else {
+                            var limitWC = KMPurchaseLimitWindowController.currentLimitWC()
+                            limitWC.continueBlock = { [weak self] windowController in
+                                
+                            }
+                            limitWC.window?.center()
+                            limitWC.showWindow(nil)
+                        }
+                    } else {
+                        KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+                    }
+#else
+                    if IAPProductsManager.default().isAvailableAllFunction() {
+                        if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
+                            //Convert:
+                        } else {
+                            var vc = KMToolCompareWindowController(toolType: .Convert, selectNum: 1)
+                            vc.showWindow(nil)
+                        }
+                    } else {
+                        KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+                    }
+#endif
+                }
                 
                 guideWC.window?.collectionBehavior = [.canJoinAllSpaces]
                 var rect = self.view.window!.frame