public void LoadData(LoadingType loadingType) { loadTimer.Stop(); if (!IsLoading) { switch (loadingType) { case LoadingType.ChangedMaxRows: case LoadingType.ChangedDataInCurrentPage: case LoadingType.ChangedSelectedPage: case LoadingType.ChangedSearchCriteria: case LoadingType.ChangedBrandItems: AsyncOperationService .PerformAsyncOperation(AsyncOperationType.LoadCatalog, LoadPricelist, !IsLoading, ActionAfterLoadCatalog); break; case LoadingType.ChangedDirectoryItems: AsyncOperationService .PerformAsyncOperation(AsyncOperationType.LoadBrands, LoadBrands, !IsLoading, ActionAfterLoadBrand); break; case LoadingType.СhangedAdvancedSearch: AsyncOperationService .PerformAsyncOperation(AsyncOperationType.LoadDirectories, LoadDirectories, !IsLoading, ActionAfterLoadDirectory); break; default: throw new ArgumentOutOfRangeException(); } } }
private void ToggleLoading(LoadingType loadingType) { try { uDebugLogAdd($"Toggling loading label to: {loadingType.ToString()}"); if (_loadingInProgress != LoadingType.Start && loadingType == LoadingType.Start) { uDebugLogAdd($"Current loading: {_loadingInProgress.ToString()} | Toggled to: {loadingType.ToString()} | Starting loading label up"); tLoadingStart(); } else if (loadingType == LoadingType.Done) { uDebugLogAdd($"Setting loading to: {loadingType.ToString()}"); _loadingInProgress = LoadingType.Done; } else { _loadingInProgress = LoadingType.Done; } uDebugLogAdd($"Loading now: {loadingType.ToString()}"); } catch (Exception ex) { LogException(ex); } }
public void StartLoading(AsyncOperation asyncOperation) { _asyncOperation = asyncOperation; _asyncOperation.allowSceneActivation = false; StartCoroutine(spinner(asyncOperation)); loadingType = LoadingType.Percentage; }
/// <summary> /// /// </summary> /// <param name="callback"></param> /// <param name="textruename"></param>加载图片的路径名字 public void Show(EventDelegate callback) { InLoading = true; BeginHide = false; //gameObject.SetActive(true); loadingType = LoadingType.FadeOut; curCallBack = callback; FadeOutTexture.mainTexture = Resources.Load(StringBuilderTool.ToInfoString("BackGround/", LoadingPicName)) as Texture; FadeOutRoot.SetActive(true); iTween.ValueTo(gameObject, iTween.Hash( "name", "FadeOut", "from", 0f, "to", 1f, "easetype", iTween.EaseType.easeInOutCubic, "loopType", iTween.LoopType.none, "onupdate", "ChangeFadeOutPlaneAlpha", "oncomplete", "ShowOver", "time", LoadingConsuming * 1.5f)); StartCoroutine("RunShowLoadingPoint"); ProgressBar.value = 0; }
/// <summary> /// 打开一个LoadingNode /// </summary> /// <param name="type">Loading类型</param> /// <param name="describe">描述</param> /// <param name="progress">加载进度</param> public static void OpenLoadingNode(LoadingType type, string describe = null, float progress = 0, long fileAllLength = 0) { instance = NodeManager.OpenFloatNode <LoadingNode>(); if (instance.transform.parent != PageManager.Instance.transform) { NodeManager.DontDestroyAtChangePage(instance); } switch (type) { case LoadingType.Common: instance.commonLoadingPnl.SetActive(true); instance.downLoadingPnl.SetActive(false); break; case LoadingType.Progress: instance.commonLoadingPnl.SetActive(false); instance.downLoadingPnl.SetActive(true); instance.downLoadingProgressRtf.sizeDelta = new Vector2(downLoadingWidth * progress, downLoadingHeight); string allLength = MiscUtils.GetMillionFromByte(fileAllLength).ToString("F2"); string currlength = MiscUtils.GetMillionFromByte((long)(fileAllLength * progress)).ToString("F2"); instance.progressTxt.text = "<color=#8CF976FF>" + currlength + "MB</color>/<color=#FEE646FF>" + allLength + "MB</color>"; break; } if (!string.IsNullOrEmpty(describe)) { instance.describe.text = describe; } else { instance.describe.text = defaultLoadingDes; } }
public LoadingForm(MainForm form, LoadingType type, object arg) { InitializeComponent(); // Set members mainForm = form; loadingType = type; argument = arg; }
internal ResourceManager(LoadingType loadingType) { this.images = new Dictionary <string, Texture2DHolder>(); this.audios = new Dictionary <string, AudioHolder>(); this.animations = new Dictionary <string, eAnim>(); this.otherAnimations = new Dictionary <string, Core.Animation>(); type = loadingType; }
private ResourceManager() { this.images = new Dictionary<string, Texture2DHolder> (); this.animations = new Dictionary<string, eAnim> (); if (Game.Instance != null) { type = Game.Instance.getLoadingType (); } else type = LoadingType.SYSTEM_IO; }
private void DisposeLoading() { _loading.ContinueWith(p => { if (p.Result.ThumbnailImage != Default) { p.Result.ThumbnailImage?.Dispose(); } }, TaskContinuationOptions.OnlyOnRanToCompletion); _loadingType = LoadingType.None; }
public LoadingData( LoadingType type, string comment, string loadingObjName, object data) { this.type = type; this.comment = comment; this.loadingObjName = loadingObjName; this.data = data; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="timelineModel">TimelineModel</param> /// <param name="type">ロードタイプ</param> /// <param name="parameter">パラメーター</param> public LoadingProperties(TimelineModel timelineModel, LoadingType type, object parameter = null) { this.TimelineModel = timelineModel; this.Type = type; if (parameter != null) { this.Parameter = parameter; } this.LoadCommand = new RelayCommand <object>(this.Load); }
GameObject ILoadingFactory.Create(LoadingType type) { if (type == LoadingType.Sample) { return(_container.InstantiatePrefab(_samplePrefab)); } else { return(_container.InstantiatePrefab(_settings.Prefabs[(int)type])); } }
private ResourceManager() { this.images = new Dictionary <string, Texture2DHolder> (); this.animations = new Dictionary <string, eAnim> (); if (Game.Instance != null) { type = Game.Instance.getLoadingType(); } else { type = LoadingType.SYSTEM_IO; } }
private void Invalidate() { var current = _current; _loading.ContinueWith(p => { if (p.Result.ThumbnailImage != Default && p.Result.ThumbnailImage != current) { p.Result.ThumbnailImage?.Dispose(); } }, TaskContinuationOptions.OnlyOnRanToCompletion); _loadingType = LoadingType.None; }
/// <summary> /// 加载场景 /// </summary> /// <param name="levelName">场景名字</param> /// <param name="loadSceneMode">加载类型</param> public void LoadScene(string levelName, LoadingType loadingType = LoadingType.Single) { switch (loadingType) { case LoadingType.Additive: UnityEngine.SceneManagement.SceneManager.LoadScene(levelName, UnityEngine.SceneManagement.LoadSceneMode.Additive); break; case LoadingType.Single: UnityEngine.SceneManagement.SceneManager.LoadScene(levelName, UnityEngine.SceneManagement.LoadSceneMode.Single); break; default: break; } }
/// <summary> /// 加载场景 /// </summary> /// <param name="levelName">场景名字</param> /// <param name="loadSceneMode">加载类型</param> public static void LoadScene(string levelName, LoadingModeType loadingModeType, LoadingType loadingType = LoadingType.Single) { switch (loadingModeType) { case LoadingModeType.UnityLocal: unityLocal_SceneLoadingl.LoadScene(levelName, loadingType); break; case LoadingModeType.Octree: UnityEngine.Debug.Log("我还没写哦~~~"); break; default: break; } }
public static void initDesigner(SteelGrade Grade, LoadingType LoadingType, double _LUnsupported, double _LbInPlan, double _LbOutPlan, SectionI _ColumnSection, /*, HndzISectionProfile _BeamSection, HndzColumnStandardCase _columnTapered, * HndzBeamStandrdCase _beamTapered*/HndzAnalysisResults _AppliedLoadsStart, HndzAnalysisResults _AppliedLoadsEnd) { switch (LoadingType) { case LoadingType.Case1: CaseStress = 1.0; break; case LoadingType.Case2: CaseStress = 1.2; break; } // LbInPlan = _LbInPlan; //LbOutPlan = _LbOutPlan; // LUnsupported = _LUnsupported; BuiltUpSection = _ColumnSection; AppliedLoadsStart = _AppliedLoadsStart; AppliedLoadsEnd = _AppliedLoadsEnd; //BuiltUpSectionRafter = _BeamSection; //columnTapered = _columnTapered; //beamTapered = _beamTapered; switch (Grade) { case SteelGrade.st37: Fy = 2.4; Fu = 3.6; FcP1 = 1.4; FcP2 = 0.000065; break; case SteelGrade.st44: Fy = 2.8; Fu = 4.4; FcP1 = 1.6; FcP2 = 0.000085; break; case SteelGrade.st52: Fy = 3.6; Fu = 5.2; FcP1 = 2.1; FcP2 = 0.000135; break; } }
/// <summary> /// 异步加载场景 /// </summary> /// <param name="levelName">场景名字</param> /// <param name="startLoading">开始回调</param> /// <param name="stayLoading">进程回调</param> /// <param name="endLoading">结束回调</param> /// <param name="loadSceneMode">加载类型</param> public static void LoadSceneAsync(string levelName, LoadingModeType loadingModeType, Action _startLoading = null, Action <float> _updateLoading = null, Action _endLoading = null, LoadingType loadingType = LoadingType.Single) { switch (loadingModeType) { case LoadingModeType.UnityLocal: MainSystem.Instance.OnStartCoroutine(unityLocal_SceneLoadingl.LoadSceneAsync(levelName, _startLoading, _updateLoading, _endLoading, loadingType)); break; case LoadingModeType.Octree: UnityEngine.Debug.LogError("我还没写哦~~~"); break; default: break; } }
public static void initDesigner(SteelGrade Grade, LoadingType LoadingType, HndzISectionProfile _ColumnSection, HndzISectionProfile _BeamSection, HndzColumnStandardCase _columnTapered, HndzBeamStandrdCase _beamTapered) { switch (LoadingType) { case LoadingType.Case1: CaseStress = 1.0; break; case LoadingType.Case2: CaseStress = 1.2; break; } BuiltUpSection = _ColumnSection; BuiltUpSectionRafter = _BeamSection; columnTapered = _columnTapered; beamTapered = _beamTapered; switch (Grade) { case SteelGrade.st37: Fy = 2.4; Fu = 3.6; FYX = 1.4; FYXZ = 0.000065; break; case SteelGrade.st44: Fy = 2.8; Fu = 4.4; FYX = 1.6; FYXZ = 0.000085; break; case SteelGrade.st52: Fy = 3.6; Fu = 5.2; FYX = 2.1; FYXZ = 0.000135; break; } }
public string GetEnumWithSpaces(LoadingType loadingType) { string text = loadingType.ToString(); if (string.IsNullOrWhiteSpace(text)) { return(""); } StringBuilder newText = new StringBuilder(text.Length * 2); newText.Append(text[0]); for (int i = 1; i < text.Length; i++) { if (char.IsUpper(text[i]) && text[i - 1] != ' ') { newText.Append(' '); } newText.Append(text[i]); } return(newText.ToString()); }
/// <summary> /// 异步加载场景 /// </summary> /// <param name="levelName">场景名字</param> /// <param name="startLoading">开始回调</param> /// <param name="endLoading">结束回调</param> /// <param name="loadSceneMode">加载类型</param> public IEnumerator LoadSceneAsync(string levelName, Action _startLoading = null, Action <float> _updateLoading = null, Action _endLoading = null, LoadingType loadingType = LoadingType.Single) { UnityEngine.AsyncOperation asyncOperation = default(UnityEngine.AsyncOperation); switch (loadingType) { case LoadingType.Additive: asyncOperation = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(levelName, UnityEngine.SceneManagement.LoadSceneMode.Additive); break; case LoadingType.Single: asyncOperation = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(levelName, UnityEngine.SceneManagement.LoadSceneMode.Single); break; default: break; } asyncOperation.completed += AsyncLoading_completed; startLoading = _startLoading; updateLoading = _updateLoading; endLoading = _endLoading; startLoading?.Invoke(); while (!asyncOperation.isDone) { updateLoading?.Invoke(asyncOperation.progress); MTEvent.EventParamete eventParamete = new MTEvent.EventParamete(); eventParamete.AddParameter(asyncOperation.progress); EventManager.TriggerEvent(MTEvent.GenericEventEnumType.Message, LoadingMessageType.LoadingProcess.ToString(), eventParamete); yield return(new WaitForFixedUpdate()); } yield return(asyncOperation); }
/// <summary> /// 打开一个LoadingNode /// </summary> /// <param name="type">Loading类型</param> /// <param name="describe">描述</param> /// <param name="progress">加载进度</param> public static void OpenLoadingNode(LoadingType type, string describe = null, float progress = 0) { if (instance == null) { instance = NodeManager.OpenNode <LoadingNode>(null, null, false, false); } switch (type) { case LoadingType.Common: instance.progress.gameObject.SetActive(false); instance.StartCoroutine(instance.SetTimer()); break; case LoadingType.Progress: instance.progress.gameObject.SetActive(true); instance.progress.text = (progress * 100).ToString("F1"); break; } if (!string.IsNullOrEmpty(describe)) { instance.describe.text = describe; } }
public LoadingHelper(LoadingType type, Window window = null) { if (type == LoadingType.Circle) { loading = new Loading(window); opened = true; } else if (type == LoadingType.Progress) { thread = new Thread(new ThreadStart(() => { loading = new ProgressLoading(); opened = true; loading.IShowDialog(); })); thread.TrySetApartmentState(ApartmentState.STA); thread.Start(); } else { throw new ArgumentNullException(); } }
private IEnumerator lampCoroutine; // 灯光闪烁的动画协程 /// <summary> /// 初始化加载场景 /// </summary> /// <param name="loadingType">加载类型.</param> /// <param name="beginLoadCallBack">Begin load call back.</param> /// <param name="finishLoadingCallBack">Finish loading call back.</param> public void SetUpLoadingView(LoadingType loadingType, CallBack beginLoadCallBack, CallBack finishLoadingCallBack) { //this.loadingType = loadingType; if (beginLoadCallBack != null) { beginLoadCallBack(); } this.finishLoadingCallBack = finishLoadingCallBack; // 初始化加载进度条 loadingBar.InitHLHFillBar(100, 0); int tintIndex = Random.Range(0, CommonData.gameTints.Length); gameTint.text = CommonData.gameTints[tintIndex]; GetComponent <Canvas>().enabled = true; lampCoroutine = LampAnimation(); StartCoroutine(lampCoroutine); switch (loadingType) { case LoadingType.EnterExplore: //Player.mainPlayer.canSave = false; IEnumerator loadingAndEnterExploreCoroutine = LoadingBarAnimationEnterExplore(); StartCoroutine(loadingAndEnterExploreCoroutine); break; case LoadingType.QuitExplore: IEnumerator loadingAndQuitExploreCoroutine = LoadingBarAnimationQuitExplore(); StartCoroutine(loadingAndQuitExploreCoroutine); break; } }
public void UpdateLoading(LoadingType loadingType, float percentDone) { if (percentDone > 99.5f) { percentDone = 100; } int index = (int)loadingType; float totalPercentDone = 0; for (int i = 0; i < index; i++) { totalPercentDone += (loadingTypeList[i].stepCount * percentJumpPerStep); } float extra = MathHelper.Lerp(0, loadingTypeList[index].stepCount * percentJumpPerStep, percentDone * 0.01f); totalPercentDone += extra; GetUiControl("DoingLabel").SetText(GetEnumWithSpaces(loadingType)); GetUiControl("PercentLabel").SetText(Convert.ToString((int)percentDone) + "%"); GetUiControl("TotalLabelPercent").SetText(Convert.ToString((int)totalPercentDone) + "%"); }
public void Show(LoadingType type) { _onShow.OnNext(type); }
void ILoadingController.Show(LoadingType type) { _onShow.OnNext(type.ToString()); }
public ResourceAsyncLoadingRequest(ResourceRequest req) { this.dependenciesRequest = new List <AssetBundleCreateRequest>(); this.resRequest = req; this.type = LoadingType.RESOURCE_REQUEST; }
public ResourceAsyncLoadingRequest(AssetBundleRequest req) { this.dependenciesRequest = new List <AssetBundleCreateRequest>(); this.abRequest = req; this.type = LoadingType.ASSETBUNDLE_REQUEST; }
public LoadingSectionCompleted(LoadingType theType, int nLoaded, string strMessage) { this.Type = theType; this.NumberLoaded = nLoaded; this.Message = strMessage; }
public LoadingSectionStarted(LoadingType theType) { this.Type = theType; }