Example #1
0
        private void _arrowControl_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            NodeRelationshipHelper nrh = IoC.IoCContainer.GetInjectionInstance().GetInstance <NodeRelationshipHelper>();

            if (nrh != null)
            {
                nrh.Relationship = _arrowControl;
            }
        }
Example #2
0
        private void _arrowControl_DragFromAnchorEnded(object sender, RoutedEventArgs e)
        {
            NodeRelationshipHelper nrh = IoC.IoCContainer.GetInjectionInstance().GetInstance <NodeRelationshipHelper>();

            if (nrh != null)
            {
                nrh.Relationship = _arrowControl;
                nrh.EdittingSide = RelationshipSide.From;
                nrh.IsEditting   = true;
            }
        }
        public CompendiumMapDepthMap()
        {
            InitializeComponent();
            
            NodeRelationshipHelper nrh = new NodeRelationshipHelper();
            IoC.IoCContainer.GetInjectionInstance().RegisterComponent<NodeRelationshipHelper>(nrh);
            nrh.NodesConnected += new EventHandler(OnNodesConnected);

            this.MouseMove += new MouseEventHandler(CompendiumMapDepthMap_MouseMove);
            this.KeyDown += new KeyEventHandler(CompendiumMapDepthMap_KeyDown);
            this.MouseRightButtonDown += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonDown);
            this.MouseRightButtonUp += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseRightButtonUp);
            this.MouseWheel += new MouseWheelEventHandler(CompendiumMapDepthMap_MouseWheel);
            this.MouseLeftButtonDown += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonDown);
            this.MouseLeftButtonUp += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonUp);
            
            this.Loaded += new RoutedEventHandler(CompendiumMapDepthMap_Loaded);

            if (!IsInDesignMode)
            {
                // TODO: The following code has been superceded;
                #region Obsolete
                if (string.IsNullOrEmpty(MappingToolSvcUrl))
                {
                    _nodeService = new DatabaseMappingService();
                }
                else
                {
                    _nodeService = new DatabaseMappingService(MappingToolSvcUrl);
                }
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<INodeService>(_nodeService);

                _typeManager = new TypeManager(_nodeService);
                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<TypeManager>(_typeManager);

                _typeManager.InitialiseNodeTypeManagerCompleted += new EventHandler(InitialiseNodeTypeManagerCompleted);
                _typeManager.InitialiseNodeTypeManager();
                #endregion

                // TODO: Need to change this to pull from the params in the HTML declaration itself.
                TransactionalMappingToolSvcUrl = "http://glyma-dev/_vti_bin/sevensigma/transactionalmappingtoolservice.svc";

                System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
                binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
                binding.MaxReceivedMessageSize = 2147483647;

                System.ServiceModel.EndpointAddress address = new System.ServiceModel.EndpointAddress(new Uri(TransactionalMappingToolSvcUrl));

                Service.TransactionalMappingToolServiceClient client = new Service.TransactionalMappingToolServiceClient(binding, address);

                //_mapManager = new SoapMapManager(client);

                IoC.IoCContainer.GetInjectionInstance().RegisterComponent<IMapManager>(_mapManager);

                _mapManager.InitialiseMapManagerCompleted += new EventHandler<InitialiseMapManagerEventArgs>(OnInitialiseMapManagerCompleted);
                _mapManager.InitialiseMapManagerAsync();
            }
        }