public BoardPage() { InitializeComponent(); string savedir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "//pickandplacelogs//"; System.IO.Directory.CreateDirectory(savedir); LogFile = savedir + DateTime.Now.ToString("yyyyMMdd-HH-mm") + ".xml"; dtLog.TableName = "boardcomponents"; dtLog.Columns.Add("ComponentValue", typeof(string)); dtLog.Columns.Add("Package", typeof(string)); dtLog.Columns.Add("TapeFeeder", typeof(bool)); dtLog.Columns.Add("FeederID", typeof(string)); dtLog.Columns.Add("ComponentCode", typeof(int)); dtLog.Columns.Add("Placed", typeof(int)); dtLog.WriteXml(LogFile); SetupGridView(_dgComponents); SetupFeeders(_dgFeeders); App MyApplication = ((App)Application.Current); _kflop = MyApplication.GetKFlop(); usbController = MyApplication.GetUSBDevice(); builder.setupPCBBuilder(_kflop, usbController, dsData, LogFile); }
public ManualControl() { InitializeComponent(); App MyApplication = ((App)Application.Current); _kflop = MyApplication.GetKFlop(); usbController = MyApplication.GetUSBDevice(); }
public BoardPage() { InitializeComponent(); SetupGridView(_dgComponents); App MyApplication = ((App)Application.Current); _kflop = MyApplication.GetKFlop(); usbController = MyApplication.GetUSBDevice(); builder.setupPCBBuilder(_kflop, usbController, dsData); }
public BoardDesigner() { InitializeComponent(); App MyApplication = ((App)Application.Current); _kflop = MyApplication.GetKFlop(); usbController = MyApplication.GetUSBDevice(); POPComponentsList(); POPDataTable(dscomponents); SetupGridView(_dgBoard); _dgBoard.ItemsSource = dscomponents.Tables["Components"].DefaultView; }
public Form1() { InitializeComponent(); // Create the USB reference device object (passing VID and PID) usbController = new usbDevice(0x04D8, 0x0042); // Add a listener for usb events usbController.usbEvent += new usbDevice.usbEventsHandler(usbEvent_receiver); // Perform an initial search for the target device usbController.findTargetDevice(); Mach = (Mach4.IMach4)Marshal.GetActiveObject("Mach4.Document"); Script = (Mach4.IMyScriptObject)Mach.GetScriptDispatch(); InitializeBackgroundWorker(); this.FormClosing += new FormClosingEventHandler(Form_FormClosing); dtFeeders = cf.POPFeedersTable(); LoadSettings(); RunBoardInit(); Thread thrdRemote = new Thread(new ThreadStart(initRemote)); thrdRemote.Start(); thrdRemote.IsBackground = true; /* comboBoxManualReelFeeder.DisplayMember = "feederNumber"; comboBoxManualReelFeeder.ValueMember = "feederNumber"; comboBoxManualReelFeeder.DataSource = dtFeeders; comboBoxManualReelFeeder.SelectedIndex = 0; */ csvload.SetupGridView(dataGridView1); // setup manual feeder single picker list }