private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
CondensorShape Kondensator = CreateCondensor(new NPointF(120, 20), 1.0f, 0.0f);
nDrawingDocument1.ActiveLayer.AddChild(Kondensator);
// create a new library
NLibraryDocument library = new NLibraryDocument();
library.Info.Title = "My first library";
library.AddChild(new NMaster(Kondensator, NGraphicsUnit.Pixel, "Kondensator", "My Kondensator"));
nLibraryBrowser1.OpenLibraryGroup(library);
}
protected CondensorShape CreateCondensor(NPointF location, float scale, float rotation)
{
CondensorShape Condensor = new CondensorShape();
NStyle.SetFillStyle(Condensor, new NColorFillStyle(Color.Empty));
Condensor.Location = location;
Condensor.Width = Condensor.Width * scale;
Condensor.Height = Condensor.Height * scale;
Condensor.Rotate(CoordinateSystem.Scene, rotation, Condensor.Location);
return Condensor;
}