private MaterialWidget(MaterialsWindow window, MatImage image) { _window = window; _image = image; image.Click += ImageOnClick; }
public static MaterialWidget Create(MaterialsWindow window, int index) { var image = window._widget.FindWidgetByUniqueName <MatImage>(string.Format("mat{0:00}", index)); if ((image == null)) { return(null); } var materialWidget = new MaterialWidget(window, image); image.Metadata = materialWidget; return(materialWidget); }