public void InvokeClose() { if (!IsCloseable) { Logger.Error(GetType(), $"formId={FormId} is not closeable"); return; } FormContainerElement.DispatchEvent(new Event(Magics.ProgramaticCloseFormEventName)); }
public bool CreateDirectory() { var parentLayer = new FormContainerElement(); var directoryInput = new TextInputElement(); directoryInput.Label = "Имя папки: "; directoryInput.Text = "Новая папка"; parentLayer.ChildElements.Add(directoryInput); var dialog = DialogBox.Create("Ввод имени папки:", parentLayer, ButtonDef.OkCancelButtons); dialog.AutoSize = false; dialog.Width = 360; if (dialog.ShowDialog() == ButtonDef.OkButton) { return(fileListView1.CreateDirectory(directoryInput.Text)); } return(false); }