private PacketLogControlConfig CreateConfig(string name)
        {
            PacketLogControlConfig config = _document.GetProperty(PACKETLOG_BASE_CONFIG + name) as PacketLogControlConfig;

            if (config == null)
            {
                config = new PacketLogControlConfig();
                config.Columns.Clear();
                config.Columns.Add(new TagPacketLogColumn());
                config.Columns.Add(new DataPacketLogColumn());
            }

            return(config);
        }
Esempio n. 2
0
        public PacketLogDocumentControl(IDocumentObject document)
        {
            _document = (PacketLogDocument)document;

            InitializeComponent();
            logPacketControl.SetPackets(_document.Packets);
            logPacketControl.LogName = _document.Name;
            PacketLogControlConfig config = _document.GetProperty(PACKETLOG_CONFIG) as PacketLogControlConfig;

            if (config != null)
            {
                logPacketControl.Config = config;
            }

            Text = _document.Name;
        }
Esempio n. 3
0
        public NetServiceDocumentControl(NetServiceDocument document)
        {
            InitializeComponent();
            if (components == null)
            {
                components = new Container();
            }

            _serviceControl  = (Control)Activator.CreateInstance(GetControlTypeForDocument(document), document);
            _readOnlyControl = _serviceControl as IReadOnlyControl;
            panelSettings.Controls.Add(_serviceControl);
            _serviceControl.Dock      = DockStyle.Fill;
            _document                 = document;
            packetLogControl.LogName  = _document.Name;
            packetLogControl.ReadOnly = !PacketLogMutable;
            packetLogControl.SetPackets(_document.Packets);
            metaEditorControl.Meta = _document.GlobalMeta;
            networkHistoryControl.SetDocument(_document);
            _defaultGraph = "Default";
            _fileLogs     = new Dictionary <Guid, FileRedirectLogEntry>();
            Disposed     += new EventHandler(NetServiceControl_Disposed);
            credentialsEditorControl.SetCredentials(_document.Credentials);

            PacketLogControlConfig config = document.GetProperty(PACKETLOG_CONFIG) as PacketLogControlConfig;

            if (config != null)
            {
                packetLogControl.Config = config;
            }

            Text = _document.Name;
            UpdateNetgraphs();

            comboBoxNetgraph.SelectedItem = null;

            foreach (object item in comboBoxNetgraph.Items)
            {
                NetGraphDocument doc = item as NetGraphDocument;
                if (doc == _document.NetGraph)
                {
                    comboBoxNetgraph.SelectedItem = item;
                    break;
                }
            }
        }
        private PacketLogControlConfig CreateConfig(string name)
        {
            PacketLogControlConfig config = _document.GetProperty(PACKETLOG_BASE_CONFIG + name) as PacketLogControlConfig;

            if (config == null)
            {
                config = new PacketLogControlConfig();
                config.Columns.Clear();
                config.Columns.Add(new TagPacketLogColumn());
                config.Columns.Add(new DataPacketLogColumn());
            }

            return config;
        }