public WeaverForm() { InitializeComponent(); _pattern = new Pattern(8, 6, 2); Shaft s1 = new Shaft(8); _pattern.SetShaft(0, s1); _pattern.SetShaft(1, !s1); WarpThread w1 = new WarpThread(System.Drawing.Color.Red); _pattern.SetWarpThread(0, w1); _pattern.SetWarpThread(1, w1); _pattern.SetWarpThread(2, w1); _pattern.SetWarpThread(3, w1); w1.ThreadColor = System.Drawing.Color.White; _pattern.SetWarpThread(4, w1); _pattern.SetWarpThread(5, w1); _pattern.SetWarpThread(6, w1); _pattern.SetWarpThread(7, w1); _pattern.SetWaftThread(0, System.Drawing.Color.Green, 0); _pattern.SetWaftThread(1, System.Drawing.Color.Green, 1); _pattern.SetWaftThread(2, System.Drawing.Color.Green, 0); _pattern.SetWaftThread(3, System.Drawing.Color.White, 1); _pattern.SetWaftThread(4, System.Drawing.Color.White, 0); _pattern.SetWaftThread(5, System.Drawing.Color.White, 1); _sample = new Sample(); _sample.Pattern = _pattern; _sample.Visible = true; _sample.DisplayScale = 3; // SetStyle(ControlStyles.ResizeRedraw, true); }
public void SetWarpThread(int index, WarpThread warpThread) { WarpThreads_[index] = new WarpThread(warpThread.ThreadColor); }