InitTypeListWindow() публичный статический Метод

public static InitTypeListWindow ( string title, GraphTypeInfo, items, Action onAdd ) : void
title string
items GraphTypeInfo,
onAdd Action
Результат void
Пример #1
0
    public override void Perform(DiagramViewModel node)
    {
        var typesList = GetRelatedTypes(node);

        var viewModelItem = node.SelectedNodeItem as TypedItemViewModel;
        ITypeDiagramItem viewModelItemData;

        if (viewModelItem == null)
        {
            viewModelItemData = node.SelectedNode.DataObject as ITypeDiagramItem;
            if (viewModelItemData == null)
            {
                return;
            }
        }
        else
        {
            viewModelItemData = viewModelItem.Data;
        }
        ElementItemTypesWindow.InitTypeListWindow("Choose Type", typesList.ToArray(), (selected) =>
        {
            uFrameEditor.ExecuteCommand((diagram) =>
            {
                viewModelItemData.RelatedType = selected.Name;
            });
            EditorWindow.GetWindow <ElementItemTypesWindow>().Close();
        });
    }
Пример #2
0
 public void InitTypeListWindow(GraphTypeInfo[] typesInfoList, Action <GraphTypeInfo> action)
 {
     ElementItemTypesWindow.InitTypeListWindow("Choose Type", typesInfoList, (selected) =>
     {
         EditorWindow.GetWindow <ElementItemTypesWindow>().Close();
         InvertApplication.Execute(() =>
         {
             action(selected);
         });
     });
 }