/// <summary> /// Initializes a new instance of the <see cref="ContentView" /> class. /// </summary> protected ContentView() { var dependencyResolver = this.GetDependencyResolver(); _viewManager = dependencyResolver.Resolve<IViewManager>(); DataContextChanged += OnDataContextChanged; }
/// <summary> /// Initializes a new instance of the <see cref="ContentPage"/> class. /// </summary> public ContentPage() { var dependencyResolver = this.GetDependencyResolver(); _viewManager = dependencyResolver.Resolve<IViewManager>(); DataContextChanged += OnDataContextChanged; }
public MyBootstrapperBase(IViewManager viewManager, IWindowManager windowManager) { this.viewManager = viewManager; this.windowManager = windowManager; this.Start(new string[0]); }
private void InitContent() { this.SuspendLayout(); IExtensionPoint creator_ext = WindowManagerPlugin.Instance.PoderosaWorld.PluginManager.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID); IViewManagerFactory f = ((IViewManagerFactory[])creator_ext.GetExtensions())[0]; _toolStripContainer = new PoderosaToolStripContainer(this, _argument.ToolBarInfo); this.Controls.Add(_toolStripContainer); //ステータスバーその他の初期化 //コントロールを追加する順番は重要! _viewManager = f.Create(this); Control main = _viewManager.RootControl; if (main != null) { //テストケースではウィンドウの中身がないこともある main.Dock = DockStyle.Fill; _toolStripContainer.ContentPanel.Controls.Add(main); } int rowcount = _argument.TabRowCount; _tabBarTable = new TabBarTable(); _tabBarTable.Height = rowcount * TabBarTable.ROW_HEIGHT; _tabBarTable.Dock = DockStyle.Top; _tabBarManager = new TabBarManager(_tabBarTable); _statusBar = new PoderosaStatusBar(); _toolStripContainer.ContentPanel.Controls.Add(_tabBarTable); this.Controls.Add(_statusBar); //こうでなく、_toolStripContainer.BottomToolStripPanelに_statusBarを追加してもよさそうだが、そうするとツールバー項目がステータスバーの上下に挿入可能になってしまう _tabBarTable.Create(rowcount); this.ResumeLayout(); }
public ImprovedProcessor(Game game, IViewManager viewManager, PhysicsManager physics ) { this._game = game; this._viewManager = viewManager; this._physics = physics; initialize(); }
public void Draw(IViewManager view) { if (_thingType == 0 || _thingType == 1) { foreach (var mesh in _model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = _meshTransforms[mesh.ParentBone.Index] * Transform.Combined; effect.View = view.View; effect.Projection = view.Projection; if (_isColorRandom) effect.DiffuseColor = _diffuseColor; if (_thingType == 1) effect.DiffuseColor *= 0.5f; /*if (!this.IsActive) { effect.DiffuseColor *= 0.5f; }*/ if (_isSelected) { effect.DiffuseColor *= 4.0f; } } mesh.Draw(); } } }
public Holodeck() { var gdm = new GraphicsDeviceManager(this); gdm.SynchronizeWithVerticalRetrace = false; #if XBOX gdm.IsFullScreen = true; gdm.PreferredBackBufferHeight = 720; gdm.PreferredBackBufferWidth = 1280; #elif WINDOWS_PHONE gdm.IsFullScreen = true; gdm.PreferredBackBufferHeight = 800; gdm.PreferredBackBufferWidth = 400; #endif this.IsFixedTimeStep = false; TaskManager.IsThreadingEnabled = false; _viewManager = new ViewManager(this); _inputManager = new InputManager(this); _stateManager = new StateManager(this); _physics = new PhysicsManager(this); this.Components.Add(new PhysicsScene(this, _physics)); Content.RootDirectory = "Content"; }
public FreeLookState(IStateManager stateManager) : base(stateManager) { _camera = (IViewManager)stateManager.Game.Services.GetService(typeof(IViewManager)); _input = (IInputManager)stateManager.Game.Services.GetService(typeof(IInputManager)); _input.CaptureMouse = true; }
/// <summary> /// Initializes a new instance of the <see cref="ViewExportService" /> class. /// </summary> /// <param name="viewManager">The view manager.</param> /// <param name="saveFileService">The save file service.</param> /// <exception cref="ArgumentNullException">The <paramref name="viewManager" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">The <paramref name="saveFileService" /> is <c>null</c>.</exception> public ViewExportService(IViewManager viewManager, ISaveFileService saveFileService) { Argument.IsNotNull(() => viewManager); Argument.IsNotNull(() => saveFileService); _viewManager = viewManager; _saveFileService = saveFileService; }
public InputManager(Game game, IViewManager viewManager, PhysicsManager physics) { this._game = game; this._viewManager = viewManager; this._physics = physics; //_inputProcessor = new DefaultProcessor(game, viewManager, physics); _inputProcessor = new ImprovedProcessor(game, viewManager, physics); }
public BaseController(IViewManager viewManager, IEventPublisher eventPublisher, IDeploymentManagement deploymentManagement) { this.ViewManager = viewManager; this.EventPublisher = eventPublisher; this.DeploymentManagement = deploymentManagement; }
public override void Initialize() { base.Initialize(); _view = this.Game.Services.GetService(typeof(IViewManager)) as IViewManager; if (_view == null) throw new Exception("No view manager is registered."); }
protected override object[] GetViewManagerArgs(IViewManager viewManager, DependencyObject view, ReactStylesDiffMap props) { var args = s_args.Value; args[0] = viewManager; args[1] = view; args[2] = ExtractProperty(props); return(args); }
/// <summary> /// Konstruktor. /// </summary> /// <param name="viewManager">Obiekt menadżera widoków.</param> /// <param name="view">Obiekt zarządzanego przez prezentera widoku.</param> /// <param name="appManager">Obiekt menadżera aplikacji.</param> public MainFormPresenter(IViewManager viewManager, IMainFormView view, ApplicationManager appManager) : base(viewManager, view) { this.applicationManager = appManager; this.View.ShowRequest += new EventHandler(ViewShowRequestHandler); this.View.CloseRequest += new EventHandler(ViewCloseRequestHandler); this.View.PreCloseRequest += new EventHandler <ViewPreCloseEventArgs>(ViewPreCloseRequestHandler); }
/// <summary> /// Create a <see cref="Storyboard"/> to be used to animate the view, /// based on the animation configuration supplied at initialization /// time and the new view position and size. /// </summary> /// <param name="viewManager">The view manager for the view.</param> /// <param name="view">The view to create the animation for.</param> /// <param name="dimensions">The view dimensions.</param> /// <returns>The storyboard.</returns> public IObservable <Unit> CreateAnimation(IViewManager viewManager, FrameworkElement view, Dimensions dimensions) { if (!IsValid) { return(null); } return(CreateAnimationCore(viewManager, view, dimensions)); }
private void BeforeDestroying() { _mediatorMap.UnmediateAll (); if (_injector.SatisfiesDirectly (typeof(IViewManager))) { _viewManager = _injector.GetInstance (typeof(IViewManager)) as IViewManager; _viewManager.RemoveViewHandler (_mediatorMap); } }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void BeforeInitializing() { _mediatorMap = _injector.GetInstance(typeof(IMediatorMap)) as MediatorMap; _viewManager = _injector.GetInstance(typeof(IViewManager)) as IViewManager; if (_viewManager != null) { _viewManager.AddViewHandler (_mediatorMap); } }
private void BeforeDestroying() { _mediatorMap.UnmediateAll(); if (_injector.SatisfiesDirectly(typeof(IViewManager))) { _viewManager = _injector.GetInstance(typeof(IViewManager)) as IViewManager; _viewManager.RemoveViewHandler(_mediatorMap); } }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void BeforeInitializing() { _mediatorMap = _injector.GetInstance(typeof(IMediatorMap)) as MediatorMap; _viewManager = _injector.GetInstance(typeof(IViewManager)) as IViewManager; if (_viewManager != null) { _viewManager.AddViewHandler(_mediatorMap); } }
public void AddViewManager(IViewManager viewManager) { if (viewManager == null) { throw new ArgumentNullException("viewManager"); } _logger.Info("Adding view manager: {0}", viewManager); _viewManagers.Enqueue(viewManager); }
public TestContext AddViewManager(IViewManager viewManager) { WithEventDispatcherOfType <ViewManagerEventDispatcher>(x => { x.AddViewManager(viewManager); }); return(this); }
protected override object[] GetViewManagerArgs(IViewManager viewManager, object view, JObject props) { var args = s_args.Value; args[0] = viewManager; args[1] = view; args[2] = ExtractProp(props); return(args); }
/// <summary> /// Initializes static members of the <see cref="LogicBase"/> class. /// </summary> static LogicBase() { var dependencyResolver = IoCConfiguration.DefaultDependencyResolver; _viewModelLocator = dependencyResolver.Resolve <IViewModelLocator>(); _viewManager = dependencyResolver.Resolve <IViewManager>(); _viewPropertySelector = dependencyResolver.Resolve <IViewPropertySelector>(); ViewLoadManager = dependencyResolver.Resolve <IViewLoadManager>(); }
public BuildsListView( IViewManager viewManager, IBuildTemplateManager buildTemplateManager) { this.viewManager = viewManager.ThrowIfNull(nameof(viewManager)); this.buildTemplateManager = buildTemplateManager.ThrowIfNull(nameof(buildTemplateManager)); this.InitializeComponent(); this.LoadBuilds(); }
public ViewManagerTest() { statsComponent = new StatsComponent(new SimpleEventQueue()); tagsComponent = new TagsComponent(); tagger = tagsComponent.Tagger; viewManager = statsComponent.ViewManager; statsRecorder = statsComponent.StatsRecorder; }
/// <summary> /// Konstruktor. /// </summary> /// <param name="viewManager">Obiekt menadżera widoków.</param> /// <param name="view">Obiekt zarządzanego przez prezentera widoku.</param> /// <param name="subtitlesManager">Obiekt menadżera zarządzającego obiektami reprezentującymi napisy.</param> /// <param name="editor">Obiekt menadżera zajmującego się edycjią napisów.</param> /// <param name="tool">Obiekt narzędzia odpowiadającego za synchronizację napisów.</param> public SynchronizationCommandPresenter(IViewManager viewManager, ICommandView view, SubtitlesManager subtitlesManager, SynchronizationTool tool) : base(viewManager, view) { this.subtitlesManager = subtitlesManager; this.tool = tool; this.View.IsExecutable = true; }
public SettingsView( ILiveUpdateableOptions <ApplicationConfiguration> liveUpdateableOptions, IViewManager viewManager) { this.liveUpdateableOptions = liveUpdateableOptions.ThrowIfNull(nameof(liveUpdateableOptions)); this.viewManager = viewManager.ThrowIfNull(nameof(viewManager)); this.InitializeComponent(); this.LoadSettings(); }
public NotesView(IViewManager viewManager, INoteService noteService) { this.InitializeComponent(); PFNotesViewModel vm = (PFNotesViewModel)this.DataContext; vm.ViewManager = viewManager; vm.NoteService = noteService; }
public void SubsequentViewPersistence( IRepository <string, SomeData> repository, View view, ISequenceResolver sequenceResolver, IRepository <string, Snapshot> snapshotRepository, IViewManager viewManager, SomeEvent firstEvent, SomeEvent secondEvent, SomeData initialData, SomeData actualInitialData, SomeData subsequentData) { "Given a view repository"._(() => repository = new MemoryRepository <string, SomeData>()); "and some intial data"._( () => initialData = new SomeData { LastEventId = "test2", EventCount = 2, }); "and the repository contains the initial data"._(() => repository.AddOrUpdate("root", initialData)); "and a view"._(() => view = new SomeView(repository)); "and a sequence resolver"._(() => sequenceResolver = new CustomSequenceResolver()); "and a snapshot repository"._(() => snapshotRepository = new MemoryRepository <string, Snapshot>()); "and the snapshot repository contains the initial snapshot data"._( () => snapshotRepository.AddOrUpdate( view.GetType().FullName, new Snapshot { ViewName = view.GetType().FullName, PersistedSequenceNumber = 2, })); "and a view manager"._(ctx => viewManager = ViewManager.ForViews(view) .OrderEventsUsing(sequenceResolver) .SnapshotViewsUsing(snapshotRepository).WithAQuietTimeTimeoutOf(2) .Create().Using(ctx)); "and a third event"._(() => firstEvent = new SomeEvent { Sequence = 3, Id = "test3" }); "and a fourth event"._(() => secondEvent = new SomeEvent { Sequence = 4, Id = "test4" }); "when those events are dispatched"._( () => { viewManager.QueueForDispatch(firstEvent); viewManager.QueueForDispatch(secondEvent); }); "and the operation is given time to process"._(() => Thread.Sleep(1000)); "and the repository is queried initially"._(() => actualInitialData = repository.Get("root")); "and the snapshot is given time to process"._(() => Thread.Sleep(2000)); "and the repository is queried subsequently"._(() => subsequentData = repository.Get("root")); "then the initial query should be empty"._(() => actualInitialData.Should().Be(initialData)); "and the view received the second event last"._(() => subsequentData.LastEventId.Should().Be(secondEvent.Id)); "and the view received two events"._(() => subsequentData.EventCount.Should().Be(4)); }
public InteractionExtensionCrossnetModule(IObjectContainer container, IViewManager viewManager, IInteractionManager interactionManager, ICommandManager commandManager, IViewEventManager viewEventManager, ICase caseIdentifier) { _container = container; _viewManager = viewManager; _interactionManager = interactionManager; _viewEventManager = viewEventManager; _metodos = new LogicaNegocio(); _commandManager = commandManager; _caseIdentifier = caseIdentifier; }
public override void Initialize() { base.Initialize(); _view = this.Game.Services.GetService(typeof(IViewManager)) as IViewManager; if (_view == null) { throw new Exception("No view manager is registered."); } }
private static void RegisterViews() { IViewManager viewManager = MvpApplication.ViewManager; viewManager.RegisterView <IEditTaskView, EditTaskForm>("SaveTask", "Save Task"); viewManager.RegisterView <ITaskListView, TaskListForm>("TaskList", "Task List"); viewManager.RegisterView <IStartProcessTaskCreatorConfigurationView, StartProcessTaskCreatorConfigurationForm>("StartProcessTaskConfiguration", "Start Process Task Configuration"); viewManager.RegisterView <IReflectionTaskCreatorConfigurationView, ReflectionTaskCreatorConfigurationForm>("ReflectionTaskConfiguration", "Reflection Task Configuration"); viewManager.RegisterView <IBuiltInTaskConfigurationView, BuiltInTaskConfigurationForm>("BuiltInTaskConfiguration", "Built-in Task Configuration"); }
public ModuleDefinitionController(IModuleManager moduleManager, ISecurityManager securityManager, IViewManager viewManager, IOptions <AppSettings> appSettings) { _moduleManager = moduleManager; _securityManager = securityManager; _viewManager = viewManager; _appSettings = appSettings.Value; }
public LoginWindowVmFactory(IEventAggregator ea, LoginModelViewModel loginModelVm, RegisterViewModel registerVm, IViewManager viewManager) { _ea = ea; _loginModelVm = loginModelVm; _registerVm = registerVm; _viewManager = viewManager; }
public AssociationAddressController( ICommandProcessor commandProcessor, IViewManager <GetAddressesView> getAddressesView, IViewManager <GetAddressesWithResidentsView> getAddressesWithResidentsView ) { _commandProcessor = commandProcessor; _getAddressesView = getAddressesView; _getAddressesWithResidentsView = getAddressesWithResidentsView; }
/// <summary> /// Creates the appropiate <see cref="Microsoft.ApplicationBlocks.UIProcess.IViewManager"/> for a wizard. /// <remarks>For the WizardNavigator, the IViewManager is always a <see cref="Microsoft.ApplicationBlocks.UIProcess.WizardViewManager"/></remarks> /// </summary> /// <param name="name">The name of the IViewManager to create.</param> /// <returns>A WizardViewManager.</returns> protected override IViewManager CreateViewManager(string name) { IViewManager viewManager = ViewManagerFactory.Create(name, new object[] { this.NavigationSettings.Views() }); if (!(viewManager is WizardViewManager)) { throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionWizardViewManagerIsRequired)); } return(viewManager); }
private void BeforeDestroying() { _viewProcessorFactory.RunAllUnprocessors(); if (_injector.SatisfiesDirectly(typeof(IViewManager))) { _viewManager = _injector.GetInstance(typeof(IViewManager)) as IViewManager; _viewManager.RemoveViewHandler(_viewProcessorMap as IViewHandler); } }
public ExpensesView(IViewManager viewManager, IInvoiceService invoiceService, IPaymentService paymentService) { InitializeComponent(); var vm = (PFExpensesViewModel)this.DataContext; // this creates an instance of the ViewModel vm.ViewManager = viewManager; vm.InvoiceService = invoiceService; vm.PaymentService = paymentService; }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void BeforeInitializing() { _viewProcessorMap = _injector.GetInstance(typeof(IViewProcessorMap)) as IViewProcessorMap; _viewProcessorFactory = _injector.GetInstance(typeof(IViewProcessorFactory)) as IViewProcessorFactory; if (_injector.SatisfiesDirectly(typeof(IViewManager))) { _viewManager = _injector.GetInstance(typeof(IViewManager)) as IViewManager; _viewManager.AddViewHandler(_viewProcessorMap as IViewHandler); } }
public AssociationController( ICommandProcessor commandProcessor, IViewManager <GetAssociationsView> getAssociationsView, IViewManager <GetAssociationView> getAssociationView ) { _commandProcessor = commandProcessor; _getAssociationsView = getAssociationsView; _getAssociationView = getAssociationView; }
public TemplateController(IViewManager viewManager, CacheEngine cacheEngine, IViewComponentDescriptorCollectionProvider viewcomponents, IParameterManager parameterManager) { _viewManager = viewManager; _cacheEngine = cacheEngine; _viewcomponents = viewcomponents; _parameterManager = parameterManager; }
/// <summary> /// Initializes a new instance of the <see cref="ContentView" /> class. /// </summary> protected ContentView() { var dependencyResolver = this.GetDependencyResolver(); _viewManager = dependencyResolver.Resolve <IViewManager>(); // TODO: Subscribe to Loaded / Unloaded from XF // TODO: Shouldn't this be BindingContextChanged? DataContextChanged += OnDataContextChanged; }
private void OnServiceChequePrinted(IOrder order, IOperationService service, IViewManager manager) { PluginContext.Log.Info("Printed precheck"); var json = OrderHelper.GetOrderPackageJson(order); HttpSender.AddTask(new HttpSenderTask { Url = HttpSender.PostChequeUrl, Json = json }); PluginContext.Log.Info(json); }
public RequestElevationView( IApplicationLauncher applicationLauncher, IViewManager viewManager, ILogger <RequestElevationView> logger) { this.applicationLauncher = applicationLauncher.ThrowIfNull(nameof(applicationLauncher)); this.viewManager = viewManager.ThrowIfNull(nameof(viewManager)); this.logger = logger.ThrowIfNull(nameof(logger)); this.InitializeComponent(); }
public NotifyIconManager( IViewManager viewManager, NotifyIconViewModel viewModel, IApplicationState application, IApplicationWindowState applicationWindowState, ISyncThingManager syncThingManager) { this.viewManager = viewManager; this.viewModel = viewModel; this.application = application; this.applicationWindowState = applicationWindowState; this.syncThingManager = syncThingManager; this.taskbarIcon = (TaskbarIcon)this.application.FindResource("TaskbarIcon"); // Need to hold off until after the application is started, otherwise the ViewManager won't be set this.application.Startup += (o, e) => this.viewManager.BindViewToModel(this.taskbarIcon, this.viewModel); this.applicationWindowState.RootWindowActivated += this.RootViewModelActivated; this.applicationWindowState.RootWindowDeactivated += this.RootViewModelDeactivated; this.applicationWindowState.RootWindowClosed += this.RootViewModelClosed; this.viewModel.WindowOpenRequested += (o, e) => { this.applicationWindowState.EnsureInForeground(); }; this.viewModel.WindowCloseRequested += (o, e) => { // Always minimize, regardless of settings this.application.ShutdownMode = ShutdownMode.OnExplicitShutdown; this.applicationWindowState.CloseToTray(); }; this.viewModel.ExitRequested += (o, e) => this.application.Shutdown(); this.syncThingManager.TransferHistory.FolderSynchronizationFinished += this.FolderSynchronizationFinished; this.syncThingManager.DeviceConnected += (o, e) => { if (this.ShowDeviceConnectivityBalloons && DateTime.UtcNow - this.syncThingManager.StartedTime > syncedDeadTime) { this.taskbarIcon.HideBalloonTip(); this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceConnected_Title, String.Format(Resources.TrayIcon_Balloon_DeviceConnected_Message, e.Device.Name), BalloonIcon.Info); } }; this.syncThingManager.DeviceDisconnected += (o, e) => { if (this.ShowDeviceConnectivityBalloons && DateTime.UtcNow - this.syncThingManager.StartedTime > syncedDeadTime) { this.taskbarIcon.HideBalloonTip(); this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceDisconnected_Title, String.Format(Resources.TrayIcon_Balloon_DeviceDisconnected_Message, e.Device.Name), BalloonIcon.Info); } }; }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationStateManager" /> class. /// </summary> public ApplicationStateManager([NotNull] ISerializer serializer, [NotNull] IViewModelProvider viewModelProvider, [NotNull] IViewManager viewManager, [NotNull] IViewModelPresenter viewModelPresenter) { Should.NotBeNull(serializer, "serializer"); Should.NotBeNull(viewModelProvider, "viewModelProvider"); Should.NotBeNull(viewManager, "viewManager"); Should.NotBeNull(viewModelPresenter, "viewModelPresenter"); _serializer = serializer; _viewModelProvider = viewModelProvider; _viewManager = viewManager; _viewModelPresenter = viewModelPresenter; }
/// <summary> /// Initializes a new instance of the <see cref="NavigationState"/> class. /// </summary> public NavigationState(IViewManager viewManager) { HttpContext currentContext = HttpContext.Current; if (currentContext != null) { _currentView = viewManager.GetView(currentContext.Request.Path); //ConfigUtil.Settings.GetView(currentContext.Request.Path); if (currentContext.Request.UrlReferrer != null) { _previousView = viewManager.GetView(currentContext.Request.UrlReferrer.LocalPath); //ConfigUtil.Settings.GetView(currentContext.Request.UrlReferrer.LocalPath); } } }
public DefaultProcessor(Game game, IViewManager viewManager, PhysicsManager physics ) { this.game = game; this.viewManager = viewManager; this.physics = physics; Manipulations2D enabledManipulations = Manipulations2D.Rotate | Manipulations2D.Scale | Manipulations2D.Translate; manipulationProcessor = new ManipulationProcessor2D(enabledManipulations); manipulationProcessor.Pivot = new ManipulationPivot2D(); manipulationProcessor.Pivot.Radius = 10; manipulationProcessor.Started += OnManipulationStarted; manipulationProcessor.Delta += OnManipulationDelta; manipulationProcessor.Completed += OnManipulationCompleted; }
public OpenGLWindow(IMessageBus bus, ITimer timer, ICamera camera, IViewManager viewManager, IAssetManager assetManager, IGameObjectFactory factory) : base(1280, 720, new GraphicsMode(32, 0, 0, 4), "Test") { Bus = bus; Timer = timer; _camera = camera; _viewManager = viewManager; _assetManager = assetManager; _factory = factory; VSync = VSyncMode.On; Mouse.WheelChanged += (sender, args) => { _camera.Eye += new Vect3(0, 0, args.DeltaPrecise *-2.0); }; }
public void Draw(IViewManager view) { foreach (var mesh in _model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = _meshTransform * Transform.Combined; effect.View = view.View; effect.Projection = view.Projection; effect.DiffuseColor = _diffuseColor; if (!this.IsActive) { effect.DiffuseColor *= 0.5f; } } mesh.Draw(); } }
public void Draw(IViewManager view) { _effect.Projection = view.Projection; _effect.View = view.View; _effect.World = Matrix.CreateScale(0.2f) * Matrix.CreateRotationX(_rotation) * Matrix.CreateTranslation(_position); foreach (EffectPass pass in _effect.CurrentTechnique.Passes) { pass.Apply(); view.Device.DrawUserPrimitives(PrimitiveType.TriangleList, new VertexPositionColor[] { new VertexPositionColor(new Vector3(0.0f, -1.0f, 0.0f), _color), new VertexPositionColor(new Vector3(0.0f, 1.0f, 0.0f), _color), new VertexPositionColor(new Vector3(0.0f, 0.0f, 1.0f), _color), }, 0, 1); } }
public ReactComponentData(IViewManager manager) { Manager = manager; var managerType = manager.GetType(); var moduleAttr = managerType.GetCustomAttribute<ReactModuleAttribute>(); var name = moduleAttr.Name; if (string.IsNullOrWhiteSpace(name)) { name = managerType.Name; if (name.EndsWith("Manager")) { name = name.Substring(0, name.Length - "Manager".Length); } } Name = name; }
/// <summary> /// Default constructor. /// </summary> public App1() { this.IsFixedTimeStep = false; TaskManager.IsThreadingEnabled = false; instance = this; Content.RootDirectory = "Content"; graphics = new GraphicsDeviceManager(this); graphics.SynchronizeWithVerticalRetrace = false; _viewManager = new ViewManager(this); _viewManager.BackgroundColor = backgroundColor; _physics = new PhysicsManager(this); this.Components.Add(new PhysicsScene(this, _physics)); _inputManager = new InputManager(this, _viewManager, _physics); _tangibles = new Tangibles(this, _viewManager, _physics); }
ICommandProcessor CreateCommandProcessor(bool enableSnapshotting, IViewManager viewManager, ConcurrentQueue<DispatchStats> handleTimes) { return CommandProcessor.With() .EventStore(e => e.UseMongoDb(_database, "Events")) .EventDispatcher(e => { var items = new Dictionary<string, object> { { "stats", handleTimes } }; e.UseViewManagerEventDispatcher(viewManager) .WithViewContext(items); }) .Options(o => { if (enableSnapshotting) { Console.WriteLine("Enabling snapshotting"); o.EnableExperimentalMongoDbSnapshotting(_database, "Snapshots"); } }) .Create(); }
public NotifyIconManager( IViewManager viewManager, NotifyIconViewModel viewModel, IApplicationState application, IApplicationWindowState applicationWindowState, ISyncthingManager syncthingManager) { this.viewManager = viewManager; this.viewModel = viewModel; this.application = application; this.applicationWindowState = applicationWindowState; this.syncthingManager = syncthingManager; this.taskbarIcon = (TaskbarIcon)this.application.FindResource("TaskbarIcon"); // Need to hold off until after the application is started, otherwise the ViewManager won't be set this.application.Startup += this.ApplicationStartup; this.applicationWindowState.RootWindowActivated += this.RootViewModelActivated; this.applicationWindowState.RootWindowDeactivated += this.RootViewModelDeactivated; this.applicationWindowState.RootWindowClosed += this.RootViewModelClosed; this.viewModel.WindowOpenRequested += (o, e) => { this.applicationWindowState.EnsureInForeground(); }; this.viewModel.WindowCloseRequested += (o, e) => { // Always minimize, regardless of settings this.application.ShutdownMode = ShutdownMode.OnExplicitShutdown; this.applicationWindowState.CloseToTray(); }; this.viewModel.ExitRequested += (o, e) => this.application.Shutdown(); this.syncthingManager.TransferHistory.FolderSynchronizationFinished += this.FolderSynchronizationFinished; this.syncthingManager.Devices.DeviceConnected += this.DeviceConnected; this.syncthingManager.Devices.DeviceDisconnected += this.DeviceDisconnected; }
public WindowManagerWithoutCreateWindow(IViewManager viewManager, Func<IMessageBoxViewModel> messageBoxViewModelFactory, IWindowManagerConfig config) : base(viewManager, messageBoxViewModelFactory, config) { }
public MyWindowManager(IViewManager viewManager, Func<IMessageBoxViewModel> messageBoxViewModelFactory, IWindowManagerConfig config) : base(viewManager, messageBoxViewModelFactory, config) { }
public void RegisterTimeSpent(IViewManager viewManager, DomainEvent domainEvent, TimeSpan duration) { }