BLUETOOTH_SELECT_DEVICE_PARAMS.cs :  » Business-Application » 32feet.NET » InTheHand » ComponentModel » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Business Application » 32feet.NET 
32feet.NET » InTheHand » ComponentModel » BLUETOOTH_SELECT_DEVICE_PARAMS.cs
// 32feet.NET - Personal Area Networking for .NET
//
// InTheHand.Net.Bluetooth.BLUETOOTH_SELECT_DEVICE_PARAMS
// 
// Copyright (c) 2003-2006 In The Hand Ltd, All rights reserved.
// This source code is licensed under the In The Hand Community License - see License.txt

using System;
using System.Runtime.InteropServices;

namespace InTheHand.Net.Bluetooth{
    internal struct BLUETOOTH_SELECT_DEVICE_PARAMS : InTheHand.Windows.Forms.ISelectBluetoothDevice
    {
        int dwSize;
        int cNumOfClasses;
        IntPtr /*BLUETOOTH_COD_PAIRS*/ prgClassOfDevices;
#if V2
        [MarshalAs(UnmanagedType.LPWStr)]
#endif
        string pszInfo;
        public IntPtr hwndParent;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fForceAuthentication;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fShowAuthenticated;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fShowRemembered;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fShowUnknown;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fAddNewDeviceWizard;
#if V2
        [MarshalAs(UnmanagedType.Bool)]
#endif
        bool fSkipServicesPage;
        IntPtr pfnDeviceCallback;
        IntPtr pvParam;
        public int cNumDevices;
        public IntPtr pDevices;

        public void Reset()
        {
            dwSize = Marshal.SizeOf(this);
            cNumOfClasses = 0;
            prgClassOfDevices = IntPtr.Zero;
            pszInfo = null;
            hwndParent = IntPtr.Zero;
            fForceAuthentication = false;
            fShowAuthenticated = true;
            fShowRemembered = true;
            fShowUnknown = true;
            fAddNewDeviceWizard = false;
            fSkipServicesPage = false;
            pfnDeviceCallback = IntPtr.Zero;
            pvParam = IntPtr.Zero;
            cNumDevices = 0;
            pDevices = IntPtr.Zero;
        }

        public BLUETOOTH_DEVICE_INFO[] Devices
        {
            get
            {
                if (cNumDevices > 0)
                {
                    BLUETOOTH_DEVICE_INFO[] devs = new BLUETOOTH_DEVICE_INFO[cNumDevices];

                    for (int idevice = 0; idevice < cNumDevices; idevice++)
                    {
                        devs[idevice] = (BLUETOOTH_DEVICE_INFO)Marshal.PtrToStructure(new IntPtr(pDevices.ToInt64() + (idevice * Marshal.SizeOf(typeof(BLUETOOTH_DEVICE_INFO)))), typeof(BLUETOOTH_DEVICE_INFO));
                    }

                    return devs;
                }
                return new BLUETOOTH_DEVICE_INFO[0];

            }
        }

        public BLUETOOTH_DEVICE_INFO Device
        {
            get
            {
                if (cNumDevices > 0)
                {
                    BLUETOOTH_DEVICE_INFO device = (BLUETOOTH_DEVICE_INFO)Marshal.PtrToStructure(pDevices, typeof(BLUETOOTH_DEVICE_INFO));
                    return device;
                }
                return new BLUETOOTH_DEVICE_INFO();
            }
        }

        #region ISelectBluetoothDevice Members

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.ShowAuthenticated
        {
            get { return fShowAuthenticated; }
            set { fShowAuthenticated = value; }
        }

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.ShowRemembered
        {
            get { return fShowRemembered; }
            set { fShowRemembered = value; }
        }

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.ShowUnknown
        {
            get { return fShowUnknown; }
            set { fShowUnknown = value; }
        }

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.ForceAuthentication
        {
            get { return fForceAuthentication; }
            set { fForceAuthentication = value; }
        }

#if WinXP
        string InTheHand.Windows.Forms.ISelectBluetoothDevice.Info
        {
            get { return pszInfo; }
            set { pszInfo = value; }
        }

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.AddNewDeviceWizard
        {
            get { return fAddNewDeviceWizard; }
            set { fAddNewDeviceWizard = value; }
        }

        bool InTheHand.Windows.Forms.ISelectBluetoothDevice.SkipServicesPage
        {
            get { return fSkipServicesPage; }
            set { fSkipServicesPage = value; }
        }
#endif
        #endregion
    }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.