internal void ComputerSelected(Computer computer, ComputerExplorer computerExplorer1, RichTextBox rtbPcInfo) { if (computerExplorer1.SelectedComputer != computer) { computerExplorer1.SetComputer(computer); String[] titles = { "Имя:", "IP:", "MAC:", "Номер аудитории:" }; rtbPcInfo.Text = $"{titles[0]} {computer._Name}\n{titles[1]} {computer._Ip}\n{titles[2]} {computer._MAC}\n{titles[3]} {computer._AuditNumber}"; foreach (string title in titles) { rtbPcInfo.SelectionStart = rtbPcInfo.Text.IndexOf(title); rtbPcInfo.SelectionLength = title.Length; rtbPcInfo.SelectionFont = new Font(rtbPcInfo.Font, FontStyle.Bold); } rtbPcInfo.SelectionLength = 0; } }
public void ComputerSelected(Computer computer, ComputerExplorer computerExplorer1, RichTextBox rtbPcInfo) { model.ComputerSelected(computer, computerExplorer1, rtbPcInfo); }