/// <summary> /// Construct the option with what it needs /// </summary> /// <param name="name">The name of the option</param> /// <param name="title">The title of the option</param> /// <param name="description">A long description for the option</param> /// <param name="size">The size of the option</param> /// <param name="number">The number (i.e. index) of the option</param> /// <param name="type">The type of the option (string, bool, etc) /// </param> /// <param name="unit">The unit for the option (mm, etc, etc)</param> /// <param name="capabilities">A bit flag of the capabilities of /// the option</param> /// <param name="handle">The handle to the device</param> /// <param name="caller">The RPC caller</param> /// <param name="userName">The username for authenticated calls</param> /// <param name="password">The password for authenticated calls</param> /// <param name="reloadFunction">A function to call if setting this /// option requires that all the options are reloaded</param> internal NetworkDeviceOption(string name, string title, string description, int size, int number, SaneType type, SaneUnit unit, SaneCapabilities capabilities, int handle, NetworkProcedureCaller caller, string userName, string password, Action reloadFunction) : base(name, title, description, size, number, type, unit, capabilities, reloadFunction) { _handle = handle; _userName = userName; _password = password; _caller = caller; }
/// <summary> /// Construct the option with what it needs to work /// </summary> /// <param name="name">The name of the option</param> /// <param name="title">The title of the option</param> /// <param name="description">A long description for the option</param> /// <param name="size">The size of the option</param> /// <param name="number">The number (i.e. index) of the option</param> /// <param name="type">The type of the option (string, bool, etc) /// </param> /// <param name="unit">The unit for the option (mm, etc, etc)</param> /// <param name="capabilities">A bit flag of the capabilities of /// the option</param> /// <param name="reloadFunction">A function to call if setting this /// option requires that all the options are reloaded</param> protected DeviceOption(string name, string title, string description, int size, int number, SaneType type, SaneUnit unit, SaneCapabilities capabilities, Action reloadFunction) { Number = number; Name = name; Title = title; Description = description; Size = size/4; Type = type; Unit = unit; Capabilities = capabilities; ReloadFunction = reloadFunction; _dy = new InnerValueDynamicObject(this); }
/// <summary> /// Construct the option with what it needs /// </summary> /// <param name="name">The name of the option</param> /// <param name="title">The title of the option</param> /// <param name="description">A long description for the option</param> /// <param name="size">The size of the option</param> /// <param name="number">The number (i.e. index) of the option</param> /// <param name="type">The type of the option (string, bool, etc) /// </param> /// <param name="unit">The unit for the option (mm, etc, etc)</param> /// <param name="capabilities">A bit flag of the capabilities of /// the option</param> /// <param name="handle">The handle to the device</param> /// <param name="reloadFunction">A function to call if setting this /// option requires that all the options are reloaded</param> internal LocalDeviceOption(string name, string title, string description, int size, int number, SaneType type, SaneUnit unit, SaneCapabilities capabilities, IntPtr handle, Action reloadFunction) : base(name, title, description, size, number, type, unit, capabilities, reloadFunction) { _handle = handle; }
/// <summary> /// Construct the option with what it needs /// </summary> /// <param name="name">The name of the option</param> /// <param name="title">The title of the option</param> /// <param name="description">A long description for the option</param> /// <param name="size">The size of the option</param> /// <param name="number">The number (i.e. index) of the option</param> /// <param name="type">The type of the option (string, bool, etc) /// </param> /// <param name="unit">The unit for the option (mm, etc, etc)</param> /// <param name="capabilities">A bit flag of the capabilities of /// the option</param> /// <param name="handle">The handle to the device</param> /// <param name="reloadFunction">A function to call if setting this /// option requires that all the options are reloaded</param> internal LocalDeviceOption(string name, string title, string description, int size, int number, SaneType type, SaneUnit unit, SaneCapabilities capabilities, IntPtr handle, Action reloadFunction) : base(name, title, description, size, number, type, unit, capabilities, reloadFunction) { _handle = handle; }
/// <summary> /// Construct the option with what it needs to work /// </summary> /// <param name="name">The name of the option</param> /// <param name="title">The title of the option</param> /// <param name="description">A long description for the option</param> /// <param name="size">The size of the option</param> /// <param name="number">The number (i.e. index) of the option</param> /// <param name="type">The type of the option (string, bool, etc) /// </param> /// <param name="unit">The unit for the option (mm, etc, etc)</param> /// <param name="capabilities">A bit flag of the capabilities of /// the option</param> /// <param name="reloadFunction">A function to call if setting this /// option requires that all the options are reloaded</param> protected DeviceOption(string name, string title, string description, int size, int number, SaneType type, SaneUnit unit, SaneCapabilities capabilities, Action reloadFunction) { Number = number; Name = name; Title = title; Description = description; Size = size / 4; Type = type; Unit = unit; Capabilities = capabilities; ReloadFunction = reloadFunction; _dy = new InnerValueDynamicObject(this); }