示例#1
0
文件: Parameter.cs 项目: slawer/asy
        protected Guid identifier;                      // идентификатор параметра

        // ------------------------------------

        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public Parameter()
        {
            transformation = new Transformation();
            slim           = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            p_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
            c_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            range = new ParameterRange();

            Transformation.TCondition t1 = new Transformation.TCondition();
            Transformation.TCondition t2 = new Transformation.TCondition();

            t1.Result = 0;
            t1.Signal = 0;

            t2.Result = 65535;
            t2.Signal = 65535;

            transformation.Insert(t1);
            transformation.Insert(t2);

            name        = string.Empty;
            description = string.Empty;

            identifier = Guid.NewGuid();
        }
示例#2
0
文件: Parameter.cs 项目: slawer/asy
        private int devManindex = -1; // номер параметра в списке от devMan

        #endregion Fields

        #region Constructors

        // ------------------------------------
        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public Parameter()
        {
            transformation = new Transformation();
            slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            p_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
            c_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            range = new ParameterRange();

            Transformation.TCondition t1 = new Transformation.TCondition();
            Transformation.TCondition t2 = new Transformation.TCondition();

            t1.Result = 0;
            t1.Signal = 0;

            t2.Result = 65535;
            t2.Signal = 65535;

            transformation.Insert(t1);
            transformation.Insert(t2);

            name = string.Empty;
            description = string.Empty;

            identifier = Guid.NewGuid();
        }