コード例 #1
0
        public MainForm()
        {
            InitializeComponent();

            frmInterfaceGrid.ColumnCount         = 3;
            frmInterfaceGrid.Columns[0].Name     = "Interface ID";
            frmInterfaceGrid.Columns[0].ReadOnly = true;
            frmInterfaceGrid.Columns[1].Name     = "Interface Name";
            frmInterfaceGrid.Columns[1].ReadOnly = true;
            frmInterfaceGrid.Columns[2].Name     = "Status";
            frmInterfaceGrid.Columns[2].ReadOnly = true;

            frmInterfaceGrid.RowCount = 20;


            //frmInterfaceGrid.AutoSize = true;

            DataGridViewButtonColumn btn = new DataGridViewButtonColumn();

            btn.FlatStyle = FlatStyle.Flat;
            frmInterfaceGrid.Columns.Add(btn);
            btn.HeaderText = "Message Statistics";
            btn.Text       = "Message Stats";
            btn.Name       = "Statistics";
            btn.UseColumnTextForButtonValue = true;
            refresh();

            WeiMonitorConfigurationSection config = config = (WeiMonitorConfigurationSection)ConfigurationManager.GetSection("WeiServiceManager");

            serviceName = config.ServiceName;
        }
コード例 #2
0
        public NewForm()
        {
            InitializeComponent();
            PopulateGridView();
            WeiMonitorConfigurationSection config = config = (WeiMonitorConfigurationSection)ConfigurationManager.GetSection("WeiServiceManager");

            if (config != null)
            {
                serviceName = config.ServiceName;
            }
        }