Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dataSourceManager">Datasourcemanager for the xfers</param>
 /// <param name="dataSource">Datasource for the xfers</param>
 internal Xfer(
     DataSourceManager dataSourceManager,
     DataSource dataSource)
 {
     this.dataSourceManager = dataSourceManager;
     this.dataSource = dataSource;
     this.pendingXfersInteropStruct = new PendingXfersInterop ();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor taking arguments necessary to initialize the capability
        /// </summary>
        /// <param name="dataSourceManager">data source manager controlling the current session</param>
        /// <param name="dataSource">data source from which to aquire</param>
        /// <param name="cap">The capability which shall be represented by the object</param>
        public Capability(DataSourceManager dataSourceManager, DataSource dataSource, Capabilities cap)
        {
            this.CapabilityType = (short) cap;
            this.ItemType = -1;

            this.dataSourceManager = dataSourceManager;
            this.dataSource = dataSource;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor taking the datasourcemanager and the datasource which shall process a windows message
        /// </summary>
        /// <param name="dataSourceManager"></param>
        /// <param name="dataSource"></param>
        internal Event(DataSourceManager dataSourceManager, DataSource dataSource)
        {
            interopStruct = new EventInterop ();
            interopStruct.WindowsMessagePointer = Marshal.AllocHGlobal (Marshal.SizeOf (windowsMessage));

            windowsMessage = new WindowsMsg ();

            this.dataSourceManager = dataSourceManager;
            this.dataSource = dataSource;
        }
Ejemplo n.º 4
0
        private void Initialize()
        {
            this.dataSourceManager = new DataSourceManager ();

            IntPtr parentHandle = this.parentForm.Handle;

            if (this.dataSourceManager.Open (ref parentHandle) == ReturnCodes.Success)
            {
                this.dataSource = new DataSource (this.dataSourceManager);
                this.dataSource.GetDefault ();

                this.eventMessage = new Event (
                    this.dataSourceManager,
                    this.dataSource);
            }
            else
            {
                this.dataSourceManager.Close ();
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor taking arguments necessary to initialize the capability
        /// </summary>
        /// <param name="dataSourceManager">data source manager controlling the current session</param>
        /// <param name="dataSource">data source from which to aquire</param>
        /// <param name="cap">The capability which shall be represented by the object</param>
        /// <param name="sval">Value of the capability</param>
        public Capability(DataSourceManager dataSourceManager, DataSource dataSource, Capabilities cap, short sval)
        {
            CapabilityType = (short) cap;
            ItemType = (short) ContainerTypes.One;
            Handle = Kernel32.GlobalAlloc (0x42, 6);
            IntPtr pv = Kernel32.GlobalLock (Handle);
            Marshal.WriteInt16 (pv, 0, (short) ItemTypes.Int16);
            Marshal.WriteInt32 (pv, 2, (int) sval);
            Kernel32.GlobalUnlock (Handle);

            this.dataSourceManager = dataSourceManager;
            this.dataSource = dataSource;
        }