public DocumentItem(JsonObject document, IdAllocator idAllocator)
        {
            id   = idAllocator.NextId();
            icon = (Texture2D)EditorGUIUtility.IconContent(
                "GameObject Icon"
                ).image;

            SetDocument(document);
        }
Example #2
0
        public SessionIdItem(
            ClientSessionIdRepository repository,
            IdAllocator idAllocator
            )
        {
            this.Repository  = repository;
            this.idAllocator = idAllocator;

            string sessionId = Repository.GetSessionId() ?? "null";

            id          = idAllocator.NextId();
            displayName = "Session ID [" + sessionId + "]";
            icon        = (Texture2D)EditorGUIUtility.IconContent(
                "CloudConnect"
                ).image;
        }
Example #3
0
        public EmulatedDatabasesItem(
            ArangoRepository repository,
            IdAllocator idAllocator
            )
        {
            this.Repository  = repository;
            this.idAllocator = idAllocator;

            id          = idAllocator.NextId();
            displayName = "Emulated databases";
            icon        = (Texture2D)EditorGUIUtility.IconContent(
                "d_Profiler.Physics"
                ).image;

            BuildChildren();
        }
        public CollectionItem(
            string collectionName,
            Collection collection,
            IdAllocator idAllocator
            )
        {
            CollectionName   = collectionName;
            Collection       = collection;
            this.idAllocator = idAllocator;

            id          = idAllocator.NextId();
            displayName = collectionName;
            icon        = (Texture2D)EditorGUIUtility.IconContent(
                "Folder Icon"
                ).image;

            BuildChildren();
        }
Example #5
0
        public DatabaseItem(
            string databaseName,
            ArangoInMemory database,
            IdAllocator idAllocator
            )
        {
            DatabaseName     = databaseName;
            Database         = database;
            this.idAllocator = idAllocator;

            id          = idAllocator.NextId();
            displayName = databaseName;
            icon        = (Texture2D)EditorGUIUtility.IconContent(
                "Collab.BuildSucceeded"
                ).image;

            BuildChildren();
        }
        private void startCore2Page()
        {
            core2.Project project   = new core2.Project("test", new IdAllocator());
            IdAllocator   allocator = project.Allocator;

            core2.Table pj = allocator.CreateTable("one");
            project.AddTable(pj);
            pj.AddElement(allocator.CreateElement(pj, "one", 1.0));
            pj.AddElement(allocator.CreateElement(pj, "two", 1.0));
            pj.AddElement(allocator.CreateElement(pj, "three", 1.0));
            pj.AddElement(allocator.CreateElement(pj, "four", 1.0));

            core2.Table pj2 = allocator.CreateTable("test2");
            project.AddTable(pj2);
            pj2.AddElement(allocator.CreateElement(pj2, "apple", 1.0));
            pj2.AddElement(allocator.CreateElement(pj2, "orange", 1.0));
            pj2.AddElement(allocator.CreateElement(pj2, "banana", 1.0));
            pj2.AddElement(allocator.CreateElement(pj2, "peach", 1.0));


            core2.Table pj3 = allocator.CreateTable("test3");
            project.AddTable(pj3);
            pj3.AddElement(allocator.CreateElement(pj3, "Toyota", 0.5));
            pj3.AddElement(allocator.CreateElement(pj3, "Ford", 5.0));
            pj3.AddElement(allocator.CreateElement(pj3, "General Motors", 1.0));
            pj3.AddElement(allocator.CreateElement(pj3, "Honda", 10.0));


            pj2.SetParent(project, new Parent(pj.GetElement("one")));
            pj3.SetParent(project, new Parent(pj2.GetElement("orange")));
            pj3.SetParent(project, new Parent(pj.GetElement("three")));

            // pj.AddReference("one", "test2");
            // pj2.AddReference("orange", "test3");
            // pj.AddReference("three", "test3");

            Page page = new EditPage2(project);

            mainFrame.Navigate(page);
        }