public LabelForm(Label labelEditor) { _labelEditor = labelEditor; InitializeComponent(); InitializeControls(); NewLabel = false; Text = "Метка " + _labelEditor.Name; }
private Label GetLabelInfo() { if (!NewLabel) { return _labelEditor; } Label labelInfo = new Label(); labelInfo.IsSystem = false; return labelInfo; }
public LabelError CRUD(Func<Label, LabelError> proc, Label labelInfo) { try { return proc(labelInfo); } catch (NoConnectionException /*ex*/) { MessageBoxAdv.Show("Связь с сервером потеряна.\r\nПриложение будет закрыто.", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning); Process.GetCurrentProcess().Kill(); } return LabelError.NoError; }
private void FillLabelInfo(ref Label labelInfo) { labelInfo.Name = txtLabelName.Text.Trim(); }