public void AddIp(Node ip, customControl referencingGateOrLED) { InputNodesList.Add(ip); { ip.AddToGatesOrLEDsList(referencingGateOrLED); } }
public void DrawOnForm(Point start, customControl SenderCntrl) { this.startPoint.X = start.X + SenderCntrl.Location.X; this.startPoint.Y = start.Y + SenderCntrl.Location.Y; String txt = startPoint.X.ToString() + " " + startPoint.Y.ToString(); Form1.getInstance().textBoxLocation.Text = txt; }
public void AddToGatesOrLEDsList(customControl referencingGateOrLED) { //Check that the gate isn't already existing in the list if (referencingGateOrLED.GetType() == typeof(Gate_Front) || referencingGateOrLED.GetType() == typeof(Output_Front)) { GatesThatReferenceMeAsAnInput.Add(referencingGateOrLED); } }
public void laE7naM4HnhazzarDaHytsallem(customControl senderCtrl) { p1List.Add(new Point(startPointHyma2.X, startPointHyma2.Y)); p2List.Add(new Point(end.X, end.Y)); Graphics dc = panel2.CreateGraphics(); using (var p = new Pen(Color.Black, 4)) { for (int x = 0; x < p1List.Count; x++) { dc.DrawLine(p, p1List[x], p2List[x]); } p.Dispose(); } dc.Dispose(); Invalidate(); }
public void SortButton_Click() { List <customInfo> objListCustom_Info = new List <customInfo>(); customControl objCustom = new customControl(); String result = ""; try { if (File.Exists(Server.MapPath(inputFile))) { StreamReader sr = File.OpenText(Server.MapPath(inputFile)); objListCustom_Info = objCustom.GetData(sr); foreach (customInfo custom in objListCustom_Info) { //Response.Write(custom.fullName + "</br>"); result += custom.fullName + "\n"; } if (!File.Exists(Server.MapPath(outputFile))) { File.Create(Server.MapPath(outputFile)).Close(); } File.WriteAllText(Server.MapPath(outputFile).ToString(), result); sr.Close(); Response.Write("Success!"); } else { Response.Write("Failed!"); } } catch (Exception ex) { Response.Write("Failed!"); } }