public void Regist(IReloader action) { var v = new RetryValue() { action = action, basicCount = basicCount }; v.Load(); values.Add(v); }
public PasswordResetProcessor(IServiceContainer serviceContainer) : base(serviceContainer) { this.userProvider = serviceContainer.GetService <IUserProvider>(); this.userService = serviceContainer.GetService <IBaseService <User> >(); this.mailQueueService = serviceContainer.GetService <IMailQueueService>(); this.razorLightEngine = serviceContainer.GetService <IRazorLightEngine>(); this.reloader = serviceContainer.GetServices <IReloader <PasswordResetViewModel> >().First(); this.translationManager = serviceContainer.GetService <ITranslationManager>(); this.httpContextAccessor = serviceContainer.GetService <IHttpContextAccessor>(); }
public void Load(IReloader action) { for (int i = 0; i < values.Count; i++) { if (values[i].action == action) { values[i].Load(); break; } } }
//---------------------------------------------------------------------------------------------------------------------- static void UpdateImageFolderPlayableAsset(bool isEditorFocused) { if (!isEditorFocused) { return; } if (null == TimelineEditor.inspectedAsset) { return; } IEnumerable <TrackAsset> trackAssets = TimelineEditor.inspectedAsset.GetOutputTracks(); foreach (TrackAsset trackAsset in trackAssets) { BaseTrack baseTrack = trackAsset as BaseTrack; if (null == baseTrack) { continue; } if (!BitUtility.IsSet((int)baseTrack.GetCapsV(), (int)SISTrackCaps.IMAGE_FOLDER)) { continue; } IEnumerable <TimelineClip> clips = trackAsset.GetClips(); foreach (TimelineClip clip in clips) { IReloader imageFolderPlayableAsset = clip.asset as IReloader; Assert.IsNotNull(imageFolderPlayableAsset); imageFolderPlayableAsset.Reload(); } } }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (QuickParameters.SortBy != QuickSort.Random) { Control ctrlPagTop = LoadControl("/UserControls/Pager.ascx"); ctrlPagTop.Visible = topPagerVisible; pagerTop = ctrlPagTop as IPager; pagerTop.BrowsableControl = this; pagerTop.PageSize = QuickParameters.PageSize; pagerTop.CustomText = TopPagerCustomText; pagerTop.PagerBreak = pagerBreak; pagerTop.RenderHref = RenderHtml; pagerTop.ItemNameSingular = string.IsNullOrEmpty(ItemNameSingular) ? Helper.GetObjectName(QuickParameters.ObjectType, true) : ItemNameSingular; pagerTop.ItemNamePlural = string.IsNullOrEmpty(ItemNamePlural) ? Helper.GetObjectName(QuickParameters.ObjectType, false) : ItemNamePlural; PhPagTop.Controls.Add(ctrlPagTop); Control ctrlPagBot = LoadControl("/UserControls/Pager.ascx"); ctrlPagBot.Visible = bottomPagerVisible; pagerBottom = ctrlPagBot as IPager; pagerBottom.CustomText = BottomPagerCustomText; pagerBottom.BrowsableControl = this; pagerBottom.PageSize = QuickParameters.PageSize; pagerBottom.PagerBreak = pagerBreak; pagerBottom.RenderHref = RenderHtml; pagerBottom.ItemNameSingular = string.IsNullOrEmpty(ItemNameSingular) ? Helper.GetObjectName(QuickParameters.ObjectType, true) : ItemNameSingular; pagerBottom.ItemNamePlural = string.IsNullOrEmpty(ItemNamePlural) ? Helper.GetObjectName(QuickParameters.ObjectType, false) : ItemNamePlural; PhPagBot.Controls.Add(ctrlPagBot); if (Settings != null && Settings.ContainsKey("SelectCurrentPage") && !string.IsNullOrEmpty(Request.QueryString["OID"])) { if (!string.IsNullOrEmpty(Request.Form["__EVENTTARGET"]) && (Request.Form["__EVENTTARGET"].Contains(ctrlPagTop.UniqueID) || Request.Form["__EVENTTARGET"].Contains(ctrlPagBot.UniqueID))) { autoSelectCurrentPage = false; } } else { autoSelectCurrentPage = false; } } else { IReloader reloaderTop = (IReloader)LoadControl("/UserControls/Reloader.ascx"); ((Control)reloaderTop).Visible = topPagerVisible; reloaderTop.BrowsableControl = this; reloaderTop.FullReload = RenderHtml; reloaderTop.ObjectType = QuickParameters.ObjectType; PhPagTop.Controls.Add((Control)reloaderTop); IReloader reloaderBottom = (IReloader)LoadControl("/UserControls/Reloader.ascx"); ((Control)reloaderBottom).Visible = bottomPagerVisible; reloaderBottom.BrowsableControl = this; reloaderBottom.FullReload = RenderHtml; reloaderBottom.ObjectType = QuickParameters.ObjectType; PhPagBot.Controls.Add((Control)reloaderBottom); autoSelectCurrentPage = false; } RestoreState(); if ((PageType)Settings["ParentPageType"] == PageType.Overview && Settings.ContainsKey("HeadingTag") && (int)Settings["HeadingTag"] == 1) { ((IWidgetPageMaster)Page.Master).BreadCrumb.RenderOverviewPageBreadCrumbs(QuickParameters); } Reload(); SaveState(); LitParams.Text = "<span style=\"display:none;\" id=\"" + Settings["WidgetInstanceId"] + "\">" + HttpUtility.HtmlEncode(QuickParameters.ToJSON()) + "</span>"; }