Exemple #1
0
        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.MouseLeftButtonDown  += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonDown);
            this.MouseLeftButtonUp    += new MouseButtonEventHandler(CompendiumMapDepthMap_MouseLeftButtonUp);

            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();
            }
        }
 public MouseKeyboardEvents(CompendiumMapDepthMap _caller, MapDepthViewManager viewManager, TypeManager typeManager, MapDepthNavigator navigator, DatabaseMappingService nodeService, ScaleTransform _scaleTransform, TranslateTransform _translateTransform)
 {
     caller             = _caller;
     ViewManager        = viewManager;
     _typeManager       = typeManager;
     _navigator         = navigator;
     _nodeService       = nodeService;
     scaleTransform     = _scaleTransform;
     translateTransform = _translateTransform;
 }
        public CompendiumFirstDepthMap()
        {
            InitializeComponent();

            if (!IsInDesignMode)
            {
                _nodeService = new DatabaseMappingService();

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

                _typeManager.InitialiseNodeTypeManagerCompleted += new EventHandler(InitialiseNodeTypeManagerCompleted);
                _typeManager.InitialiseNodeTypeManager();
            }
        }