private void RefreshServiceList() { cmbServiceList.DataSource = WinServiceConfigReader.GetWinServices(); cmbServiceList.DisplayMember = WinServiceConfigReader.SERVICE; cmbServiceList.ValueMember = WinServiceConfigReader.SERVICE; cmbServiceList.SelectedIndex = 0; }
private void FrmEditSvcList_Load(object sender, EventArgs e) { foreach (var item in WinServiceConfigReader.GetWinServices()) { lsbServices.Items.Add(item); } lsbServices.DisplayMember = "ShowText"; lsbServices.ValueMember = "Service"; lsbServices.ContextMenuStrip = this.contextMenuStrip1; }