Пример #1
0
        /// <summary>
        /// Load global mask settings.
        /// </summary>
        public void Load()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            TopMask.Value    = XmlStorage.Get<float>(_topMaskProp, 0f);
            BottomMask.Value = XmlStorage.Get<float>(_bottomMaskProp, 0f);
            LeftMask.Value   = XmlStorage.Get<float>(_leftMaskProp, 0f);
            RightMask.Value  = XmlStorage.Get<float>(_rightMaskProp, 0f);

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #2
0
        /// <summary>
        /// Initialize and load global mask settings.
        /// </summary>
        public void InitialLoad()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            TopMask    = new ReactiveProperty<float>(XmlStorage.Get<float>(_topMaskProp, 0f));
            BottomMask = new ReactiveProperty<float>(XmlStorage.Get<float>(_bottomMaskProp, 0f));
            LeftMask   = new ReactiveProperty<float>(XmlStorage.Get<float>(_leftMaskProp, 0f));
            RightMask  = new ReactiveProperty<float>(XmlStorage.Get<float>(_rightMaskProp, 0f));

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #3
0
        /// <summary>
        /// Save gloabl mask settings.
        /// </summary>
        public void Save()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);
            XmlStorage.FileName = CommonSettingEntity.XMLAggregationKey;

            XmlStorage.Set<float>(_topMaskProp, TopMask.Value);
            XmlStorage.Set<float>(_bottomMaskProp, BottomMask.Value);
            XmlStorage.Set<float>(_leftMaskProp, LeftMask.Value);
            XmlStorage.Set<float>(_rightMaskProp, RightMask.Value);
            XmlStorage.Save();

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
        /// <summary>
        /// Load common settings.
        /// </summary>
        public void Load()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(XMLAggregationKey);

            NumOfColProjectors.Value = XmlStorage.Get<int>(_numOfColProjectorsProp, 1);
            NumOfRowProjectors.Value = XmlStorage.Get<int>(_numOfRowProjectorsProp, 1);
            Blackness.Value          = XmlStorage.Get<float>(_blacknessProp, 1.0f);
            Curve.Value              = XmlStorage.Get<float>(_curveProp, GAMMA_CURVE);
            Brightness.Value         = XmlStorage.Get<float>(_brightnessProp, 1.0f);
            Symmetry.Value           = XmlStorage.Get<bool>(_symmetry, true);

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
        /// <summary>
        /// Initialize and Load common settings.
        /// </summary>
        private void InitialLoad()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(XMLAggregationKey);

            NumOfColProjectors = new ReactiveProperty<int>(XmlStorage.Get<int>(_numOfColProjectorsProp, 1));
            NumOfRowProjectors = new ReactiveProperty<int>(XmlStorage.Get<int>(_numOfRowProjectorsProp, 1));
            Blackness          = new ReactiveProperty<float>(XmlStorage.Get<float>(_blacknessProp, 1.0f));
            Curve              = new ReactiveProperty<float>(XmlStorage.Get<float>(_curveProp, GAMMA_CURVE));
            Brightness         = new ReactiveProperty<float>(XmlStorage.Get<float>(_brightnessProp, 1.0f));
            Symmetry           = new ReactiveProperty<bool>(XmlStorage.Get<bool>(_symmetry, true));

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #6
0
        public void Execute()
        {
            this.qua.eulerAngles = new Vector3(10f, 20f, 30f);

            this.SetData2XmlStorage(1);

            XmlStorage.ChangeAggregation("Test1");
            this.SetData2XmlStorage(11);

            XmlStorage.ChangeAggregation("Test2");
            XmlStorage.FileName = "Test2";
            this.SetData2XmlStorage(111);

            XmlStorage.Save();
            Debug.Log("Finish");
        }
        /// <summary>
        /// Save common settings.
        /// </summary>
        public void Save()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;
            XmlStorage.ChangeAggregation(XMLAggregationKey);
            XmlStorage.FileName = XMLAggregationKey;

            XmlStorage.Set<int>(_numOfColProjectorsProp, NumOfColProjectors.Value);
            XmlStorage.Set<int>(_numOfRowProjectorsProp, NumOfRowProjectors.Value);
            XmlStorage.Set<float>(_blacknessProp, Blackness.Value);
            XmlStorage.Set<float>(_curveProp, Curve.Value);
            XmlStorage.Set<float>(_brightnessProp, Brightness.Value);
            XmlStorage.Set<bool>(_symmetry, Symmetry.Value);
            XmlStorage.Save();

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #8
0
        /// <summary>
        /// Load rect mask settings.
        /// </summary>
        public void Load()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;

            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            for (int i = 0; i < MAX_RECTMASKS; i++)
            {
                RectMaskX[i].Value      = XmlStorage.Get <float>(_rectMaskXPropPrefix + i.ToString(), 0f);
                RectMaskY[i].Value      = XmlStorage.Get <float>(_rectMaskYPropPrefix + i.ToString(), 0f);
                RectMaskWidth[i].Value  = XmlStorage.Get <float>(_rectMaskWidthPropPrefix + i.ToString(), 0f);
                RectMaskHeight[i].Value = XmlStorage.Get <float>(_rectMaskHeightPropPrefix + i.ToString(), 0f);
            }

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #9
0
        /// <summary>
        /// Initialize and Load rect mask settings.
        /// </summary>
        private void InitialLoad()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;

            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            for (int i = 0; i < MAX_RECTMASKS; i++)
            {
                RectMaskX[i]      = new ReactiveProperty <float>(XmlStorage.Get <float>(_rectMaskXPropPrefix + i.ToString(), 0f));
                RectMaskY[i]      = new ReactiveProperty <float>(XmlStorage.Get <float>(_rectMaskYPropPrefix + i.ToString(), 0f));
                RectMaskWidth[i]  = new ReactiveProperty <float>(XmlStorage.Get <float>(_rectMaskWidthPropPrefix + i.ToString(), 0f));
                RectMaskHeight[i] = new ReactiveProperty <float>(XmlStorage.Get <float>(_rectMaskHeightPropPrefix + i.ToString(), 0f));
            }

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
        /// <summary>
        /// Initialize and load screen settings.
        /// </summary>
        private void InitialLoad()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;

            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            TopBlend        = new ReactiveProperty <float>(XmlStorage.Get <float>(_topBlendProp, 0f));
            BottomBlend     = new ReactiveProperty <float>(XmlStorage.Get <float>(_bottomBlendProp, 0f));
            LeftBlend       = new ReactiveProperty <float>(XmlStorage.Get <float>(_leftBlendProp, 0f));
            RightBlend      = new ReactiveProperty <float>(XmlStorage.Get <float>(_rightBlendProp, 0f));
            topMask         = new ReactiveProperty <float>(XmlStorage.Get <float>(_topMaskProp, 0f));
            bottomMask      = new ReactiveProperty <float>(XmlStorage.Get <float>(_bottomMaskProp, 0f));
            leftMask        = new ReactiveProperty <float>(XmlStorage.Get <float>(_leftMaskProp, 0f));
            rightMask       = new ReactiveProperty <float>(XmlStorage.Get <float>(_rightMaskProp, 0f));
            topLeftMask     = new ReactiveProperty <Vector2>(XmlStorage.Get <Vector2>(_topLeftMaskProp, Vector2.zero));
            topRightMask    = new ReactiveProperty <Vector2>(XmlStorage.Get <Vector2>(_topRightMaskProp, Vector2.zero));
            bottomLeftMask  = new ReactiveProperty <Vector2>(XmlStorage.Get <Vector2>(_bottomLeftMaskProp, Vector2.zero));
            bottomRightMask = new ReactiveProperty <Vector2>(XmlStorage.Get <Vector2>(_bottomRightMaskProp, Vector2.zero));
            uvShift         = new ReactiveProperty <Vector2>(XmlStorage.Get <Vector2>(_uvShiftProp, Vector2.zero));

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
        /// <summary>
        /// Load settings.
        /// </summary>
        public void Load()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;

            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);

            TopBlend.Value        = XmlStorage.Get <float>(_topBlendProp, 0f);
            BottomBlend.Value     = XmlStorage.Get <float>(_bottomBlendProp, 0f);
            LeftBlend.Value       = XmlStorage.Get <float>(_leftBlendProp, 0f);
            RightBlend.Value      = XmlStorage.Get <float>(_rightBlendProp, 0f);
            topMask.Value         = XmlStorage.Get <float>(_topMaskProp, 0f);
            bottomMask.Value      = XmlStorage.Get <float>(_bottomMaskProp, 0f);
            leftMask.Value        = XmlStorage.Get <float>(_leftMaskProp, 0f);
            rightMask.Value       = XmlStorage.Get <float>(_rightMaskProp, 0f);
            topLeftMask.Value     = XmlStorage.Get <Vector2>(_topLeftMaskProp, Vector2.zero);
            topRightMask.Value    = XmlStorage.Get <Vector2>(_topRightMaskProp, Vector2.zero);
            bottomLeftMask.Value  = XmlStorage.Get <Vector2>(_bottomLeftMaskProp, Vector2.zero);
            bottomRightMask.Value = XmlStorage.Get <Vector2>(_bottomRightMaskProp, Vector2.zero);
            uvShift.Value         = XmlStorage.Get <Vector2>(_uvShiftProp, Vector2.zero);

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
        /// <summary>
        /// Save settings.
        /// </summary>
        public void Save()
        {
            var currentAggregationKey = XmlStorage.CurrentAggregationName;

            XmlStorage.ChangeAggregation(CommonSettingEntity.XMLAggregationKey);
            XmlStorage.FileName = CommonSettingEntity.XMLAggregationKey;

            XmlStorage.Set <float>(_topBlendProp, TopBlend.Value);
            XmlStorage.Set <float>(_bottomBlendProp, BottomBlend.Value);
            XmlStorage.Set <float>(_leftBlendProp, LeftBlend.Value);
            XmlStorage.Set <float>(_rightBlendProp, RightBlend.Value);
            XmlStorage.Set <float>(_topMaskProp, topMask.Value);
            XmlStorage.Set <float>(_bottomMaskProp, bottomMask.Value);
            XmlStorage.Set <float>(_leftMaskProp, leftMask.Value);
            XmlStorage.Set <float>(_rightMaskProp, rightMask.Value);
            XmlStorage.Set <Vector2>(_topLeftMaskProp, topLeftMask.Value);
            XmlStorage.Set <Vector2>(_topRightMaskProp, topRightMask.Value);
            XmlStorage.Set <Vector2>(_bottomLeftMaskProp, bottomLeftMask.Value);
            XmlStorage.Set <Vector2>(_bottomRightMaskProp, bottomRightMask.Value);
            XmlStorage.Set <Vector2>(_uvShiftProp, uvShift.Value);
            XmlStorage.Save();

            XmlStorage.ChangeAggregation(currentAggregationKey);
        }
Пример #13
0
        public void Execute()
        {
            /*
             * 1
             * 1.111
             * XmlStorage.Examples.ExampleController+Test
             * "TestString"
             * 0.1f
             * 10.1f
             *
             * 0
             * ""
             *
             * 0
             * "del_tes2"
             *
             * "*****@*****.**"
             *
             * (0.1, 0.2)
             * (1.0, 2.0, 3.0)
             * (10.0, 20.0, 30.0)
             */
            Debug.Log("Default Aggregatpion");
            this.GetDataFromXmlStorage();

            /*
             * 11
             * 1.111
             * XmlStorage.Examples.ExampleController+Test
             * "TestString"
             * 0.1f
             * 10.1f
             *
             * 0
             * ""
             *
             * 0
             * "del_tes2"
             *
             * "*****@*****.**"
             *
             * (0.1, 0.2)
             * (1.0, 2.0, 3.0)
             * (10.0, 20.0, 30.0)
             */
            Debug.Log("Test1 Aggregation");
            XmlStorage.ChangeAggregation("Test1");
            this.GetDataFromXmlStorage();

            /*
             * 111
             * 1.111
             * XmlStorage.Examples.ExampleController+Test
             * "TestString"
             * 0.1f
             * 10.1f
             *
             * 0
             * ""
             *
             * 0
             * "del_tes2"
             *
             * "*****@*****.**"
             *
             * (0.1, 0.2)
             * (1.0, 2.0, 3.0)
             * (10.0, 20.0, 30.0)
             */
            Debug.Log("Test2 Aggregation");
            XmlStorage.ChangeAggregation("Test2");
            this.GetDataFromXmlStorage();
        }