Пример #1
0
 public Node(TNSProxy.IMapManager mapManager)
 {
     IsFocused       = false;
     IsTranscluded   = false;
     IsLocationDirty = false;
     MapManager      = mapManager;
 }
Пример #2
0
 public CompendiumArchiveProcessor(FileInfo compendiumFile, Proxy.IMapManager mapManager, Proxy.INode map)
 {
     CompendiumFile = compendiumFile;
     _zipFile       = new ZipFile(CompendiumFileStream);
     _fileCount     = _zipFile.FileNamesInZip.Count();
     _fileNames     = _zipFile.FileNamesInZip.ToList();
     MapManager     = mapManager;
     Map            = map;
 }
Пример #3
0
        public MainPage()
        {
            DebugLogger.Instance.LogMsg("Initialising Glyma...   Url: " + HtmlPage.Document.DocumentUri);
            InitializeComponent();
            SetupNetworkChange(); //logs if the network is going up/down
            Sidebar.Handler        = SuperGraph;
            ZommingControl.Handler = SuperGraph;
            Breadcrumbs.Handler    = SuperGraph;
            SuperGraph.Ref         = this;
            if (!App.IsDesignTime)
            {
                Loader.Visibility              = Visibility.Visible;
                Breadcrumbs.BreadcrumbChanged += OnBreadcrumbChanged;
                Breadcrumbs.BreadcrumbClicked += OnBreadcrumbClicked;
                SuperGraph.DataContext         = new SuperGraphProperties
                {
                    NodeTextWidth   = GlymaParameters.NodeTextWidth,
                    NodeImageWidth  = GlymaParameters.NodeImageWidth,
                    NodeImageHeight = GlymaParameters.NodeImageHeight
                };

                SoapEndPointFactory soapEndPointFactory = new SoapEndPointFactory(new Uri(App.Params.TransactionalMappingToolSvcUrl));
                var soapMapManager = new SoapProxy.SoapMapManager(soapEndPointFactory);

                _mapManager = soapMapManager;
                _mapManager.InitialiseMapManagerCompleted += OnInitialiseMapManagerCompleted;

                _mapManager.MapManagerActivityStatusUpdated += OnMapManagerActivityStatusUpdated;
                IoCContainer.GetInjectionInstance().RegisterComponent <Proxy.IMapManager, SoapProxy.SoapMapManager>(soapMapManager);

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

                var utilityServiceAddress       = new System.ServiceModel.EndpointAddress(new Uri(App.Params.GlymaUtilitySvcUrl));
                var utilityManagerServiceClient = new UtilityProxy.Service.UtilityServiceManagerClient(binding, utilityServiceAddress);
                var exportServiceManager        = new UtilityProxy.ExportServiceManager(utilityManagerServiceClient);
                IoCContainer.GetInjectionInstance().RegisterComponent <UtilityProxy.IExportServiceManager, UtilityProxy.ExportServiceManager>(exportServiceManager);
                exportServiceManager.IsExportingAvailableCompleted.RegisterEvent(IsExportingAvailableCompleted);

                _themeManager = new ThemeManager();

                SuperGraph.NodeClicked  += NodeClicked;
                SuperGraph.FilesDropped += FilesDropped;

                var jsBridge = new JavaScriptBridge(SuperGraph);
                HtmlPage.RegisterScriptableObject("glymaMapCanvas", jsBridge);

                exportServiceManager.IsExportingAvailableAsync();
            }
        }
 public BatchSaveCollapseStatesOperation(Proxy.IMapManager mapManager, PermissionLevel group)
     : base(mapManager)
 {
     if (group < PermissionLevel.Author)
     {
         _visibilityKey    = "Visibility";
         _collapseStateKey = "CollapseState";
     }
     else
     {
         _visibilityKey    = "AuthorVisibility";
         _collapseStateKey = "AuthorCollapseState";
     }
 }
Пример #5
0
 public SuperGraphController(Proxy.IMapManager mapManager, SecurityManager securityManager, ThemeManager themeManager, string videoSource) : base(mapManager)
 {
     _securityManager   = securityManager;
     ThemeManager       = themeManager;
     CurrentVideoSource = videoSource;
 }
Пример #6
0
 public BatchMoveNodesOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #7
0
 public ConnectNodesOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
 public BatchTranscludeNodesOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #9
0
 public SoapRelationship(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
     Status = Proxy.LoadState.None;
 }
Пример #10
0
 public DeleteNodeOperation(Node viewModeNode, Proxy.IMapManager mapManager)
     : base(mapManager)
 {
     _viewModeNode = viewModeNode;
 }
Пример #11
0
 public InProcessNode(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #12
0
 public SoapNode(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
     Status = Proxy.LoadState.None;
 }
Пример #13
0
        public IFileProcessor CreateFileProcessor(FileInfo file, Proxy.IMapManager mapManager, Proxy.INode map, Point location)
        {
            if (file.Name.EndsWith(".zip"))
            {
                using (FileStream fileStream = file.OpenRead())
                {
                    bool isCompendiumExport     = false;
                    bool hasExportsFolderAndXml = false;
                    bool hasLinkedFilesFolder   = false;

                    ZipFile zipFile = new ZipFile(fileStream);

                    foreach (string filename in zipFile.FileNamesInZip)
                    {
                        if (filename.StartsWith("Exports/"))
                        {
                            if (filename.EndsWith(".xml"))
                            {
                                isCompendiumExport = true;
                                //hasExportsFolderAndXml = true;

                                break;
                            }
                        }

                        //if (filename.StartsWith("Linked Files/"))
                        //{
                        //    hasLinkedFilesFolder = true;
                        //}

                        //if (hasExportsFolderAndXml && hasLinkedFilesFolder)
                        //{
                        //    isCompendiumExport = true;

                        //    break;
                        //}
                    }

                    if (isCompendiumExport)
                    {
                        var compendiumFileProcessor = new CompendiumArchiveProcessor(file,
                                                                                     mapManager, map);

                        return(compendiumFileProcessor);
                    }
                }
            }
            else if (file.Name.EndsWith(".xml"))
            {
                using (var stream = file.OpenRead())
                {
                    var compendiumXmlProcessor = new CompendiumXmlFileProcessor(stream, "", "");
                    compendiumXmlProcessor.MapManager = mapManager;
                    compendiumXmlProcessor.Map        = map;
                    if (compendiumXmlProcessor.Nodes.Any())
                    {
                        return(compendiumXmlProcessor);
                    }
                }
            }

            return(new DroppedFileProcessor(file, location));
        }
Пример #14
0
 public InProcessRelationship(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #15
0
 public DeleteRelationshipOperation(Proxy.IMapManager mapManager) : base(mapManager)
 {
 }
 public DeleteTranscludedNodeOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #17
0
 public UpdateNodeTypeOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
 public BatchConnectTranscludedNodesOperation(Proxy.IMapManager mapManager)
     : base(mapManager)
 {
 }
Пример #19
0
        public MainPage()
        {
            DebugLogger.Instance.LogMsg("Initialising Glyma...   Url: " + HtmlPage.Document.DocumentUri);
            InitializeComponent();
            SetupNetworkChange(); //logs if the network is going up/down
            Sidebar.Handler = SuperGraph;
            ZommingControl.Handler = SuperGraph;
            Breadcrumbs.Handler = SuperGraph;
            SuperGraph.Ref = this;
            if (!App.IsDesignTime)
            {
                Loader.Visibility = Visibility.Visible;
                Breadcrumbs.BreadcrumbChanged += OnBreadcrumbChanged;
                Breadcrumbs.BreadcrumbClicked += OnBreadcrumbClicked;
                SuperGraph.DataContext = new SuperGraphProperties
                {
                    NodeTextWidth = GlymaParameters.NodeTextWidth,
                    NodeImageWidth = GlymaParameters.NodeImageWidth,
                    NodeImageHeight = GlymaParameters.NodeImageHeight
                };

                SoapEndPointFactory soapEndPointFactory = new SoapEndPointFactory(new Uri(App.Params.TransactionalMappingToolSvcUrl));
                var soapMapManager = new SoapProxy.SoapMapManager(soapEndPointFactory);

                _mapManager = soapMapManager;
                _mapManager.InitialiseMapManagerCompleted += OnInitialiseMapManagerCompleted;
                
                _mapManager.MapManagerActivityStatusUpdated += OnMapManagerActivityStatusUpdated;
                IoCContainer.GetInjectionInstance().RegisterComponent<Proxy.IMapManager, SoapProxy.SoapMapManager>(soapMapManager);

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

                var utilityServiceAddress = new System.ServiceModel.EndpointAddress(new Uri(App.Params.GlymaUtilitySvcUrl));
                var utilityManagerServiceClient = new UtilityProxy.Service.UtilityServiceManagerClient(binding, utilityServiceAddress);
                var exportServiceManager = new UtilityProxy.ExportServiceManager(utilityManagerServiceClient);
                IoCContainer.GetInjectionInstance().RegisterComponent<UtilityProxy.IExportServiceManager, UtilityProxy.ExportServiceManager>(exportServiceManager);
                exportServiceManager.IsExportingAvailableCompleted.RegisterEvent(IsExportingAvailableCompleted);

                _themeManager = new ThemeManager();

                SuperGraph.NodeClicked += NodeClicked;
                SuperGraph.FilesDropped += FilesDropped;

                var jsBridge = new JavaScriptBridge(SuperGraph);
                HtmlPage.RegisterScriptableObject("glymaMapCanvas", jsBridge);

                exportServiceManager.IsExportingAvailableAsync();
            }
        }