示例#1
0
        private void AddAnalyzer(object sender, RoutedEventArgs e)
        {
            var newHeader = new TreeViewItem { Header = "Communication Interfaces", IsExpanded = true };
            foreach (CommunicationInterfaceHandler record in RegistryContext.Registry.CommunicationInterfaceHandlers)
            {
                newHeader.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var window = new ComponentCreationWindow("Select a Communication Interface to be assigned with a new Analyzer", newHeader, RegistryContext.Registry.AddAnalyzer);
            window.Show();
        }
示例#2
0
        private void AddOutputFileCreator(object sender, RoutedEventArgs e)
        {
            var newHeaderCommunicationInterface = new TreeViewItem
            {
                Header = "Communication Interfaces",
                IsExpanded = true
            };
            foreach (CommunicationInterfaceHandler record in RegistryContext.Registry.CommunicationInterfaceHandlers)
            {
                newHeaderCommunicationInterface.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var newHeaderOutputDataTemplate = new TreeViewItem
            {
                Header = "Output Data Templates",
                IsExpanded = true
            };
            foreach (OutputDataTemplate record in RegistryContext.Registry.OutputDataTemplates)
            {
                newHeaderOutputDataTemplate.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var window = new ComponentCreationWindow("Select components to be assigned with a new Output File Creator", newHeaderCommunicationInterface, newHeaderOutputDataTemplate, RegistryContext.Registry.AddOutputFileCreator);
            window.Show();
        }
示例#3
0
        private void AddVFlashChannel(object sender, RoutedEventArgs e)
        {
            var newHeaderCommunicationInterface = new TreeViewItem
            {
                Header = "Communication Interfaces",
                IsExpanded = true
            };
            foreach (CommunicationInterfaceHandler record in RegistryContext.Registry.CommunicationInterfaceHandlers)
            {
                newHeaderCommunicationInterface.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var newHeaderVFlashBank = new TreeViewItem {Header = "vFlash Banks", IsExpanded = true};
            foreach (VFlashTypeBank record in RegistryContext.Registry.VFlashTypeBanks)
            {
                newHeaderVFlashBank.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var window = new ComponentCreationWindow("Select components to be assigned with a new vFlash Channel", newHeaderCommunicationInterface, newHeaderVFlashBank, RegistryContext.Registry.AddVFlashChannel);
            window.Show();
        }
示例#4
0
        private void AddInterface(object sender, RoutedEventArgs e)
        {
            var newHeader = new TreeViewItem {Header = "PLC Connections", IsExpanded = true};
            foreach (PLC.PlcCommunicator record in RegistryContext.Registry.PlcCommunicators)
            {
                newHeader.Items.Add(new TreeViewItem
                {
                    Header = record.Description,
                    AlternationCount = (int)record.Header.Id
                });
            }

            var window = new ComponentCreationWindow("Select a PLC connection to be assigned with a new Communication Interface", newHeader, RegistryContext.Registry.AddCommunicationInterface);
            window.Show();
        }