예제 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            HomeKit temp = new HomeKit(false);

            UInt32[] A = new UInt32[] { 0xffffffff, 0xffffffff };
            UInt32[] B = new UInt32[] { 0x100 };
            UInt32[] q, r;
            temp.UInt32ArrayDiv(A, B, out q, out r);

            textBox1.AppendText("q:\r\n");
            foreach (UInt32 i in q)
            {
                textBox1.AppendText(i.ToString("X8") + "\r\n");
            }
            textBox1.AppendText("r:\r\n");
            foreach (UInt32 i in r)
            {
                textBox1.AppendText(i.ToString("X8") + "\r\n");
            }
        }
예제 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Dictionary <string, string> metadata = new Dictionary <string, string>();

            metadata.Add("c#", "1");
            metadata.Add("ff", "0");
            metadata.Add("id", idTextBox.Text);
            metadata.Add("md", "Microsoft1,1");
            metadata.Add("s#", "1");
            metadata.Add("sf", "1");
            metadata.Add("ci", "5");

            homeKit = new HomeKit();

            int result = homeKit.Register("LHFridge2", "_http._tcp", "local", 1067, metadata);

            Debug.WriteLine("Register returned {0}.", result);

            txtRetCode.Text = result.ToString();
        }
		public void DidRemoveTrigger (HomeKit.HMHome home, HomeKit.HMTrigger trigger)
		{
			DeleteRowAt(ObjectCollection.Remove(trigger));
		}
		public void DidAddTrigger (HomeKit.HMHome home, HomeKit.HMTrigger trigger)
		{
			Add(trigger);
		}
		public void DidRemoveAccessory (HomeKit.HMHome home, HomeKit.HMAccessory accessory)
		{
			DeleteRowAt (ObjectCollection.Remove (accessory));
		}
		public void DidAddAccessory (HomeKit.HMHome home, HomeKit.HMAccessory accessory)
		{
			Add (accessory);
			accessory.Delegate = this;
		}