Esempio n. 1
0
 public static bool ShouldShowWindow()
 {
     if (!FolderManager.Exists())
     {
         FolderManagerGUI.Title("First Time Setup");
         GUILayout.Space(20);
         if (GUILayout.Button("Start Making My Life Easier!"))
         {
             if (FolderManager.Create())
             {
                 return(true);
             }
         }
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        internal static Folder Create(IDataStore dataStore, IApplicationSettings applicationSettings, IApplication application, Inbox inbox, Random random)
        {
            FolderManager manager = new FolderManager(dataStore);

            Folder folder = new Folder(
                inbox
                , "TestThread " + random.Next(1000000, 10000000));

            BusinessObjectActionReport <DataRepositoryActionStatus> report = manager.Create(folder);

            Assert.AreEqual(DataRepositoryActionStatus.Success, report.Status);
            Assert.Greater(folder.FolderId, 0);

            Folder dsThread = manager.GetFolder(folder.FolderId);

            Assert.IsNotNull(dsThread);

            return(dsThread);
        }
Esempio n. 3
0
        public JsonResult CreateFolder(string path, string name)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }

            FolderManager.Create(path, name);
            var newPath = path + @"\" + name;

            var newNode = CreateNewFolderNode(name, newPath);

            MemoryNodes.Add(newNode);

            var res = new TreeViewModel {
                factor = new List <NodeViewModel> {
                    newNode
                }, status = true, prompt = string.Empty
            };

            return(Json(res, JsonRequestBehavior.AllowGet));
        }