public static View Select(ItemTemplate it, byte [] data) { if(it.View != null) { it.View.Data = data; it.View.Create(data); return it.View; } else { var v = new EditorView(it); v.Data = data; v.Create(data); return v; } }
public static View Select(ItemTemplate it, byte[] data, File file, IntellisenseProvider intellisenseOProvider, DockWindow window = null) { if(it.View != null) { it.View.Window = window; it.View.Create(data); return it.View; } else { var v = new EditorView(it, file); v.Window = window; v.IntellisenseProvider = intellisenseOProvider; v.Create(data); return v; } }