Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import SwiftUI
- import CoreData
- import Combine
- @main
- struct CotharticrenApp: App {
- /*
- @StateObject var store = LabTableShelf()
- @State private var selectedFolder: String? = "Research"
- @State private var selectedLabTable: LabTable?
- */
- @StateObject var leafstore = pondlily()
- @State private var selectedLeaf: String? = "Research"
- @State private var selectedPond: Pond?
- var body: some Scene {
- WindowGroup {
- EntryView()
- }
- /*
- WindowGroup("Orbit Shapes") {
- ShapesView()
- }.handlesExternalEvents(matching: Set(arrayLiteral: "Shapes"))
- */
- WindowGroup {
- NavigationView {
- ChromiumPond(
- leafstore: leafstore,
- selectedLeaf: $selectedLeaf,
- selectedPond: $selectedPond
- )
- Text("Select leaf...")
- Text("Select pond...")
- }
- }.handlesExternalEvents(matching: Set(arrayLiteral: "ChromiumPond"))
- .commands {
- CommandMenu("Articren") {
- Button(action: {
- OpenPondGlass.ChromiumPond.openpond()
- }){
- Text("Chromium Pond")
- }
- Divider()
- }
- CommandMenu("DART Meadow") {
- Button(action: {
- OpenPondGlass.ExploreDM.exploredm()
- }){
- Text("DART Meadow")
- }
- Divider()
- }
- }
- }
- /*
- WindowGroup {
- NavigationView {
- FactoryLab(
- store: store,
- selectedFolder: $selectedFolder,
- selectedLabTable: $selectedLabTable
- )
- Text("Select folder...")
- Text("Select atm26table...")
- Text("Select orbittable...")
- }
- }.handlesExternalEvents(matching: Set(arrayLiteral: "FactoryLab"))
- */
- /*
- Button(action: {
- OpenWindows.FactoryLab.open()
- }){
- Text("Factory Lab")
- }
- Divider()
- */
- /*
- Button(action: {
- OpenWindows.Shapes.open()
- }){
- Text("Orbit Shapes")
- }
- Divider()
- */
- enum OpenPondGlass: String, CaseIterable {
- /*
- case Orbit = "Orbit"
- case Shapes = "Shapes"
- case ATM26 = "ATM26"
- case FactoryLab = "FactoryLab"
- */
- case ChromiumPond = "ChromiumPond"
- case ExploreDM = "ExploreDM"
- //As many views as you need.
- func exploredm(){
- if let ExploreDM = URL(string: "https://www.dartmeadow.com"){
- NSWorkspace.shared.open(ExploreDM)
- }
- }
- func openpond(){
- if let url = URL(string: "Cotharticren://\(self.rawValue)") { //replace myapp with your app's name
- NSWorkspace.shared.open(url)
- }
- func Google(_ sender: NSMenuItem) {
- if let url = URL(string: "http://google.fi") {
- NSWorkspace.shared.open(url)
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement