示例#1
0
文件: VJournal.cs 项目: nhaberl/PDI
        /// <summary>
        /// The method can be called to clear all current property values from the journal.  The version is left
        /// unchanged.
        /// </summary>
        public override void ClearProperties()
        {
            classification = null;
            categories     = null;
            url            = null;
            uid            = null;
            lastMod        = null;
            dateCreated    = null;
            startDate      = null;
            timeStamp      = null;
            summary        = null;
            desc           = null;
            sequence       = null;
            comment        = null;
            organizer      = null;
            recurId        = null;
            status         = null;

            contacts    = null;
            attendees   = null;
            relatedTo   = null;
            attachments = null;
            reqStats    = null;
            customProps = null;

            base.ClearProperties();
        }
示例#2
0
文件: VJournal.cs 项目: nhaberl/PDI
        /// <summary>
        /// This is overridden to allow copying of the additional properties
        /// </summary>
        /// <param name="p">The PDI object from which the settings are to be copied</param>
        protected override void Clone(PDIObject p)
        {
            VJournal o = (VJournal)p;

            this.ClearProperties();

            classification = (ClassificationProperty)o.Classification.Clone();
            categories     = (CategoriesProperty)o.Categories.Clone();
            url            = (UrlProperty)o.Url.Clone();
            uid            = (UniqueIdProperty)o.UniqueId.Clone();
            lastMod        = (LastModifiedProperty)o.LastModified.Clone();
            dateCreated    = (DateCreatedProperty)o.DateCreated.Clone();
            startDate      = (StartDateProperty)o.StartDateTime.Clone();
            timeStamp      = (TimeStampProperty)o.TimeStamp.Clone();
            summary        = (SummaryProperty)o.Summary.Clone();
            desc           = (DescriptionProperty)o.Description.Clone();
            sequence       = (SequenceProperty)o.Sequence.Clone();
            comment        = (CommentProperty)o.Comment.Clone();
            organizer      = (OrganizerProperty)o.Organizer.Clone();
            recurId        = (RecurrenceIdProperty)o.RecurrenceId.Clone();
            status         = (StatusProperty)o.Status.Clone();

            this.Contacts.CloneRange(o.Contacts);
            this.Attendees.CloneRange(o.Attendees);
            this.RelatedTo.CloneRange(o.RelatedTo);
            this.Attachments.CloneRange(o.Attachments);
            this.RequestStatuses.CloneRange(o.RequestStatuses);
            this.CustomProperties.CloneRange(o.CustomProperties);

            base.Clone(p);
        }
示例#3
0
        public int Complete(int[] test)
        {
            var missingPosition = Array.IndexOf(test, -1);

            if (SequenceProperty.IsValidSequenceConstraints(test) == true)
            {
                var result = 0;
                if (missingPosition > 2)
                {
                    result = test[missingPosition - 1] + test[missingPosition - 2] + test[missingPosition - 3];
                    test[missingPosition] = result;
                }
                else
                {
                    for (int i = 0; i < test.Length; i++)
                    {
                        if (i != missingPosition && i <= 2)
                        {
                            result += test[i];
                        }
                    }
                    result = test[3] - result;
                    test[missingPosition] = result;
                }
            }
            if (SequenceProperty.IsValidSequence(test) == true)
            {
                return(test[missingPosition]);
            }
            else
            {
                return(-1);
            }
        }
示例#4
0
        /// <summary>
        /// This is overridden to allow copying of the additional properties
        /// </summary>
        /// <param name="p">The PDI object from which the settings are to be copied</param>
        protected override void Clone(PDIObject p)
        {
            VEvent o = (VEvent)p;

            this.ClearProperties();

            classification = (ClassificationProperty)o.Classification.Clone();
            categories     = (CategoriesProperty)o.Categories.Clone();
            resources      = (ResourcesProperty)o.Resources.Clone();
            url            = (UrlProperty)o.Url.Clone();
            uid            = (UniqueIdProperty)o.UniqueId.Clone();
            geo            = (GeographicPositionProperty)o.GeographicPosition.Clone();
            lastMod        = (LastModifiedProperty)o.LastModified.Clone();
            dateCreated    = (DateCreatedProperty)o.DateCreated.Clone();
            startDate      = (StartDateProperty)o.StartDateTime.Clone();
            endDate        = (EndDateProperty)o.EndDateTime.Clone();
            dateStamp      = (TimeStampProperty)o.TimeStamp.Clone();
            summary        = (SummaryProperty)o.Summary.Clone();
            desc           = (DescriptionProperty)o.Description.Clone();
            location       = (LocationProperty)o.Location.Clone();
            priority       = (PriorityProperty)o.Priority.Clone();
            sequence       = (SequenceProperty)o.Sequence.Clone();
            transp         = (TimeTransparencyProperty)o.Transparency.Clone();
            rNum           = (RecurrenceCountProperty)o.RecurrenceCount.Clone();
            comment        = (CommentProperty)o.Comment.Clone();
            organizer      = (OrganizerProperty)o.Organizer.Clone();
            recurId        = (RecurrenceIdProperty)o.RecurrenceId.Clone();
            status         = (StatusProperty)o.Status.Clone();
            duration       = (DurationProperty)o.Duration.Clone();

            this.Contacts.CloneRange(o.Contacts);
            this.Attendees.CloneRange(o.Attendees);
            this.RelatedTo.CloneRange(o.RelatedTo);
            this.Attachments.CloneRange(o.Attachments);
            this.RequestStatuses.CloneRange(o.RequestStatuses);
            this.Alarms.CloneRange(o.Alarms);
            this.CustomProperties.CloneRange(o.CustomProperties);

            base.Clone(p);
        }
示例#5
0
 public RystemAggregationServiceProvider WithLastInFirstOut <T>(SequenceProperty <T> configuration)
 => (RystemAggregationServiceProvider)WithIntegration(ServiceProviderType.InMemory2, configuration, default);
示例#6
0
    public void InitBattleScene()
    {
        FF9StateGlobal FF9 = FF9StateSystem.Common.FF9;

        FF9.charArray.Clear();
        this.btlScene = FF9StateSystem.Battle.FF9Battle.btl_scene = new BTL_SCENE();
        Debug.Log("battleID = " + FF9StateSystem.Battle.battleMapIndex);
        Dictionary <String, Int32> source = FF9BattleDB.SceneData;

        battleSceneName = source.FirstOrDefault(p => p.Value == FF9StateSystem.Battle.battleMapIndex).Key;
        battleSceneName = battleSceneName.Substring(4);
        Debug.Log("battleSceneName = " + battleSceneName);
        this.btlScene.ReadBattleScene(battleSceneName);
        this.StartCoroutine(PersistenSingleton <FF9TextTool> .Instance.UpdateBattleText(FF9BattleDB.SceneData["BSC_" + battleSceneName]));
        WMProfiler.Begin("Start Load Text");
        String battleModelPath = FF9BattleDB.MapModel["BSC_" + battleSceneName];

        FF9StateSystem.Battle.FF9Battle.map.btlBGPtr     = ModelFactory.CreateModel("BattleMap/BattleModel/battleMap_all/" + battleModelPath + "/" + battleModelPath, Vector3.zero, Vector3.zero, true);
        FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum = FF9StateSystem.Battle.isDebug ? FF9StateSystem.Battle.patternIndex : (Byte)this.ChoicePattern();
        this.btlSeq = new btlseq();
        this.btlSeq.ReadBattleSequence(battleSceneName);
        BeginInitialize();
        battle.InitBattle();
        EndInitialize();
        if (!FF9StateSystem.Battle.isDebug)
        {
            String            ebFileName        = "EVT_BATTLE_" + battleSceneName;
            FF9StateBattleMap ff9StateBattleMap = FF9StateSystem.Battle.FF9Battle.map;
            ff9StateBattleMap.evtPtr = EventEngineUtils.loadEventData(ebFileName, "Battle/");
            PersistenSingleton <EventEngine> .Instance.StartEvents(ff9StateBattleMap.evtPtr);

            PersistenSingleton <EventEngine> .Instance.eTb.InitMessage();
        }
        this.CreateBattleData(FF9);
        if (battleSceneName == "EF_E006" || battleSceneName == "EF_E007")
        {
            BTL_DATA btlData1 = FF9StateSystem.Battle.FF9Battle.btl_data[4];
            BTL_DATA btlData2 = FF9StateSystem.Battle.FF9Battle.btl_data[5];
            this.GeoBattleAttach(btlData2.gameObject, btlData1.gameObject, 55);
            btlData2.attachOffset = 100;
        }
        FF9StateBattleSystem stateBattleSystem = FF9StateSystem.Battle.FF9Battle;
        GEOTEXHEADER         geotexheader      = new GEOTEXHEADER();

        geotexheader.ReadBGTextureAnim(battleModelPath);
        stateBattleSystem.map.btlBGTexAnimPtr = geotexheader;
        BBGINFO bbginfo = new BBGINFO();

        bbginfo.ReadBattleInfo(battleModelPath);
        FF9StateSystem.Battle.FF9Battle.map.btlBGInfoPtr = bbginfo;
        btlshadow.ff9battleShadowInit(13);
        battle.InitBattleMap();
        this.seqList = new List <Int32>();
        SB2_PATTERN sb2Pattern = this.btlScene.PatAddr[FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum];

        Int32[] numArray = new Int32[sb2Pattern.MonCount];
        for (Int32 index = 0; index < (Int32)sb2Pattern.MonCount; ++index)
        {
            numArray[index] = sb2Pattern.Put[index].TypeNo;
        }
        foreach (Int32 num in numArray.Distinct().ToArray())
        {
            for (Int32 index1 = 0; index1 < this.btlSeq.sequenceProperty.Length; ++index1)
            {
                SequenceProperty sequenceProperty = this.btlSeq.sequenceProperty[index1];
                if (sequenceProperty.Montype == num)
                {
                    for (Int32 index2 = 0; index2 < sequenceProperty.PlayableSequence.Count; ++index2)
                    {
                        this.seqList.Add(sequenceProperty.PlayableSequence[index2]);
                    }
                }
            }
        }
        this.btlIDList          = FF9StateSystem.Battle.FF9Battle.seq_work_set.AnmOfsList.Distinct().ToArray();
        this.battleState        = BattleState.PlayerTurn;
        playerEnterCommand      = false;
        this.playerCastingSkill = false;
        this.enemyEnterCommand  = false;
    }
示例#7
0
 set => SetValue(SequenceProperty, value);
示例#8
0
    public void InitBattleScene()
    {
        FF9StateGlobal ff = FF9StateSystem.Common.FF9;

        ff.charArray.Clear();
        this.btlScene = (FF9StateSystem.Battle.FF9Battle.btl_scene = new BTL_SCENE());
        global::Debug.Log("battleID = " + FF9StateSystem.Battle.battleMapIndex);
        HonoluluBattleMain.battleSceneName = FF9BattleDB.SceneData.FirstOrDefault((KeyValuePair <string, int> x) => x.Value == FF9StateSystem.Battle.battleMapIndex).Key;
        HonoluluBattleMain.battleSceneName = HonoluluBattleMain.battleSceneName.Substring(4);
        global::Debug.Log("battleSceneName = " + HonoluluBattleMain.battleSceneName);
        this.btlScene.ReadBattleScene(HonoluluBattleMain.battleSceneName);
        base.StartCoroutine(PersistenSingleton <FF9TextTool> .Instance.UpdateBattleText(FF9BattleDB.SceneData["BSC_" + HonoluluBattleMain.battleSceneName]));
        WMProfiler.Begin("Start Load Text");
        string text = FF9BattleDB.MapModel["BSC_" + HonoluluBattleMain.battleSceneName];
        string path = "BattleMap/BattleModel/battleMap_all/" + text + "/" + text;

        FF9StateSystem.Battle.FF9Battle.map.btlBGPtr = ModelFactory.CreateModel(path, Vector3.zero, Vector3.zero, true);
        checked {
            if (!FF9StateSystem.Battle.isDebug)
            {
                FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum = (byte)this.ChoicePattern();
            }
            else
            {
                FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum = FF9StateSystem.Battle.patternIndex;
            }
            this.btlSeq = new btlseq();
            this.btlSeq.ReadBattleSequence(HonoluluBattleMain.battleSceneName);
            FF9StateSystem.Battle.FF9Battle.attr = 0;
            battle.InitBattle();
            FF9StateBattleSystem ff9Battle = FF9StateSystem.Battle.FF9Battle;
            ff9Battle.attr |= 1;
            if (!FF9StateSystem.Battle.isDebug)
            {
                string            ebFileName = "EVT_BATTLE_" + HonoluluBattleMain.battleSceneName;
                FF9StateBattleMap map        = FF9StateSystem.Battle.FF9Battle.map;
                map.evtPtr = EventEngineUtils.loadEventData(ebFileName, EventEngineUtils.ebSubFolderBattle);
                PersistenSingleton <EventEngine> .Instance.StartEvents(map.evtPtr);

                PersistenSingleton <EventEngine> .Instance.eTb.InitMessage();
            }
            this.CreateBattleData(ff);
            if (HonoluluBattleMain.battleSceneName == "EF_E006" || HonoluluBattleMain.battleSceneName == "EF_E007")
            {
                BTL_DATA btl_DATA  = FF9StateSystem.Battle.FF9Battle.btl_data[4];
                BTL_DATA btl_DATA2 = FF9StateSystem.Battle.FF9Battle.btl_data[5];
                this.GeoBattleAttach(btl_DATA2.gameObject, btl_DATA.gameObject, 55);
                btl_DATA2.attachOffset = 100;
            }
            FF9StateBattleSystem ff9Battle2   = FF9StateSystem.Battle.FF9Battle;
            GEOTEXHEADER         geotexheader = new GEOTEXHEADER();
            geotexheader.ReadBGTextureAnim(text);
            ff9Battle2.map.btlBGTexAnimPtr = geotexheader;
            BBGINFO bbginfo = new BBGINFO();
            bbginfo.ReadBattleInfo(text);
            FF9StateSystem.Battle.FF9Battle.map.btlBGInfoPtr = bbginfo;
            btlshadow.ff9battleShadowInit(13);
            battle.InitBattleMap();
            this.seqList = new List <int> ();
            SB2_PATTERN sb2_PATTERN = this.btlScene.PatAddr[(int)FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum];
            int[]       array       = new int[(int)sb2_PATTERN.MonCount];
            for (int i = 0; i < (int)sb2_PATTERN.MonCount; i++)
            {
                array[i] = (int)sb2_PATTERN.Put[i].TypeNo;
            }
            array = array.Distinct <int> ().ToArray <int> ();
            for (int j = 0; j < array.Length; j++)
            {
                for (int k = 0; k < this.btlSeq.sequenceProperty.Length; k++)
                {
                    SequenceProperty sequenceProperty = this.btlSeq.sequenceProperty[k];
                    if (sequenceProperty.Montype == array[j])
                    {
                        for (int l = 0; l < sequenceProperty.PlayableSequence.Count; l++)
                        {
                            this.seqList.Add(sequenceProperty.PlayableSequence[l]);
                        }
                    }
                }
            }
            this.btlIDList   = FF9StateSystem.Battle.FF9Battle.seq_work_set.AnmOfsList.Distinct <byte> ().ToArray <byte> ();
            this.battleState = HonoluluBattleMain.BattleState.PlayerTurn;
            HonoluluBattleMain.playerEnterCommand = false;
            this.playerCastingSkill = false;
            this.enemyEnterCommand  = false;
        }
    }
示例#9
0
 get => (string)GetValue(SequenceProperty); set => SetValue(SequenceProperty, value);
示例#10
0
 /// <summary>
 /// Create a queue with a T object to allow a batch operation after a maximum buffer elements or a maximum retention of time.
 /// </summary>
 /// <typeparam name="T">Object for batch</typeparam>
 /// <param name="maximumBuffer">Maximum elements per batch</param>
 /// <param name="maximumRetention">Maximum delay time for next batch</param>
 /// <param name="action">Batch operation</param>
 /// <param name="id">Queue id</param>
 /// <param name="type">Type of queue</param>
 public static void Create <T>(SequenceProperty <T> sequenceProperty, QueueType type = QueueType.FirstInFirstOut)
 => Sequences.Instance.Create <T>(sequenceProperty, type);