Beispiel #1
0
        private void updateBhvr()
        {
            ArrayList data = getData();

            Behavior bhvr = BehaviorParser.parse(fileName, ref data);

            foreach (KeyValuePair <string, object> kvp in bhvr.bParameters)
            {
                this.BhvrTag.bParameters[kvp.Key] = kvp.Value;
            }
        }
Beispiel #2
0
        public void loadStandAloneBhvrFile(string file_name)
        {
            ArrayList bhvrData = new ArrayList();

            common.COH_IO.fillList(bhvrData, file_name);

            Behavior bhvr = BehaviorParser.parse(file_name, ref bhvrData);

            bpcfPanel.bhvrStandAloneFile.Add(bhvr);

            if (!bpcfPanel.eventsComboBx.Items.Contains("StandAloneFiles"))
            {
                this.bpcfPanel.eventsComboBx.Items.Add("StandAloneFiles");
            }

            bpcfPanel.eventsComboBx.SelectedIndex = bpcfPanel.eventsComboBx.Items.Count - 1;

            bpcfPanel.eventsBhvrFilesMComboBx.SelectedIndex = bpcfPanel.eventsBhvrFilesMComboBx.Items.Count - 1;
        }
        private void updateBhvr(string fileName, ArrayList data)
        {
            Behavior bhvr = BehaviorParser.parse(fileName, ref data);

            BehaviorWin bWin = (BehaviorWin)ownerDockablePanel;

            foreach (KeyValuePair <string, object> kvp in bhvr.bParameters)
            {
                bWin.BhvrTag.bParameters[kvp.Key] = kvp.Value;
            }

            bWin.BhvrTag.fileName = bhvr.fileName;

            bWin.BhvrTag.isCommented = bhvr.isCommented;

            bWin.BhvrTag.isDirty = bhvr.isDirty;

            bWin.BhvrTag.isP4 = bhvr.isP4;

            bWin.BhvrTag.isReadOnly = bhvr.isReadOnly;

            ((BehaviorWin)ownerDockablePanel).setIsDirty(false);
        }