void Start() { sc = GetComponent <SizeControl>(); cc = GetComponent <ColorControl>(); cc.SetColor(ColorAtStart); SetSizeGrowth(); }
//CLICK EVENT HANDLERS FOR SIDES private void CustomizeSide(Side side) { if (DataContext is Order myOrder) { var orderControl = this.FindAncestor <OrderControl>(); SizeControl sizeControl = new SizeControl(); myOrder.Add(side); sizeControl.DataContext = side; orderControl.SwapScreen(sizeControl); } }
public MainWindow() { SizeControl sizeControl = new SizeControl(); sizeControl.ShowDialog(); if (sizeControl.SizeMatrix != 0 && sizeControl.SizeMatrix >= 8) { Size = sizeControl.SizeMatrix; } else { Size = 8; } InitializeComponent(); }
void Start() { sc = GetComponent <SizeControl>(); cc = GetComponent <ColorControl>(); // initiate color int NumberOfBasicColors = BasicColors.Length; cc.SetColor(BasicColors[Random.Range(0, NumberOfBasicColors)]); SetSizeGrowth(); // initiate rotation and movement Rotate(Random.Range(0, 360)); // [deg] turnrate = (Random.Range(0, 2) * 2 - 1) * Random.Range(minturnrate, maxturnrate) * Time.deltaTime; moverate = moverate * Time.deltaTime; }
[Test] // bug #80621, #81125 public void DontCallSizeFromClientSize () { SizeControl sc = new SizeControl (); Assert.AreEqual (0, sc.size_from_client_size_count, "A1"); sc.ClientSize = new Size (300, 300); Assert.AreEqual (0, sc.size_from_client_size_count, "A2"); SizeForm sf = new SizeForm (); sf.ShowInTaskbar = false; sf.Show (); Assert.AreEqual (0, sc.size_from_client_size_count, "A3"); sc.ClientSize = new Size (300, 300); Assert.AreEqual (0, sc.size_from_client_size_count, "A4"); sf.Dispose (); }