public RibbonPanelViewModel(IEventAggregator eventAggregator, IApplicationData data)
        {
            Data             = data;
            _eventAggregator = eventAggregator;
            //_editor = editor;
            //GeometryImportCommand = new GeometryImportCommandHandler(_editor, _eventAggregator);

            TranslateCommand = new DelegateCommand(TranslateCommandhandler);
            RotateCommand    = new DelegateCommand(RotateCommandhandler);
            ScaleCommand     = new DelegateCommand(ScaleCommandhandler);

            //RibbonControl.Background =

            //if (data.ActiveDocument != null)
            //{
            //    AddUITabsFromDoc(data.ActiveDocument);
            //}


            eventAggregator.GetEvent <ActiveIDocumentChangedEvent>().Subscribe(OnActiveDocumentChanged);
            eventAggregator.GetEvent <ApplicationLoadedEvent>().Subscribe(OnApplicationLoaded);
            if (data.ActiveDocument == null)
            {
                return;
            }
        }
        public override bool Connect(IApplicationData data, IEventAggregator events)
        {
            Data             = data;
            _eventAggregator = events;

            return(true);
        }
Exemple #3
0
 public bool Connect(IApplicationData data, object IOManager)
 {
     _data      = data;
     _IOManager = IOManager;
     IconPath   = data.GetIconPath("bed.png");
     return(true);
 }
Exemple #4
0
 public override bool Connect(IApplicationData data, IEventAggregator eventaggre)
 {
     _data            = data;
     _eventAggregator = eventaggre;
     _eventAggregator.GetEvent <NodeSelectionChangedEvent>().Subscribe(OnSelectedNodeChanged);
     return(true);
 }
Exemple #5
0
        public static async Task <T> ReadAsync <T>(this IApplicationData self)
            where T : class, new()
        {
            var valueResult  = default(T);
            var invokeResult = default(bool?);

            self.Read <T>(
                data =>
            {
                valueResult  = data;
                invokeResult = true;
            },
                () => invokeResult = false);

            while (!invokeResult.HasValue)
            {
                await Task.Delay(MillisecondsDelay);
            }

            if (!invokeResult.Value)
            {
                throw new InvalidOperationException();
            }

            return(valueResult);
        }
 public override bool Connect(IApplicationData data, IEventAggregator eventaggre)
 {
     _data       = data;
     _eventaggre = eventaggre;
     _eventaggre.GetEvent <OutputPrintEvent>().Subscribe(OnOutputPrintMessageArrived);
     return(true);
 }
 public JobOffersController(IJobOfferData jobOfferData, IApplicationData applicationData,
                            IConfiguration configuration)
 {
     _jobOfferData    = jobOfferData;
     _applicationData = applicationData;
     _configuration   = configuration;
 }
 public AuthenticationService(
     IHttpManager httpManager,
     IApplicationData applicationData
     )
 {
     _httpManager     = httpManager;
     _applicationData = applicationData;
 }
Exemple #9
0
        public override void Execute(IWin32Window owner, ToolStripItem sender, IApplicationData content)
        {
            ApplicationData appData = content as ApplicationData;
            var             plugin  = _Manager.GetPlugins(p => p.Text == "Checkable");

            (plugin.FirstOrDefault() as CheckablePlugin)?.SetChecked(owner, content);
            MessageBox.Show($"Plugin1: {appData.Name}");
        }
Exemple #10
0
 public bool Connect(IApplicationData data, object IOManager)
 {
     _manager = (R3DIOInterop.RIntelligentObjectManagerInterop)IOManager;
     _data    = data;
     Name     = "SampleTable";
     IconPath = data.GetIconPath("sampletable.png");
     return(true);
 }
Exemple #11
0
 public SessionData(string clientToken, Guid sessionGuid, DateTime clientStartTime, string environment, IApplicationData application, IMachineData machine, IUserData user)
 {
     ClientToken     = clientToken;
     SessionGuid     = sessionGuid;
     ClientStartTime = clientStartTime;
     Environment     = environment;
     Application     = application;
     Machine         = machine;
     User            = user;
 }
Exemple #12
0
        public RBuilderDocument(IApplicationData data) : base(data)
        {
            Editor = new ViewerInterop.ViewerEditor();
            Tree   = new TreeData(Data, this);

            data.Eventaggregator.GetEvent <OnContextCreatedEvent>().Subscribe(OnContextCreated);

            _modelerCommands = new ModelingCommands(data, GraphicsEditor.GetModelingManager());
            _lightCommands   = new LightCommands(data, GraphicsEditor.GetLightsManager());
        }
        public DockablePanelViewModel(IApplicationData data, IEventAggregator events)
        {
            _events = events;
            Data    = data;

            this.ADLayout = new AvalonDockLayoutViewModel(this, events);
            _events.GetEvent <ApplicationLoadedEvent>().Subscribe(OnApplicationLoaded);
            _events.GetEvent <NewDocumentAddedEvent>().Subscribe(OnNewDocumentCreated);
            _events.GetEvent <DockableToolToggleButtonClickedEvent>().Subscribe(OnDockableToolsToggleButtonClicked);
        }
Exemple #14
0
 /// <summary>
 /// Call to only execute if <paramref name="hasLicense"/> is true. If a license is not applicable, the caller only need
 /// to call <see cref="Execute(IWin32Window, ToolStripItem, IApplicationData)"/>.
 /// </summary>
 /// <param name="owner">Calling application's window</param>
 /// <param name="sender"><see cref="ToolStripItem"/> that initiated the call</param>
 /// <param name="content">Content from the application that can be accessed</param>
 /// <param name="hasLicense">Indicates if the calling application has a license</param>
 public virtual void Execute(IWin32Window owner, ToolStripItem sender, IApplicationData content, bool hasLicense)
 {
     if (this.LicenseRequired && !hasLicense)
     {
         MessageBox.Show(owner, "You have discovered a feature only available in the licensed versions of the application.", "Feature Unavailable", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         this.Execute(owner, sender, content);
     }
 }
Exemple #15
0
        public ApplicationData(XPathNodeIterator iter, IApplicationData template)
        {
            if (template != null)
            {
                _automaticValidateOnSaveEnabled = template.AutomaticValidateOnSaveEnabled;
            }

            if (iter.MoveNext())
            {
                _automaticValidateOnSaveEnabled = bool.Parse(iter.Current.GetAttribute("automaticValidateOnSaveEnabled", string.Empty));
            }
        }
        public override bool Connect(IApplicationData data, IEventAggregator eventaggre)
        {
            _data       = data;
            _eventaggre = eventaggre;

            _doc     = _data.ActiveDocument as IRBuilderDocument;
            _manager = _doc.GetLightsManager();

            eventaggre.GetEvent <OnTransformNodeSelectedOnScreen>().Subscribe(OnTransformNodeSelectedOnScreenHandler);

            return(true);
        }
        public MainViewModel(IApplicationData applicationData)
        {
            if (applicationData == null)
            {
                throw new ArgumentNullException(nameof(applicationData));
            }

            var thesaurus = applicationData.Thesaurus;

            SearchSynonyms = new SearchSynonymsViewModel(thesaurus);
            NewSynonyms    = new NewSynonymsViewModel(thesaurus);
            AllWords       = new AllWordsViewModel(thesaurus);
        }
        public InMemoryHttpServer(string baseUrl, IApplicationData unitOfWork)
        {
            this.baseUrl = baseUrl;
            var config = new HttpConfiguration();
            this.AddHttpRoutes(config.Routes);
            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

            var resolver = new TestBugsDependencyResolver();
            resolver.UnitOfWork = unitOfWork;
            config.DependencyResolver = resolver;

            var server = new HttpServer(config);
            this.client = new HttpClient(server);
        }
        public override bool Connect(IApplicationData data, IEventAggregator eventaggre)
        {
            _data  = data;
            _event = eventaggre;

            (data.ActiveDocument as IRBuilderDocument).GetShaderPaths().ForEach((item) =>
            {
                Shaderfiles.Add(new ShaderFileInfo(item));
            });


            _rdoc = _data.ActiveDocument as IRBuilderDocument;

            return(true);
        }
Exemple #20
0
        public void TestIfUserCanGetViewUnstartedGames()
        {
            IApplicationData data = Mock.Create <IApplicationData>();

            Game[] games = { new Game(), new Game(), new Game() };

            Mock.Arrange(() => data.Games.All())
            .Returns(() => games.AsQueryable());

            var server = new InMemoryHttpServer <Game>(this.inMemoryServerUrl, data);

            var response = server.CreateGetRequest("/api/games");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);
        }
Exemple #21
0
        public override bool Connect(IApplicationData data, IEventAggregator eventaggre)
        {
            _eventagg = eventaggre;
            _data     = data;

            _rDoc = data.ActiveDocument as IRBuilderDocument;

            List <UI_RNode> lst = new List <UI_RNode>()
            {
                new UI_RNode(data, _rDoc.Tree.GeometryParentNode, null)
            };

            Children = new ObservableCollection <UI_RNode>(lst);

            return(true);
        }
Exemple #22
0
        public void TestIfUserCanGetHighScores()
        {
            IApplicationData data = Mock.Create <IApplicationData>();

            Score[] scores = { new Score(), new Score(), new Score() };

            Mock.Arrange(() => data.Score.All())
            .Returns(() => scores.AsQueryable());

            var server = new InMemoryHttpServer <Score>(this.inMemoryServerUrl, data);

            var response = server.CreateGetRequest("/api/scores");

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.IsNotNull(response.Content);
        }
        public InMemoryHttpServer(string baseUrl, IApplicationData unitOfWork)
        {
            this.baseUrl = baseUrl;
            var config = new HttpConfiguration();

            this.AddHttpRoutes(config.Routes);
            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

            var resolver = new TestBugsDependencyResolver();

            resolver.UnitOfWork       = unitOfWork;
            config.DependencyResolver = resolver;

            var server = new HttpServer(config);

            this.client = new HttpClient(server);
        }
 public QualityController(IBatchRepository batchRepository,
                          IPcsWeightParameterRepository pcsParameterRepository, IPcsReworkParameters pcsReworkParameters,
                          IPcsActiveTempParameters pcsActiveTempParameters, IPcsScoringRepository pcsScoringRepository,
                          IPcsToleranceParameterRepository pcsToleranceParameter, IRecipeLimitRepository recipeLimitRepository,
                          IHelperMethods helperMethods, IApplicationData applicationData, IMaterialDetailsRepository materialDetailsRepository)
 {
     _batchRepository           = batchRepository;
     _pcsParameterRepository    = pcsParameterRepository;
     _pcsReworkParameters       = pcsReworkParameters;
     _pcsActiveTempParameters   = pcsActiveTempParameters;
     _pcsScoringRepository      = pcsScoringRepository;
     _pcsToleranceParameter     = pcsToleranceParameter;
     _recipeLimitRepository     = recipeLimitRepository;
     _helperMethods             = helperMethods;
     _applicationData           = applicationData;
     _materialDetailsRepository = materialDetailsRepository;
     _generalHelperMethods      = new GeneralHelperMethods(_batchRepository);
 }
Exemple #25
0
        public HttpManager(
            HttpClient httpClient,
            IApplicationData applicationData,
            NavigationManager navigationManager,
            IStringLocalizer <WebServicesResource> localizer
            )
        {
            _httpClient        = httpClient;
            _applicationData   = applicationData;
            _navigationManager = navigationManager;
            _localizer         = localizer;

            _jsonSerializerOptions = new JsonSerializerOptions()
            {
                PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
                WriteIndented        = true,
                IgnoreNullValues     = true
            };
            _jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
            _jsonSerializerOptions.Converters.Add(new ObjectIdConverter());
        }
Exemple #26
0
        public override bool Connect(IApplicationData data, Prism.Events.IEventAggregator eventaggre)
        {
            _data  = data;
            _event = eventaggre;
            _doc   = data.ActiveDocument as IRBuilderDocument;


            IOSelectionChanged = new RelayCommand <object>(IOSelectionChangedHandler);

            _doc.SetSelectiontype(Viewer.SelectionType.IntelligentObject);
            _manager = new R3DIOInterop.RIntelligentObjectManagerInterop(_doc.Tree.GeometryParentNode);

            LoadObjectsFromPlugin();

            LoadInternalObjects();
            //CreateCube();

            // CreateTable();

            return(true);
        }
Exemple #27
0
        public ToolBarPanelViewModel(IApplicationData data)
        {
            _data = data;
            //FrontViewCommand = new DelegateCommand(FrontViewCommandHandler);

            //BackViewCommand = new DelegateCommand(BackViewCommandHandler);

            //RightViewCommand = new DelegateCommand(RightViewCommandHandler);

            //LeftViewCommand = new DelegateCommand(LeftViewCommandHandler);

            //TopViewCommand = new DelegateCommand(TopViewCommandHandler);

            //BottomViewCommand = new DelegateCommand(BottomViewCommandHandler);

            //PrespectiveViewCommand = new DelegateCommand(PrespectiveViewCommandHandler);

            //WireframeViewCommand = new DelegateCommand(WireframeViewCommandHandler);

            //ShadedViewCommand = new DelegateCommand(ShadedViewCommandHandler);
            //GridVisibilityCommand = new RelayCommand<Boolean>(GridVisibilityCommandHandler);
        }
        public MainWindowViewModel(IUnityContainer container, IRegionManager regionManager, IEventAggregator eventAggregator, IApplicationData data)
        {
            _data            = data;
            _eventAggregator = eventAggregator;
            _regionManager   = regionManager;
            _container       = container;
            NavigateCommand  = new DelegateCommand <String>(Navigate);
            ExitCommand      = new DelegateCommand(Exit);

            //container.RegisterType<IEditorInterop, ViewerInterop.ViewerEditor>(new ContainerControlledLifetimeManager());



            Commands.NavigateCommand.RegisterCommand(NavigateCommand);

            //eventAggregator.GetEvent<ViewActivateEvent>().Subscribe(ViewActivated);
            // eventAggregator.GetEvent<ViewItemsCountChangedEvent>().Subscribe(ViewItemsCountChanged);

            regionManager.RegisterViewWithRegion(RegionNames.MainRibbonRegion, typeof(RibbonPanel));
            regionManager.RegisterViewWithRegion(RegionNames.StatusBarRegion, typeof(StatusBar));
            regionManager.RegisterViewWithRegion(RegionNames.ModuleRegion, typeof(DockablePanel));
            regionManager.RegisterViewWithRegion(RegionNames.ToolBarRegion, typeof(ToolBarPanel));
        }
 public GamesController(IApplicationData applicationData)
     : base(applicationData)
 {
 }
 protected BaseController(IApplicationData data)
 {
     this.Data = data;
 }
 public ShopController(IApplicationData data)
     :base(data)
 {
     
 }
 public RolesController(IApplicationData data)
     : base(data)
 {
 }
Exemple #33
0
 public void Connect(IApplicationData data)
 {
     data.RegisterTool("Intelligent_objects", DocumentType, data.GetIconPath("IntelligentObject.png"),
                       typeof(ViewModels.IObjectBrowserViewModel), RDocumentData.ToolsDockPosition.Left);
 }
 public ManageController(IApplicationData data, UserManager userManager, ApplicationSignInManager signInManager)
     : base(data)
 {
     this._userManager = userManager;
     this._signInManager = signInManager;
 }
 public TransactionController(IApplicationData data)
     :base(data)
 {
     
 }
Exemple #36
0
 public Payment(IPaymentInfo info, IApplicationData<IScorpionDataProvider> dataProviderFactory, ISecurityManager securityManager)
     : base(dataProviderFactory, securityManager)
 {
     this.info = info;
 }
 public AccountController(IApplicationData data, UserManager userManager, ApplicationSignInManager signInManager)
     : base(data)
 {
     this.SignInManager = signInManager;
     this.UserManager = userManager;
 }
 public ContactsController(IApplicationData data)
     : base(data)
 {
 }
 public UsersController(IApplicationData data)
     : base(data)
 {
 }
Exemple #40
0
 public Order(IOrderInfo info, IApplicationData<IScorpionDataProvider> dataProviderFactory, SynchronizationContext synchronizationContext, ISecurityManager securityManager)
     : base(dataProviderFactory, securityManager)
 {
     this.info = info;
     this.synchronizationContext = synchronizationContext;
 }
 public BaseController(IApplicationData applicationData)
 {
     this.ApplicationData = applicationData;
 }
        public AlbumsController(IApplicationData data)
            : base(data)
        {

        }
 public HomeController(IApplicationData data)
     : base(data)
 {
 }
 public CustomerController(IApplicationData data)
     :base(data)
 {
     
 }
Exemple #45
0
 protected Entity(IApplicationData<IScorpionDataProvider> dataProviderFactory, ISecurityManager securityManager)
 {
     this.dataProviderFactory = dataProviderFactory;
     this.securityManager = securityManager;
 }
 public BaseController(IApplicationData data, User user)
     : this(data)
 {
     this.UserProfile = user;
 }
 public ErrorController(IApplicationData data)
     : base(data)
 {
 }
 protected BaseController(IApplicationData data, User userProfile)
     : this(data)
 {
     this.UserProfile = userProfile;
 }
 public NewsController(IApplicationData data)
     : base(data)
 {
 }
 public PriceListController(IApplicationData data)
     : base(data)
 {
 }
        public PhotographsController(IApplicationData data)
            : base(data)
        {

        }
 public ApplicationController(IApplicationData db, ICustomerData customerDb)
 {
     this.db         = db;
     this.customerDb = customerDb;
 }
 public BaseController(IApplicationData data)
 {
     this.Data = data;
 }
 public ServiceController(IApplicationData data)
     : base(data)
 {
 }
Exemple #55
0
 public RUIManager(IApplicationData _data)
 {
     this.Data = _data;
 }
 public OrderFulfillmentProcess(IFulfillmentProcessInfo info, IApplicationData<IScorpionDataProvider> dataProviderFactory, ISecurityManager securityManager)
     : base(dataProviderFactory, securityManager)
 {
     this.info = info;
 }