/// <summary>
 /// Create a new ZomB FingerServer Factory
 /// </summary>
 /// <param name="teamNumber">Your team number</param>
 /// <param name="from">Path to saved data folder</param>
 /// <param name="to">Save data to this folder</param>
 /// <remarks>
 /// The path should be a reference to a folder that contains all the data files.
 /// Once all the files are sent, the tag .ZomBarchiveXXX is appended to their file name, where
 /// XXX is the time ticks.
 /// The To path works similarly, but .ZomBYYY is appended before the file extension, where 
 /// YYY is the transfer number stored in the file .ZomB in the To path
 /// </remarks>
 internal BTZomBFingerFactory(int teamNumber, string from, string to)
 {
     //AutoExtractor.Extract(AutoExtractor.Files.InTheHandManaged | AutoExtractor.Files.InTheHandNative);
     saveTo = to;
     pullFrom = from;
     //team GUID, last part is random, don't want to calculate
     if (teamgid != null)
         teamgid = new Guid(teamNumber * teamNumber, (short)teamNumber, (short)teamNumber, new byte[] { 0xa1, 0xfc, 0xf7, 0x95, 0x4a, 0x58, 0x6f, 0x25 });
     radio = InTheHand.Net.Bluetooth.BluetoothRadio.PrimaryRadio;
     listen = new BluetoothListener(teamgid);
     bserve = new BTZomBServer(listen, pullFrom, teamNumber, this);
     radio.Mode = RadioMode.Connectable;
     client = new BluetoothClient();
     bfinger = new BTFinger(client, saveTo, teamNumber, this);
     TeamNumber = teamNumber;
 }
Exemplo n.º 2
0
 private void init()
 {
     if (team == 0 || ZDesigner.IsDesignMode)
         return;
     bf = (BlueFinger.GetFactory(team, BTZomBFingerFactory.DefaultLoadLocation, BTZomBFingerFactory.DefaultSaveLocation)).GetServer();
     bf.DataSending += delegate
     {
         if (status != null)
             status.Text = "Sending...";
     };
     bf.DataSent += delegate
     {
         if (status != null)
             status.Text = "Ready";
     };
     if (status != null)
         status.Text = "Ready";
 }