public static void LoadLevel(string name, bool isShow, bool bLoadSave, bool fromSave) { if (SceneManager.loading) { UnityEngine.Debug.LogWarning(DU.Warning(new object[] { "Load twice" })); return; } SceneManager.loading = true; LoadMachine.isLoadCompleted = false; LandPlane.m_bAddInput = true; Singleton <HpCautionEffect> .GetInstance().SetRender(false, false); if (isShow && name != "Landing") { Singleton <EZGUIManager> .GetInstance().GetGUI <LoadingMain>().Show(); } if (bLoadSave) { SDManager.SetRoleDate(); SDManager.AddCurSceneDate(); } SceneManager.loadingFromSave = fromSave; Main.Instance.StartCoroutine(SceneManager.WaitToLoad(name)); }
public string Create([Bind(Exclude = "DUID")] FinaceTool.Models.DUTemp dutemp) { string msg; if (dutemp.AMName != 0 && dutemp.SDUName != 0) { DU Dbdu = new DU(); Dbdu.AMID = dutemp.AMName; Dbdu.SDUID = dutemp.SDUName; Dbdu.DUName = dutemp.DUName; Dbdu.DUHeadID = Convert.ToInt16(dutemp.DUHeadName); Dbdu.Createdby = Session["UserName"].ToString(); Dbdu.Modifiedby = Session["UserName"].ToString(); Dbdu.Createddate = System.DateTime.Now; Dbdu.IsActive = true; db.DUs.Add(Dbdu); db.SaveChanges(); } msg = "Saved Successfully"; return(msg); }
public ActionResult MyEditDetails(DU duobj) { return(View()); }
/// <summary>Create a blook pool slice</summary> /// <param name="bpid">Block pool Id</param> /// <param name="volume"> /// /// <see cref="FsVolumeImpl"/> /// to which this BlockPool belongs to /// </param> /// <param name="bpDir">directory corresponding to the BlockPool</param> /// <param name="conf">configuration</param> /// <exception cref="System.IO.IOException"/> internal BlockPoolSlice(string bpid, FsVolumeImpl volume, FilePath bpDir, Configuration conf) { // volume to which this BlockPool belongs to // StorageDirectory/current/bpid/current // directory where finalized replicas are stored // directory store RBW replica // directory store Temporary replica // TODO:FEDERATION scalability issue - a thread per DU is needed this.bpid = bpid; this.volume = volume; this.currentDir = new FilePath(bpDir, DataStorage.StorageDirCurrent); this.finalizedDir = new FilePath(currentDir, DataStorage.StorageDirFinalized); this.lazypersistDir = new FilePath(currentDir, DataStorage.StorageDirLazyPersist); if (!this.finalizedDir.Exists()) { if (!this.finalizedDir.Mkdirs()) { throw new IOException("Failed to mkdirs " + this.finalizedDir); } } this.deleteDuplicateReplicas = conf.GetBoolean(DFSConfigKeys.DfsDatanodeDuplicateReplicaDeletion , DFSConfigKeys.DfsDatanodeDuplicateReplicaDeletionDefault); // Files that were being written when the datanode was last shutdown // are now moved back to the data directory. It is possible that // in the future, we might want to do some sort of datanode-local // recovery for these blocks. For example, crc validation. // this.tmpDir = new FilePath(bpDir, DataStorage.StorageDirTmp); if (tmpDir.Exists()) { FileUtil.FullyDelete(tmpDir); } this.rbwDir = new FilePath(currentDir, DataStorage.StorageDirRbw); bool supportAppends = conf.GetBoolean(DFSConfigKeys.DfsSupportAppendKey, DFSConfigKeys .DfsSupportAppendDefault); if (rbwDir.Exists() && !supportAppends) { FileUtil.FullyDelete(rbwDir); } if (!rbwDir.Mkdirs()) { // create rbw directory if not exist if (!rbwDir.IsDirectory()) { throw new IOException("Mkdirs failed to create " + rbwDir.ToString()); } } if (!tmpDir.Mkdirs()) { if (!tmpDir.IsDirectory()) { throw new IOException("Mkdirs failed to create " + tmpDir.ToString()); } } // Use cached value initially if available. Or the following call will // block until the initial du command completes. this.dfsUsage = new DU(bpDir, conf, LoadDfsUsed()); this.dfsUsage.Start(); // Make the dfs usage to be saved during shutdown. ShutdownHookManager.Get().AddShutdownHook(new _Runnable_145(this), ShutdownHookPriority ); }