public static Task <ItemModel> RequestItem()
        {
            var win = new ItemEditor();

            win.completionTask = new TaskCompletionSource <ItemModel>();

            win.Show();

            return(win.completionTask.Task);
        }
        public static Task <ItemModel> OpenItem(ItemModel item)
        {
            var win = new ItemEditor();

            win.completionTask = new TaskCompletionSource <ItemModel>();

            win.Show();

            win.Item = item;

            win.TypeComboBox.SelectedValue = item.Type;

            win.ClearControls();
            win.DrawControls();

            win.SetControlValues(item);

            return(win.completionTask.Task);
        }