示例#1
0
        public static void SaveChannel(XmlElement node, IChannel channel)
        {
            SNMPChannelImp channelBase = (SNMPChannelImp)channel;

            node.SetAttribute("name", channelBase.Name);
            node.SetAttribute("type", channelBase.GetType().ToString());
            node.SetAttribute("agent", channelBase.AgentName);
            node.SetAttribute("oid", channelBase.Oid);
        }
        private void showChannel(int row, SNMPChannelImp channel)
        {
            grid[row, gridColName]        = new SourceGrid.Cells.Cell(channel.Name);
            grid[row, gridColName].Tag    = channel;
            grid[row, gridColName].Editor = null;

            grid[row, gridColFSType]        = new SourceGrid.Cells.Cell(channel.GetType().ToString(), typeof(string));
            grid[row, gridColFSType].Editor = null;

            grid[row, gridColAgent]        = new SourceGrid.Cells.Cell(channel.AgentName, typeof(string));
            grid[row, gridColAgent].Editor = null;

            grid[row, gridColOid]        = new SourceGrid.Cells.Cell(channel.Oid, typeof(string));
            grid[row, gridColOid].Editor = null;
        }