void InitAfterLoad(IBaseView previousView, IBaseView currentView, IBaseView nextView) { currentView.ActionAfterLoad = () => { OnAfterLoad(previousView, currentView, nextView); }; }
/// <summary> /// Tworzy widok CarProductList. /// </summary> /// <param name="parentView">Widok nadrzędny.</param> public CarProductList(IBaseView parentView) : base(parentView) { InitializeComponent(); AfterInitializeComponent(); SupportsShowSubElements = false; if (!VSDesignMode) { this.Presenter = new CarProductListPresenter(this); this.SupportsShowDetails = false; this.SupportsDelete = false; this.SupportsAddNew = false; this.SupportsEdit = false; this.TopMost = true; } if (parentView != null) { FactoryList factory = new FactoryList(); if (parentView.GetType() == factory.GetType()) { factory = (FactoryList)parentView; this.SetViewForOneFactoryMode(factory.CurrentFactory); } } }
private void InitMoveFocusAction(IBaseView currentView, IBaseView nextView) { currentView.ActionMoveFocusToNextView = () => { OnMoveFocus(currentView, nextView); }; }
/** * 根据唯一标识获取一个UI对象 * @param key * @returns {any} */ public IBaseView getView(int key) { IBaseView view = null; this._views.TryGetValue(key, out view); return(view); }
/** * 关闭面板 * @param key 面板唯一标识 * @param param 参数 * */ public void close(int key, params object[] param) { if (!this.isShow(key)) { return; } IBaseView view = this.getView(key); if (view == null) { return; } int viewIndex = this._opens.IndexOf(key); if (key >= 0) { this._opens.RemoveRange(viewIndex, 1); } this.closeUIPlaySound(key); //view.removeFromParent(); view.close(param); }
/// <summary> /// Tworzy widok CityList. /// </summary> /// <param name="parentView">Widok nadrzędny.</param> public CityList(IBaseView parentView) : base(parentView) { InitializeComponent(); AfterInitializeComponent(); SupportsShowSubElements = false; if (!VSDesignMode) { this.Presenter = new CityListPresenter(this); this.SupportsShowDetails = true; this.SupportsDelete = true; this.SupportsAddNew = true; this.SupportsEdit = true; } if (parentView != null) { CountryList country = new CountryList(); if (parentView.GetType() == country.GetType()) { country = (CountryList)parentView; this.SetViewForOneCountryMode(country.CurrentCountry); } } }
public bool Show(int panelId) { IBaseView panel = CreatePanel(panelId); Push(panelId); return(true); }
public void AddExteralControl(IBaseView view) { if ((view.ViewPos == ViewLocation.Center) || (view.ViewPos == ViewLocation.Bottom)) { LayoutDocumentPane docPane = GetControlObject <LayoutDocumentPane>(Enum.GetName(typeof(ViewLocation), view.ViewPos)); if (docPane == null) { docPane = Center; } LayoutDocument LayoutDoc = new LayoutDocument(); LayoutDoc.ContentId = view.ViewID; LayoutDoc.Title = view.ViewName; LayoutDoc.CanClose = true; LayoutDoc.Closed += LayoutDoc_Closed; LayoutDoc.Content = view as UserControl; docPane.Children.Add(LayoutDoc); } else { LayoutAnchorablePane docPane = GetControlObject <LayoutAnchorablePane>(Enum.GetName(typeof(ViewLocation), view.ViewPos)); LayoutAnchorable LayoutDoc = new LayoutAnchorable(); LayoutDoc.ContentId = view.ViewID; LayoutDoc.Title = view.ViewName; LayoutDoc.CanClose = true; LayoutDoc.Closed += LayoutDoc_Closed; LayoutDoc.Content = view as UserControl; docPane.Children.Add(LayoutDoc); } }
public void LoadIncludedPolicyClassesTest() { var document = new UnitTestDocument(); IBaseView view = null; document.MockDocumentProperties = new List <string>(); var target = new InsuranceRenewealReportWizardPresenter(document, view); var template = new InsuranceRenewalReport { ClientName = "client name test", ClientCommonName = "client common name test" }; var expected = new InsuranceRenewalReport { ClientName = "client name test", ClientCommonName = "client common name test" }; IInsuranceRenewalReport actual = target.LoadIncludedPolicyClasses(template); Assert.AreEqual(expected.ClientCommonName, actual.ClientCommonName); Assert.AreEqual(expected.ClientName, actual.ClientName); Assert.AreEqual(expected.CoverPageTitle, actual.CoverPageTitle); }
/** * 置顶界面(界面在打开中才可以置顶) */ public void topView(int key) { IBaseView view = this.getView(key); if (view == null) { Logger.Log("UI_" + key + "不存在"); return; } if (!view.isShow()) { Logger.Log("请先打开" + "UI_" + key); return; } bool boolean = view is BaseEuiView; if (boolean) { //int maxDepth = this._viewParent.transform.childCount; //this._viewParent.setChildIndex(view as BaseEuiView, maxDepth); } else { Logger.Log("view type error"); } }
/// <summary> /// Tworzy widok CarServicesCarList. /// </summary> /// <param name="parentView">Widok nadrzędny.</param> public CarServicesCarList(IBaseView parentView) : base(parentView) { InitializeComponent(); AfterInitializeComponent(); if (!VSDesignMode) { if (parentView != null) { CarServiceDetails carServiceDetails = new CarServiceDetails(); if (parentView.GetType() == carServiceDetails.GetType()) { this.CarService = (CarService)parentView.CurrentObject; } } this.Presenter = new CarServicesCarListPresenter(this); this.SupportsShowDetails = false; this.SupportsDelete = false; this.SupportsAddNew = false; this.SupportsEdit = false; } }
public BaseRectangle(IBaseView owningView) { if (owningView == null) { throw new ArgumentNullException("owningView", "Owning view cannot be null in this constructor."); } OwningView = owningView; }
protected virtual void OnMoveFocus(IBaseView currentView, IBaseView nextView) { Logger.Instance.Debug("BaseComplexView OnMoveFocus " + currentView.GetType().Name, Logger.Categories.UI); var nextDataGrid = nextView.GridView.dataGrid; nextDataGrid.FocusCell( nextDataGrid.Items.Count - 1, nextDataGrid.FindFirstEditableColumn()); }
public void CloseView(string viewName) { IBaseView view = null; if (m_views.TryGetValue(viewName, out view)) { view.Close(); } }
public static void AddView(IBaseView view) { string viewName = view.ViewName.ToString(); if (!m_views.ContainsKey(viewName)) { m_views.Add(viewName, view); } }
public virtual void InitializeView(IBaseView view) { if ((object)view == null) { throw new ArgumentNullException("view"); } this.View = view; }
public override sealed void InitializeView(IBaseView view) { if ((object)view == null) { throw new ArgumentNullException("view"); } base.InitializeView(view); }
protected virtual void OnMoveFocus(IBaseView currentView, IBaseView nextView) { _logger.LogDebug("BaseComplexView OnMoveFocus {0}", currentView.GetType().Name); var nextDataGrid = nextView.GridView.dataGrid; nextDataGrid.FocusCell( nextDataGrid.Items.Count - 1, nextDataGrid.FindFirstEditableColumn()); }
public Mediator(string mediatorName, IBaseView view) { this.m_mediatorName = (mediatorName != null) ? mediatorName : "Mediator"; if (null == view) { throw new Exception(string.Format("The {0}'s view is null.", m_mediatorName)); } this.View = view; this.View.Mediator = this; }
protected override void OnMoveFocus(IBaseView currentView, IBaseView nextView) { if (currentView is TChuyenHangDonHangView) { System.Windows.Input.Keyboard.Focus(nextView.GridView.dataGrid); return; } base.OnMoveFocus(currentView, nextView); }
public void CheckNameTest() { var document = new UnitTestDocument(); IBaseView view = null; var target = new InsuranceRenewealReportWizardPresenter(document, view); const string name = "Unit Test"; bool actual = target.CheckName(name); Assert.AreEqual(true, actual); }
/// <summary> /// Detaches this presenter from the view. /// </summary> public virtual void DetachView() { if (View == null) { return; } Template.UnmountAttachedScalarBindings(); View.Presenter = null; View = null; }
private void setViewLoading(IBaseView view, string[] resources, params object[] param) { //view.setResources(resources); //App.EasyLoading.showLoading(); //view.loadResource(function() { // view.preloadTrue(true); // this.setViewOpen(view, param); // App.EasyLoading.hideLoading(); //}.bind(this),null); }
/// <summary> /// Tworzy widok CountryDetails. /// </summary> /// <param name="parentView">Widok nadrzędny.</param> public CountryDetails(IBaseView parentView) : base(parentView) { InitializeComponent(); AfterInitializeComponent(); if (!VSDesignMode) { this.Presenter = new CountryDetailsPresenter(this); } }
/** * 关闭面板 * @param view * @param param */ public void closeView(IBaseView view, params object[] param) { foreach (var item in this._views) { if (item.Value == view) { this.close(item.Key, param); return; } } }
public void TryAddView(IBaseView view) { //TODO: make this work. //if (view.IsModal == false) { // if (views.Count >= 2) { // views.Pop(); // } //} views.Push(view); }
private void setViewOpen(IBaseView view, params object[] param) { if (!view.isInit()) { view.initUI(); } view.initData(); view.addToParent(); view.setVisible(true); view.open(param); }
protected bool DispatchPresentationEvent(IBaseView targetView, Uri controllerActionUri, object controllerActionContext, out IEnumerable <object> controllerActionResult) { MethodInfo[] methodInfos; DispatchActionUriAttribute dispatchActionUriAttribute; Uri tempUri; object retval; List <object> controllerActionResults; IDispatchTargetProvider dispatchTargetProvider; object dispatchTarget; if ((object)controllerActionUri == null) { throw new ArgumentNullException("controllerActionUri"); } if ((object)targetView == null) { throw new ArgumentNullException("targetView"); } controllerActionResults = new List <object>(); dispatchTarget = null; dispatchTargetProvider = targetView as IDispatchTargetProvider; if ((object)dispatchTargetProvider != null) { dispatchTarget = dispatchTargetProvider.Target; } if ((object)dispatchTarget != null) { methodInfos = dispatchTarget.GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance); if ((object)methodInfos != null) { foreach (MethodInfo methodInfo in methodInfos) { dispatchActionUriAttribute = ReflectionFascade.Instance.GetOneAttribute <DispatchActionUriAttribute>(methodInfo); if ((object)dispatchActionUriAttribute != null && Uri.TryCreate(dispatchActionUriAttribute.Uri, UriKind.Absolute, out tempUri) && tempUri == controllerActionUri) { retval = methodInfo.Invoke(dispatchTarget, new object[] { /* the view of the controller raising event */ this.View, controllerActionContext }); controllerActionResults.Add(retval); } } } } controllerActionResult = controllerActionResults.ToArray(); return(controllerActionResults.Count < 1); }
internal void AttachView(IBaseView value) { if (View != null) { DetachView(); } Debug.Assert(View == null && value != null); View = value; View.Presenter = this; }
CribbageView GetCribbageView() { if (_frame.Content == null) { return(null); } IBaseView baseView = _frame.Content as IBaseView; return(baseView.GetCommonView()); }
private ReportService(IBaseView view, BarButtonItem bbiReport, string reportIds) { if (bbiReport == null) throw new ArgumentNullException("bbiReport"); if (reportIds.IsEmpty()) throw new ArgumentNullException("reportIds"); this.view = view; this.bbiReport = bbiReport; this.reportIds = reportIds; }
//Declararation of all variables, vectors and haarcascades public AdminFormPresenter(IBaseView view) : base(view) { if (view is IAdminView) { this.AdminView = (view as IAdminView); this.AdminView.Init += new EventHandler<EventArgs>(AdminView_Init); } else { new Exception("Это не наша форма!"); } }
public MainFormPresenter(IBaseView view) : base(view) { (this.View as IMainView).OnChangeCamDevice += MainFormPresenter_OnChangeCamDevice; (this.View as IMainView).OnStartOrStopClick += MainFormPresenter_OnStartOrStopClick; (this.View as IMainView).OnAdminClick += new EventHandler<EventArgs>(MainFormPresenter_OnAdminClick); (this.View as IMainView).OnTimerTick += new EventHandler<EventArgs>(MainFormPresenter_OnTimerTick); (this.View as IMainView).OnBlinkTimerTick += new EventHandler<EventArgs>(MainFormPresenter_OnBlinkTimerTick); // timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); // timer.Start(); System.Windows.Forms.Application.Idle += new EventHandler(Application_Idle); //AppGlobalContext.GetInstance().CamHelper.OnNewFrame += CamHelper_OnNewFrame; }
public override void PushDialogView(MobileDialogPresentationType presentationType, string viewTitle, IBaseView sourceView, IBaseView view) { Activity activity = null; var fragment = sourceView as Fragment; if (fragment != null) { activity = fragment.Activity; } else { activity = sourceView as Activity; } if (activity != null) { var dialogFragment = (DialogFragment) view; dialogFragment.Show(activity.FragmentManager, viewTitle); } }
public override void CreateMarkerDetailsView(IBaseView sourceView, Guid markerId) { var activity = GetActivityFromView(sourceView); var intent = new Intent(activity, typeof(MarkerDetailsActivity)); intent.PutExtra("sourceActivity", activity.GetType().FullName); intent.PutExtra("markerId", markerId.ToString()); activity.StartActivity(intent); }
public override void CreateEqualizerPresetDetailsView(IBaseView sourceView, Guid presetId) { var activity = GetActivityFromView(sourceView); var intent = new Intent(activity, typeof(EqualizerPresetDetailsActivity)); intent.PutExtra("sourceActivity", activity.GetType().FullName); intent.PutExtra("presetId", presetId.ToString()); activity.StartActivity(intent); }
public override void CreateEqualizerPresetsView(IBaseView sourceView) { var activity = GetActivityFromView(sourceView); StartActivity(activity, typeof(EqualizerPresetsActivity)); }
public virtual void CreateEqualizerPresetsView(IBaseView sourceView) { if(_equalizerPresetsView == null) _equalizerPresetsView = Bootstrapper.GetContainer().Resolve<IEqualizerPresetsView>(); PushDialogView(MobileDialogPresentationType.Standard, "Equalizer Presets", null, _equalizerPresetsView); }
public BaseViewImplementer(IBaseView view = null) { this.View = view; baseView = (BaseView)view; }
private Activity GetActivityFromView(IBaseView view) { if (view is Activity) return (Activity)view; else if (view is Fragment) return ((Fragment) view).Activity; else return null; }
public override void PushDialogSubview(MobileDialogPresentationType presentationType, string parentViewTitle, IBaseView view) { AppDelegate.PushDialogSubview(presentationType, parentViewTitle, (UIViewController)view); }
public virtual void CreateMarkerDetailsView(IBaseView sourceView, Guid markerId) { if (_markerDetailsView == null) _markerDetailsView = Bootstrapper.GetContainer().Resolve<IMarkerDetailsView>(new NamedParameterOverloads() { { "markerId", markerId } }); }
public virtual void CreatePlaylistView(IBaseView sourceView) { if (_playlistView == null) _playlistView = Bootstrapper.GetContainer().Resolve<IPlaylistView>(); PushDialogView(MobileDialogPresentationType.Standard, "Playlist", null, _playlistView); }
public virtual void CreateEqualizerPresetDetailsView(IBaseView sourceView, Guid presetId) { if (_equalizerPresetDetailsView == null) _equalizerPresetDetailsView = Bootstrapper.GetContainer().Resolve<IEqualizerPresetDetailsView>(new NamedParameterOverloads() { { "presetId", presetId } }); PushDialogSubview(MobileDialogPresentationType.Standard, "Equalizer Presets", _equalizerPresetDetailsView); }
public virtual void BindEqualizerPresetDetailsView(IBaseView sourceView, IEqualizerPresetDetailsView view, Guid presetId) { _equalizerPresetDetailsView = view; _equalizerPresetDetailsView.OnViewDestroy = (view2) => { _equalizerPresetDetailsPresenter.ViewDestroyed(); _equalizerPresetDetailsPresenter = null; _equalizerPresetDetailsView = null; }; _equalizerPresetDetailsPresenter = Bootstrapper.GetContainer().Resolve<IEqualizerPresetDetailsPresenter>(new NamedParameterOverloads(){{"presetId", presetId}}); _equalizerPresetDetailsPresenter.BindView(view); }
public abstract void PushTabView(MobileNavigationTabType type, IBaseView view);
public virtual void BindPlaylistView(IBaseView sourceView, IPlaylistView view) { _playlistView = view; _playlistView.OnViewDestroy = (view2) => { _playlistPresenter.ViewDestroyed(); _playlistPresenter = null; _playlistView = null; }; _playlistPresenter = Bootstrapper.GetContainer().Resolve<IPlaylistPresenter>(); _playlistPresenter.BindView(view); }
public override void CreatePlaylistView(IBaseView sourceView) { var activity = GetActivityFromView(sourceView); StartActivity(activity, typeof(PlaylistActivity)); }
public void PushSubView(IBaseView view) { }
public override void PushTabView(MobileNavigationTabType type, IBaseView view) { // Not used on Android }
public void AddTab(MobileNavigationTabType type, string title, MobileLibraryBrowserType browserType, LibraryQuery query, IBaseView view) { Console.WriteLine("MainActivity - Adding tab {0}", title); //_tabHistory.Add(new Tuple<MobileNavigationTabType, List<Tuple<MobileLibraryBrowserType, LibraryQuery>>>(type, new List<Tuple<MobileLibraryBrowserType, LibraryQuery>>() { // new Tuple<MobileLibraryBrowserType, LibraryQuery>(browserType, query) //})); _fragment = (Fragment)view; FragmentTransaction transaction = FragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.main_fragmentContainer, _fragment); transaction.Commit(); }
public override void PushDialogSubview(MobileDialogPresentationType presentationType, string parentViewTitle, IBaseView view) { // Not used on Android //PushDialogView(presentationType, string.Empty, null, view); }
public abstract void PushDialogView(MobileDialogPresentationType presentationType, string viewTitle, IBaseView sourceView, IBaseView view);
public override void PushTabView(MobileNavigationTabType type, IBaseView view) { AppDelegate.PushTabView(type, (UIViewController)view); }
public void PushSubView(IBaseView view) { Console.WriteLine("PlayerActivity - PushSubView view: {0}", view.GetType().FullName); _fragments.Add((Fragment)view); if (_viewPagerAdapter != null) _viewPagerAdapter.NotifyDataSetChanged(); }
public void AddSubview(IBaseView view) { throw new NotImplementedException(); }
public abstract void PushDialogSubview(MobileDialogPresentationType presentationType, string parentViewTitle, IBaseView view);
public virtual void BindEqualizerPresetsView(IBaseView sourceView, IEqualizerPresetsView view) { _equalizerPresetsView = view; _equalizerPresetsView.OnViewDestroy = (view2) => { _equalizerPresetsPresenter.ViewDestroyed(); _equalizerPresetsPresenter = null; _equalizerPresetsView = null; }; _equalizerPresetsPresenter = Bootstrapper.GetContainer().Resolve<IEqualizerPresetsPresenter>(); _equalizerPresetsPresenter.BindView(view); }
public AlertFormPresenter(IBaseView view) : base(view) { }