예제 #1
0
 private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     if (e.Node.Name.StartsWith("c"))
     {
         settings.DiscordChannelID = (ulong)e.Node.Tag;
         settings.DiscordGuildID   = (ulong)e.Node.Parent.Tag;
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: weimingtom/pap2
 /// <summary>
 /// 选择分类树节点
 /// </summary>
 /// <param name="sender">事件发送者</param>
 /// <param name="e">事件参数</param>
 private void itemTree_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     if (e.Node.Level == 1)
     {
         string[] compareData = e.Node.Tag as string[];
         ShowText(compareData[0], compareData[1]);
     }
     else
     {
         richTextBox1.Text = "";
         richTextBox2.Text = "";
     }
 }
예제 #3
0
        private void log_date_advTree_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
        {
            try
            {
                if (e.Node.Level == 1)
                {
                    Stopwatch st = new Stopwatch();
                    st.Start();;
                    fileName = e.Node.Text;
                    FileStream   fs = new FileStream(Application.StartupPath + "//Log//" + fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                    StreamReader sr = new StreamReader(fs, Encoding.Default);
                    String       line;
                    TimeSpan     beginTime = log_beginTime_dateTimePicker.Value.TimeOfDay;
                    TimeSpan     endTime   = log_endTime_dateTimePicker.Value.TimeOfDay;

                    DataTable myTable = new DataTable();
                    myTable.Columns.Add("Time");
                    myTable.Columns.Add("Type");
                    myTable.Columns.Add("Message");

                    List <Log> list = new List <Log>();
                    while ((line = sr.ReadLine()) != null)
                    {
                        var log = analyzeLine(line);
                        if (log != null)
                        {
                            list.Add(log);
                        }
                    }
                    var s = list
                            .Where(n => !log_condition_checkBox.Checked || n.Message.Contains(log_condition_textBox.Text))
                            .Where(n => !log_timer_checkBox.Checked || (Convert.ToDateTime(n.Time).TimeOfDay > beginTime &&
                                                                        Convert.ToDateTime(n.Time).TimeOfDay < endTime)).Reverse().ToList();
                    log_detail_superGridControl.PrimaryGrid.DataSource = s.Count() > 0 ? s : null;
                    st.Stop();
                }
            }
            catch (Exception ex)
            {
                if (XML_Tool.xml.SysConfig.IsChinese)
                {
                    MessageBox.Show("日志显示出现异常:" + ex.Message);
                }
                else
                {
                    MessageBox.Show("log display occur exception:" + ex.Message);
                }
            }
        }
        protected override void OnInsertComplete(int index, object value)
        {
            if (TreeSelectionControl.MultiSelect)
            {
                Node node = value as Node;
                node.IsSelected = true;
                TreeSelectionControl.InvalidateNode(node);
                if (node.SelectedCell == null)
                {
                    node.SelectFirstCell(SourceAction);
                }
                AdvTreeNodeEventArgs args = new AdvTreeNodeEventArgs(SourceAction, node);
                TreeSelectionControl.InvokeOnAfterNodeSelect(args);
                node.InternalSelected(this.SourceAction);
                if(!_MultiNodeOperation)
                    TreeSelectionControl.InvokeSelectionChanged(EventArgs.Empty);
            }
            base.OnInsertComplete(index, value);

        }
예제 #5
0
 private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     AsmArea = e.Node?.Tag as CustomAsmArea;
     buttonX_Select.Enabled = AsmArea != null;
 }
예제 #6
0
        /// <summary>
        /// 節點被選取
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void nodeTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node == null)
                return;

            if (nodeTree.SelectedNodes.Count > 1)
                return;

            string AssocID = e.Node.TagString;

            if (!string.IsNullOrEmpty(AssocID))
            {
                if (AssocID.StartsWith("所有"))
                {
                    MainFormBL.Instance.OpenClassEventsView(Constants.evAll, string.Empty, "所有");
                    MainFormBL.Instance.ClearClassDefaultSchedule();
                }
                else
                {
                    MainFormBL.Instance.OpenClassEventsView(Constants.evWhom, AssocID.Equals("無") ? string.Empty : AssocID, e.Node.Text);

                    string[] IDs = AssocID.Split(new char[] { ';' });

                    if (!AssocID.Equals("無") && IDs.Length == 1)
                        MainFormBL.Instance.OpenClassSchedule(Constants.lvWhom, AssocID);
                    else if (AssocID.Equals("無"))
                        MainFormBL.Instance.ClearClassDefaultSchedule();
                }
            }
        }
예제 #7
0
        private void TreeAfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (SelectionChanged != null)
                SelectionChanged(this, e);

            if (_DataManager != null)
            {
                Node selectedNode = _AdvTree.SelectedNode;
                if (selectedNode != null && selectedNode.BindingIndex > -1 && _DataManager.Position != selectedNode.BindingIndex)
                {
                    _DataManager.Position = selectedNode.BindingIndex;
                }
                //else if (selectedNode == null)
                //    _DataManager.Position = -1;
            }

            if (this.SelectionClosesPopup && this.IsPopupOpen && e.Action == eTreeAction.Mouse)
            {
                this.IsPopupOpen = false;
            }

            if (e.Node != null) this.Text = e.Node.ToString();
            this.Invalidate();

            OnSelectedIndexChanged(EventArgs.Empty);
            if(!string.IsNullOrEmpty(this.ValueMember))
                this.OnSelectedValueChanged(EventArgs.Empty);
        }
예제 #8
0
 private void TreeAfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     if (this.SelectionClosesPopup && _DroppedDown && e.Action == eTreeAction.Mouse)
     {
         CloseMultiColumnDropDown();
     }
 }
예제 #9
0
 private void advTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     buttonRemove.Enabled = e.Node != null;
     buttonNewSubMenu.Enabled = e.Node != null;
     if (e.Node != null)
         propertyGrid1.SelectedObject = e.Node.Tag;
     else
         propertyGrid1.SelectedObject = null;
 }
예제 #10
0
 private void SkillTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     try
     {
         SkillName.Text = CurrentWSG.SkillNames[SkillTree.SelectedNode.Index];
         SkillLevel.Value = CurrentWSG.LevelOfSkills[SkillTree.SelectedNode.Index];
         SkillExp.Value = CurrentWSG.ExpOfSkills[SkillTree.SelectedNode.Index];
         if (CurrentWSG.InUse[SkillTree.SelectedNode.Index] == -1) SkillActive.SelectedItem = "No";
         else SkillActive.SelectedItem = "Yes";
     }
     catch { }
 }
예제 #11
0
        private void PartCategories_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            WeaponPartInfo.Clear();
            try
            {
                // Read ALL subsections of a given XML section
                // File: (AppDir + "\\Data\\" + PartCategories.SelectedNode.Parent.Text + ".txt")
                XmlFile Category = new XmlFile(AppDir + "\\Data\\" + PartCategories.SelectedNode.Parent.Text + ".txt");

                // XML Section: PartCategories.SelectedNode.Text
                List<string> xmlSection = Category.XmlReadSection(PartCategories.SelectedNode.Text);

                WeaponPartInfo.Lines = xmlSection.ToArray();
                /*
                if (File.Exists(AppDir + "\\Data\\" + PartCategories.SelectedNode.Parent.Text + ".txt"))
                {
                    string[] InText = File.ReadAllLines(AppDir + "\\Data\\" + PartCategories.SelectedNode.Parent.Text + ".txt");
                    int start = 0;
                    int end = 1;
                    string search = "[" + PartCategories.SelectedNode.Text + "]";
                    ArrayList Lines = new ArrayList();
                    for (int i1 = 0; i1 < InText.Length; i1++)
                    {
                        if (InText[i1].Contains(search))
                        {
                            start = i1;
                            i1 = InText.Length;
                        }
                    }
                    for (int i2 = start + 1; i2 < InText.Length; i2++)
                    {
                        if (InText[i2].Contains("[") == true && InText[i2].Contains("=") == false)
                        {
                            end = i2;
                            i2 = InText.Length;
                        }
                    }
                    if(start > end)
                        for (start++; start < InText.Length; start++)
                        {

                                InText[start].Replace("=", ": ");
                                Lines.Add(InText[start]);

                        }
                    else
                    for (start++; start < end; start++)
                    {

                            InText[start].Replace("=", ": ");
                            Lines.Add(InText[start]);

                    }
                    WeaponPartInfo.Lines = (string[])Lines.ToArray(typeof(string));

                }*/
            }
            catch { }
        }
예제 #12
0
        //  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ITEMS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  \\
        private void ItemTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            try
            {

                CurrentItemParts.Items.Clear();
                CurrentPartsGroup.Text = ItemTree.SelectedNode.Text;

                if (IsDLCItemMode)
                {
                    for (int build_list = 0; build_list < 9; build_list++)
                    {
                        CurrentItemParts.Items.Add(CurrentWSG.DLC.ItemParts[ItemTree.SelectedNode.Index][build_list]);
                    }

                    Quantity.Value = CurrentWSG.DLC.ItemQuantity[ItemTree.SelectedNode.Index];
                    ItemQuality.Value = CurrentWSG.DLC.ItemQuality[ItemTree.SelectedNode.Index];
                    ItemItemGradeSlider.Value = CurrentWSG.DLC.ItemLevel[ItemTree.SelectedNode.Index];
                    if (CurrentWSG.DLC.ItemEquipped[ItemTree.SelectedNode.Index] == 0) Equipped.SelectedItem = "No";
                    else if (CurrentWSG.DLC.ItemEquipped[ItemTree.SelectedNode.Index] == 1) Equipped.SelectedItem = "Yes";
                }
                else
                {
                    for (int ndcnt = 0; ndcnt < ItemPartsSelector.Nodes.Count; ndcnt++)
                        ItemPartsSelector.Nodes[ndcnt].Style = elementStyle15;

                    for (int build_list = 0; build_list < 9; build_list++)
                    {
                        string curItempart = CurrentWSG.ItemStrings[ItemTree.SelectedNode.Index][build_list];
                        CurrentItemParts.Items.Add(curItempart);

                        // highlight the used partfamilies in the partscategories tree
                        if (curItempart.Contains('.'))
                        {
                            string curItempartclass = curItempart.Substring(0, curItempart.IndexOf('.'));
                            for (int ndcnt = 0; ndcnt < ItemPartsSelector.Nodes.Count; ndcnt++)
                            {
                                if (ItemPartsSelector.Nodes[ndcnt].Name == curItempartclass)
                                {
                                    ItemPartsSelector.Nodes[ndcnt].Style = elementStyle16;
                                    break;
                                }
                            }
                        }
                    }

                    Quantity.Value = CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][0];
                    ItemQuality.Value = CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][1];
                    if (CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][2] == 0) Equipped.SelectedItem = "No";
                    else if (CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][2] == 1) Equipped.SelectedItem = "Yes";
                    ItemItemGradeSlider.Value = CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][3];
                    //string hex = String.Format("{x}", CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][0]);
                    hex01.Text = String.Format("0x{0:x8}", CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][0]);
                    hex02.Text = String.Format("0x{0:x8}", CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][1]);
                    hex03.Text = String.Format("0x{0:x8}", CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][2]);
                    hex04.Text = String.Format("0x{0:x8}", CurrentWSG.ItemValues[ItemTree.SelectedNode.Index][3]);
                }

            }
            catch { }
        }
예제 #13
0
파일: MainForm.cs 프로젝트: viticm/pap2
        /// <summary>
        /// 选择树结点
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void guideTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = guideTree.SelectedNode;

            if (currentNode != null)
            {
                string id = currentNode.Tag as string;
                string description = descriptionDictionary[id];
                descriptionBox.Text = description;
            }
        }
예제 #14
0
 private void rackAdvTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     Node node = e.Node;
     if(e.Node.Tag is Board)
     {
         Board board = (Board)e.Node.Tag;
         string selectString = board.Name;
         Thread thread = new Thread(new ParameterizedThreadStart(SortDataGridView));
         thread.Start((object)selectString);
     }
     else if (e.Node.Tag is Rack)
     {
         //
     }
 }
예제 #15
0
        private void treeListObjects_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            bool selectMatchEnabled = false;

            // this try finally block is here to stop the select match button flickering every time the user clicks
            // a new node in the treelist.
            try
            {
                if (DesignMode)
                    return;

                if (currentFocusedNode != null && treeListObjects.SelectedNode == currentFocusedNode)
                {
                    selectMatchEnabled = true;
                    return;
                }

                if (currentFocusedNode != null && ucTextMergeEditor.HasUnsavedChanges)
                {
                    DialogResult result = MessageBox.Show(this,
                                                          "You have unsaved changes in the Diff editor. Do you wish to discard those changes?",
                                                          "Discard Changes?", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
                                                          MessageBoxDefaultButton.Button2);
                    if (result == DialogResult.No)
                    {
                        treeListObjects.SelectedNode = currentFocusedNode;
                        return;
                    }
                }

                if (treeListObjects.SelectedNode == null || treeListObjects.SelectedNode.Tag == null)
                {
                    // Hide the Text Merge Editor.
                    ucTextMergeEditor.Visible = false;
                    currentFocusedNode = null;
                    return;
                }

                ucTextMergeEditor.Visible = true;

                DisplayNodeFiles(treeListObjects.SelectedNode);
                currentFocusedNode = treeListObjects.SelectedNode;
                selectMatchEnabled = true;
                Refresh();
            }
            finally
            {
                btnSelectMatch.Enabled = selectMatchEnabled;
            }
        }
 private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     Behavior = e.Node?.Tag as BehaviorConfig;
     buttonX_Select.Enabled = Behavior != null;
 }
예제 #17
0
        private void advTreePoly_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node selectedNode = this.advTreePoly.SelectedNode;
            if (selectedNode == null) return;

            if (selectedNode.Level == 0)
            {
                if (selectedNode.Text == "笔刷")
                    SceneSceneEditor.SetEditState(SCENESTATE_CELLLOGICAL);
                else if (selectedNode.Text == "多边形")
                    SceneSceneEditor.SetEditState(SCENESTATE_SELECT);
            }
            else if (selectedNode.Level == 1)
            {
                if (selectedNode.Parent.Text == "多边形")
                {
                    //SceneSceneEditor.SetEditState(SCENESTATE_SELECT);

                    _AtlObjInfo atlobj = (_AtlObjInfo)selectedNode.Tag;
                    ShowPolyInfoUI(atlobj);
                    this.buttonOK.Enabled = false;

                    if (atlobj.iRepresentObjPtr != 0)
                    {
                        if (SceneSceneEditor.GetEditState() != SCENESTATE_PLACEOBJ)
                            MoveCameraToRepresentObj(atlobj.iRepresentObjPtr);
                        SelectOnlyRepresentObj(atlobj.iRepresentObjPtr);
                    }
                }
                else if (selectedNode.Parent.Text == "笔刷")
                {
                    _AtlObjInfo atlobj = (_AtlObjInfo)selectedNode.Tag;
                    ShowBrushInfoUI(atlobj);
                    this.buttonOK.Enabled = false;
                    //set camera
                    string strPos = atlobj.strValues[5];
                    if (strPos != "0.000000,0.000000,0.000000")
                    {
                        string[] strPoses = strPos.Split(new char[] {','},StringSplitOptions.RemoveEmptyEntries);
                        float x = 0.0f, y = 0.0f, z = 0.0f;
                        if (Single.TryParse(strPoses[0], out x) && Single.TryParse(strPoses[1], out y) && Single.TryParse(strPoses[2], out z))
                        {
                            _AtlVector3 brushPos = new _AtlVector3();
                            brushPos.x = x; brushPos.y = y; brushPos.z = z;
                            MoveCameraToPosition(brushPos);
                        }
                    }

                    SetLogicSceneEditorBrushState(atlobj);
                }
            }

        }
예제 #18
0
파일: MainForm.cs 프로젝트: viticm/pap2
 /// <summary>
 /// 选择树结点之后
 /// </summary>
 /// <param name="sender">事件发送者</param>
 /// <param name="e">事件参数</param>
 private void guideTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     LoadRecord();
     lastSelectedNode = guideTree.SelectedNode;
 }
 private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     LoadObjectPorps(e.Node?.Tag as CustomObject);
 }
예제 #20
0
        private void nodeTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node != null)
                mSelectedNode = e.Node;

            SelectCalendar();
        }
예제 #21
0
        private void LockerTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            try
            {
                PartsLocker.Items.Clear();
                XmlLocker.path = OpenedLocker;

                //Ini.IniFile Locker = new Ini.IniFile(OpenedLocker);
                //int Lockerindex = Convert.ToInt32(LockerTree.SelectedNode.TagString);
                if (!LockerTree.SelectedNode.HasChildNodes)
                {
                    string SelectedItem = LockerTree.SelectedNode.Name;

                    NameLocker.Text = SelectedItem;

                    RatingLocker.Rating = Convert.ToInt32(XmlLocker.XmlReadValue(SelectedItem, "Rating"));
                    DescriptionLocker.Text = XmlLocker.XmlReadValue(SelectedItem, "Description");
                    DescriptionLocker.Text = DescriptionLocker.Text.Replace("$LINE$", "\r\n");
                    ItemTypeLocker.SelectedItem = XmlLocker.XmlReadValue(SelectedItem, "Type");

                    for (int Progress = 0; Progress < 14; Progress++)
                        PartsLocker.Items.Add(XmlLocker.XmlReadValue(SelectedItem, "Part" + (Progress + 1)));

                    try
                    {
                        LockerRemAmmo.Value = Convert.ToInt32(XmlLocker.XmlReadValue(SelectedItem, "RemAmmo_Quantity"));
                    }
                    catch
                    {
                        LockerRemAmmo.Value = 0;
                    }
                    try
                    {
                        LockerQuality.Value = Convert.ToInt32(XmlLocker.XmlReadValue(SelectedItem, "Quality"));
                    }
                    catch
                    {
                        LockerQuality.Value = 0;
                    }
                    try
                    {
                        LockerLevel.Value = Convert.ToInt32(XmlLocker.XmlReadValue(SelectedItem, "Level"));
                    }
                    catch
                    {
                        LockerLevel.Value = 0;
                    }

                    /*                int Lockerindex = LockerTree.SelectedNode.Index;

                                    NameLocker.Text = XmlLocker.ListSectionNames()[Lockerindex];

                                    RatingLocker.Rating = Convert.ToInt32(XmlLocker.XmlReadValue(XmlLocker.ListSectionNames()[Lockerindex], "Rating"));
                                    DescriptionLocker.Text = XmlLocker.XmlReadValue(XmlLocker.ListSectionNames()[Lockerindex], "Description");
                                    DescriptionLocker.Text = DescriptionLocker.Text.Replace("$LINE$", "\r\n");
                                    ItemTypeLocker.SelectedItem = XmlLocker.XmlReadValue(XmlLocker.ListSectionNames()[Lockerindex], "Type");

                                    for (int Progress = 0; Progress < 14; Progress++)
                                        PartsLocker.Items.Add(XmlLocker.XmlReadValue(XmlLocker.ListSectionNames()[Lockerindex], "Part" + (Progress + 1)));
                    */

                }
            }
            catch { }
        }
예제 #22
0
 private void Tree_cs_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     GetNodeText();
 }
예제 #23
0
        //  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< QUESTS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  \\
        private void QuestTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Clicked = false;
            try
            {
                SelectedQuestGroup.Text = QuestTree.SelectedNode.Text;
                //if (QuestTree.SelectedNode.Parent.Text == "Playthrough 1 Quests" && QuestTree.SelectedNode.HasChildNodes == false)

                //else if (QuestTree.SelectedNode.Parent.Text == "Playthrough 2 Quests" && QuestTree.SelectedNode.HasChildNodes == false)
                if (QuestTree.SelectedNode.Name == "PT1")
                {

                    QuestString.Text = CurrentWSG.PT1Strings[QuestTree.SelectedNode.Index];
                    if (CurrentWSG.PT1Values[QuestTree.SelectedNode.Index, 0] > 2)
                        QuestProgress.SelectedIndex = 3;
                    else QuestProgress.SelectedIndex = CurrentWSG.PT1Values[QuestTree.SelectedNode.Index, 0];
                    NumberOfObjectives.Value = CurrentWSG.PT1Values[QuestTree.SelectedNode.Index, 3];
                    Objectives.Items.Clear();
                    XmlFile Quest = new XmlFile(AppDir + "\\Data\\Quests.ini");
                    if (NumberOfObjectives.Value > 0)
                        for (int Progress = 0; Progress < NumberOfObjectives.Value; Progress++)
                            Objectives.Items.Add(Quest.XmlReadValue(QuestString.Text, "Objectives" + Progress));
                    ObjectiveValue.Value = 0;
                    QuestSummary.Text = Quest.XmlReadValue(QuestString.Text, "MissionSummary");
                    QuestDescription.Text = Quest.XmlReadValue(QuestString.Text, "MissionDescription");
                }
                else if (QuestTree.SelectedNode.Name == "PT2")
                {
                    QuestString.Text = CurrentWSG.PT2Strings[QuestTree.SelectedNode.Index];
                    if (CurrentWSG.PT2Values[QuestTree.SelectedNode.Index, 0] > 2)
                        QuestProgress.SelectedIndex = 3;
                    else QuestProgress.SelectedIndex = CurrentWSG.PT2Values[QuestTree.SelectedNode.Index, 0];
                    NumberOfObjectives.Value = CurrentWSG.PT2Values[QuestTree.SelectedNode.Index, 3];
                    Objectives.Items.Clear();
                    XmlFile Quest = new XmlFile(AppDir + "\\Data\\Quests.ini");
                    if (NumberOfObjectives.Value > 0)
                        for (int Progress = 0; Progress < NumberOfObjectives.Value; Progress++)
                            Objectives.Items.Add(Quest.XmlReadValue(QuestString.Text, "Objectives" + Progress));
                    ObjectiveValue.Value = 0;
                    QuestSummary.Text = Quest.XmlReadValue(QuestString.Text, "MissionSummary");
                    QuestDescription.Text = Quest.XmlReadValue(QuestString.Text, "MissionDescription");
                }
            }
            catch { QuestString.Text = ""; Objectives.Items.Clear(); NumberOfObjectives.Value = 0; ObjectiveValue.Value = 0; QuestProgress.SelectedIndex = 0; }
        }
예제 #24
0
        /// <summary>
        /// 选择字段
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void keyFieldTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            relationTree.Nodes.Clear();

            Node currentNode = keyFieldTree.SelectedNode;

            if (currentNode != null && currentNode.Level == 1)
            {
                string relationData = currentNode.Tag as string;
                string[] tableInfo = relationData.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                
                foreach (string s in tableInfo)
                {
                    string[] fieldInfo = s.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                    Node tableNode = new Node();
                    tableNode.Text = fieldInfo[0];
                    tableNode.Tag = fieldInfo[0];
                    relationTree.Nodes.Add(tableNode);

                    for (int i = 1; i < fieldInfo.Length; i++)
                    {
                        Node fieldNode = new Node();
                        fieldNode.Text = GetFieldDisplayName(fieldInfo[0], fieldInfo[i]);
                        fieldNode.Tag = fieldInfo[i];
                        tableNode.Nodes.Add(fieldNode);
                    }

                    tableNode.Expand();
                }
            }
        }
예제 #25
0
        //  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< WEAPONS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  \\
        private void WeaponTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            try
            {

                if (IsDLCWeaponMode)
                {
                    CurrentWeaponParts.Items.Clear();
                    CurrentPartsGroup.Text = WeaponTree.SelectedNode.Text;

                    for (int build_list = 0; build_list < 14; build_list++)
                    {
                        CurrentWeaponParts.Items.Add(CurrentWSG.DLC.WeaponParts[WeaponTree.SelectedNode.Index][build_list]);
                    }

                    RemainingAmmo.Value = CurrentWSG.DLC.WeaponAmmo[WeaponTree.SelectedNode.Index];
                    WeaponQuality.Value = CurrentWSG.DLC.WeaponQuality[WeaponTree.SelectedNode.Index];

                    WeaponItemGradeSlider.Value = CurrentWSG.DLC.WeaponLevel[WeaponTree.SelectedNode.Index];
                    if (CurrentWSG.DLC.WeaponEquippedSlot[WeaponTree.SelectedNode.Index] == 0) EquippedSlot.SelectedItem = "Unequipped";
                    else if (CurrentWSG.DLC.WeaponEquippedSlot[WeaponTree.SelectedNode.Index] == 1) EquippedSlot.SelectedItem = "Slot 1 (Up)";
                    else if (CurrentWSG.DLC.WeaponEquippedSlot[WeaponTree.SelectedNode.Index] == 2) EquippedSlot.SelectedItem = "Slot 2 (Down)";
                    else if (CurrentWSG.DLC.WeaponEquippedSlot[WeaponTree.SelectedNode.Index] == 3) EquippedSlot.SelectedItem = "Slot 3 (Left)";
                    else if (CurrentWSG.DLC.WeaponEquippedSlot[WeaponTree.SelectedNode.Index] > 3) EquippedSlot.SelectedItem = "Slot 4 (Right)";
                }
                else
                {
                    CurrentWeaponParts.Items.Clear();
                    CurrentPartsGroup.Text = WeaponTree.SelectedNode.Text;

                    for (int ndcnt = 0; ndcnt < PartCategories.Nodes.Count; ndcnt++)
                        PartCategories.Nodes[ndcnt].Style = elementStyle15;

                    for (int build_list = 0; build_list < 14; build_list++)
                    {
                        string curWeaponpart = CurrentWSG.WeaponStrings[WeaponTree.SelectedNode.Index][build_list];
                        CurrentWeaponParts.Items.Add(curWeaponpart);
                        // highlight the used partfamilies in the partscategories tree
                        if (curWeaponpart.Contains('.'))
                        {
                            string curWeaponpartclass = curWeaponpart.Substring(0, curWeaponpart.IndexOf('.'));
                            for (int ndcnt = 0; ndcnt < PartCategories.Nodes.Count; ndcnt++)
                            {
                                if (PartCategories.Nodes[ndcnt].Name == curWeaponpartclass)
                                {
                                    PartCategories.Nodes[ndcnt].Style = elementStyle16;
                                    break;
                                }
                            }
                        }

                    }

                    RemainingAmmo.Value = CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][0];
                    //Set Itemgrade before Quality -> Level will display correct
                    WeaponItemGradeSlider.Value = CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][3];

                    WeaponQuality.Value = CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][1];

                    if (CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][2] == 0) EquippedSlot.SelectedItem = "Unequipped";
                    else if (CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][2] == 1) EquippedSlot.SelectedItem = "Slot 1 (Up)";
                    else if (CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][2] == 2) EquippedSlot.SelectedItem = "Slot 2 (Down)";
                    else if (CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][2] == 3) EquippedSlot.SelectedItem = "Slot 3 (Left)";
                    else if (CurrentWSG.WeaponValues[WeaponTree.SelectedNode.Index][2] > 3) EquippedSlot.SelectedItem = "Slot 4 (Right)";
                }

            }
            catch { }
        }
예제 #26
0
        /// <summary>
        /// 路径点分类数结点选择结束
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void advTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = patrolTree.SelectedNode;
            beginEdit = false;

            if (currentNode != null)
            {
                _AtlObjInfo objectInfo = (_AtlObjInfo)currentNode.Tag;
                Hashtable infoTable = Helper.GetInfoTable(objectInfo);
                Node cameraNode = null;

                if (currentNode.Level == 1) // 刷新路径点信息
                {
                    wayPointSetParameterPanel.Enabled = false;
                    wayPointParameterPanel.Enabled = true;

                    if (infoTable["nStayFrame"] != null)
                    {
                        wayPointStayFrameBox.Text = infoTable["nStayFrame"] as string;
                    }
                    else
                    {
                        wayPointStayFrameBox.Text = "";
                    }

                    if (infoTable["nStayDirection"] != null)
                    {
                        wayPointStayDirectionBox.Text = infoTable["nStayDirection"] as string;
                    }
                    else
                    {
                        wayPointStayDirectionBox.Text = "";
                    }

                    if (infoTable["nStayAnimation"] != null)
                    {
                        wayPointStayAnimationBox.Text = infoTable["nStayAnimation"] as string;
                    }
                    else
                    {
                        wayPointStayAnimationBox.Text = "";
                    }

                    if (infoTable["bStayAniLoop"] as string == "1")
                    {
                        cWayPointAnimationLoop.Checked = true;
                    }
                    else
                    {
                        cWayPointAnimationLoop.Checked = false;
                    }

                    if (infoTable["bIsRun"] as string == "1")
                    {
                        cWayPointRun.Checked = true;
                    }
                    else
                    {
                        cWayPointRun.Checked = false;
                    }

                    if (infoTable["szScriptName"] != null)
                    {
                        wayPointScriptBox.Text = infoTable["szScriptName"] as string;
                    }
                    else
                    {
                        wayPointScriptBox.Text = "";
                    }

                    cameraNode = currentNode;
                }
                else // 刷新路径信息
                {
                    wayPointSetParameterPanel.Enabled = true;
                    wayPointParameterPanel.Enabled = false;

                    FillPatrolPathOrderList();

                    if (infoTable["szName"] != null)
                    {
                        patrolPathNameBox.Text = infoTable["szName"] as string;
                    }
                    else
                    {
                        patrolPathNameBox.Text = "";
                    }

                    if (infoTable["nPatrolPathOrderID"] != null)
                    {
                        patrolPathOrderBox.SelectedIndex = int.Parse(infoTable["nPatrolPathOrderID"].ToString()) - 1;
                    }
                    else
                    {
                        patrolPathOrderBox.SelectedIndex = -1;
                    }

                    if (infoTable["nPatrolPathWalkSpeed"] != null)
                    {
                        patrolPathWalkSpeedBox.Text = infoTable["nPatrolPathWalkSpeed"] as string;
                    }
                    else
                    {
                        patrolPathWalkSpeedBox.Text = "";
                    }

                    if (currentNode.Nodes.Count > 0)
                    {
                        cameraNode = currentNode.Nodes[0];
                    }
                }

                // 移动摄像机位置
                if (cameraNode != null)
                {
                    m_doc.DocLogical.GetObjDisplayInfo("WayPoint", cameraNode.Index, cameraNode.Parent.Index, ref name, ref nickName, ref hasScript, ref representObj, ref logicObj, ref templateID);
                    MoveCameraToRepresentObj(representObj);
                    SelectOnlyRepresentObj(representObj);
                }
            }

            beginEdit = true;
        }
예제 #27
0
 private void Tree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     SetListPanel(e.Node as KeyNode);
 }
예제 #28
0
 private void advTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     Node node = e.Node;
     if (!string.IsNullOrEmpty((string)node.Tag))
     {
         richTextBox1.Rtf = ResourceManager.GetString((string)node.Tag);
     }
     else
         richTextBox1.Text = "";
 }
예제 #29
0
        /// <summary>
        /// 选择分类树结点
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void advTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = editorTree.SelectedNode;
            editorView.Rows.Clear();

            if (currentNode.Level == 1)
            {
                List<string[]> dataList = currentNode.Tag as List<string[]>;         
                DataGridViewRow firstRow = null;

                for (int i = 0; i < dataList.Count; i++)
                {
                    editorView.Rows.Add(1);
                    DataGridViewRow newRow = editorView.Rows[i];
                    newRow.Cells["AnimationType"].Value = dataList[i][0];
                    newRow.Cells["EditorID"].Value = dataList[i][1];
                    newRow.Cells["SourceID"].Value = dataList[i][2];
                    newRow.Cells["ColorChannel"].Value = dataList[i][3];

                    if (i == 0) // 默认显示第一行的信息
                    {
                        ShowModelInfo(newRow);
                    }
                }                                
            }
            else
            {
                // 清掉模型图片和描述
                previewLabel.Image = null;
                descriptionLabel.Text = "模型使用次数";
                modelDescriptionBox.Text = "";
            }
        }
예제 #30
0
        private void treeWho_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node == null)
                return;

            mSelectedNode = e.Node;

            SelectCalendar();
        }
예제 #31
0
        /// <summary>
        /// 选中了某个Action
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void RefreshActionInfo(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = actionTree.SelectedNode;

            if (currentNode != null && currentNode.Level == 1)
            {
                AI_Action act = actionTable[currentNode.Tag.ToString()] as AI_Action;

                if (act != null)
                {
                    if (act.Equals(singleAction.Action))
                    {
                        ShowActionData(singleAction.Action);
                    }
                    else
                    {
                        ShowActionData(act);                        
                    }                
                }
            }
            else
            {
                for (int i = 0; i < 5; i++)
                {
                    labelArray[i].Text = "-";
                    comboBoxArray[i].Text = "";
                    comboBoxArray[i].Enabled = false;     
                }
            }                               
        }
예제 #32
0
        /// <summary>
        /// 选择Doodad
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void doodadTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = doodadTree.SelectedNode;

            if (currentNode != null)
            {
                if (currentNode.Level == 0) // 选择分类
                {
                    previewCanvas2.BeginInit = false;
                    buttonX25.Enabled = false;
                    buttonX26.Enabled = false;
                }
                else // 选择Doodad
                {
                    List<string> fileNameList = currentNode.Tag as List<string>;

                    if (fileNameList.Count > 0)
                    {
                        // 获取模型文件路径                
                        EngineLayer.ATLBase.LoadDoodadModel(fileNameList[0]);
                        string[] data = fileNameList[0].Split(new char[] { '\\' });
                        labelX2.Text = data[data.Length - 1];
                        previewCanvas2.BeginInit = true;
                        buttonX25.Enabled = true;
                        buttonX26.Enabled = true;

                        // 切换笔刷
                        DataRow row = doodadInfoTable[currentNode] as DataRow;
                        int doodadID = int.Parse(row["ID"].ToString());
                        string doodadName = row["Name"].ToString();
                        EngineLayer.ATLBase.SwitchDoodadBrush(doodadID, doodadName, 0);
                    }
                }

                labelX2.Text = "无模型";
            }
        }
예제 #33
0
파일: BaseForm_Npc.cs 프로젝트: viticm/pap2
        /// <summary>
        /// 选择Npc
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void npcTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = npcTree.SelectedNode;

            if (currentNode != null)
            {
                if (currentNode.Level == 0) // 选择分类
                {
                    previewCanvas1.BeginInit = false;
                    buttonX19.Enabled = false;
                    buttonX20.Enabled = false;
                }
                else // 选择Npc
                {
                    Hashtable infoTable = currentNode.Tag as Hashtable;
                    if (infoTable == null)
                        return;
                    string modelFile = infoTable["modelFile"] as string;
                    string faceMeshFile = infoTable["faceMeshFile"] as string;
                    string faceMaterialFile = infoTable["faceMaterialFile"] as string;
                    string hatMeshFile = infoTable["hatMeshFile"] as string;
                    string hatMaterialFile = infoTable["hatMaterialFile"] as string;
                    string leftHandMeshFile = infoTable["leftHandMeshFile"] as string;
                    string leftHandMaterialFile = infoTable["leftHandMaterialFile"] as string;
                    string lpMeshFile = infoTable["lpMeshFile"] as string;
                    string lpMaterialFile = infoTable["lpMaterialFile"] as string;
                    string lcMeshFile = infoTable["lcMeshFile"] as string;
                    string lcMaterialFile = infoTable["lcMaterialFile"] as string;
                    string rightHandMeshFile = infoTable["rightHandMeshFile"] as string;
                    string rightHandMaterialFile = infoTable["rightHandMaterialFile"] as string;
                    string rpMeshFile = infoTable["rpMeshFile"] as string;
                    string rpMaterialFile = infoTable["rpMaterialFile"] as string;
                    string rcMeshFile = infoTable["rcMeshFile"] as string;
                    string rcMaterialFile = infoTable["rcMaterialFile"] as string;
                    string longMeshFile = infoTable["longMeshFile"] as string;
                    string longMaterialFile = infoTable["longMaterialFile"] as string;
                    string spineMeshFile = infoTable["spineMeshFile"] as string;
                    string spineMaterialFile = infoTable["spineMaterialFile"] as string;
                    string spine2MeshFile = infoTable["spine2MeshFile"] as string;
                    string spine2MaterialFile = infoTable["spine2MaterialFile"] as string;

                    // 获取模型文件路径
                    EngineLayer.ATLBase.LoadNpcModel(modelFile);

                    // 要先播普通待机动作才能看到脸部插槽
                    // string commonStandbyAnimationFileName = GetCommonStandbyAnimationFileName(modelFile);
                    // if (commonStandbyAnimationFileName != null)
                    // {
                    //     EngineLayer.ATLBase.ModelPlayAnimation(commonStandbyAnimationFileName);
                    // }

                    if (faceMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadFace(faceMeshFile);
                    }

                    if (hatMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(hatMeshFile, "s_hat");
                    }

                    if (leftHandMeshFile  != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(leftHandMeshFile, "s_lh");
                    }

                    if (lpMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(lpMeshFile, "s_lp");
                    }

                    if (lcMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(lcMeshFile, "s_lc");
                    }

                    if (hatMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(hatMeshFile, "s_hat");
                    }

                    if (rightHandMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(rightHandMeshFile, "s_rh");
                    }

                    if (rpMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(rpMeshFile, "s_rp");
                    }

                    if (rcMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(rcMeshFile, "s_rc");
                    }

                    if (longMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(longMeshFile, "s_long");
                    }

                    if (spineMeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(spineMeshFile, "s_spine");
                    }

                    if (spine2MeshFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginModel(spine2MeshFile, "s_spine2");
                    }

                    if (faceMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_face", faceMaterialFile);
                    }

                    if (hatMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_hat", hatMaterialFile);
                    }

                    if (leftHandMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_lh", leftHandMaterialFile);
                    }

                    if (lpMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_lp", lpMaterialFile);
                    }

                    if (lcMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_lc", lcMaterialFile);
                    }

                    if (rightHandMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_rh", rightHandMaterialFile);
                    }

                    if (rpMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_rp", rpMaterialFile);
                    }

                    if (rcMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_rc", rcMaterialFile);
                    }

                    if (longMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_long", longMaterialFile);
                    }

                    if (spineMaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_spine", spineMaterialFile);
                    }

                    if (spine2MaterialFile != "")
                    {
                        EngineLayer.ATLBase.LoadPluginMaterial("s_spine2", spine2MaterialFile);
                    }                    

                    previewCanvas1.BeginInit = true;

                    if (npcAnimationTable[currentNode] == null)
                    {
                        // 获取动作文件路径
                        string[] data = modelFile.Split(new char[] { '\\' });
                        string rootFolder = "";
                        for (int i = 0; i < data.Length - 2; i++)
                        {
                            rootFolder += string.Format("{0}\\", data[i]);
                        }
                        rootFolder = rootFolder + "动作";

                        DirectoryInfo di = new DirectoryInfo(rootFolder);
                        List<string> fileNameList = new List<string>();
                        if (di.Exists)
                        {
                            foreach (FileInfo fi in di.GetFiles())
                            {
                                if (fi.Extension == ".ani")
                                {
                                    fileNameList.Add(fi.FullName);
                                }
                            }
                        }

                        npcAnimationTable[currentNode] = fileNameList;
                        npcAnimationList = fileNameList;
                    }
                    else
                    {
                        npcAnimationList = npcAnimationTable[currentNode] as List<string>;
                    }

                    npcAnimationIndex = 0;
                    buttonX19.Enabled = true;
                    buttonX20.Enabled = true;

                    // 切换笔刷
                    DataRow row = npcInfoTable[currentNode] as DataRow;
                    int npcID = int.Parse(row["ID"].ToString());
                    string npcName = row["Name"].ToString();
                    EngineLayer.ATLBase.SwitchNpcBrush(npcID, npcName, 0, 0, 0);
                }

                labelX1.Text = "无动作";
            }
        }
예제 #34
0
        /// <summary>
        /// 显示分组的成员信息
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void ShowGroupMember(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode;
            Hashtable infoTable;
            string groupID;
            string groupName;
            DataGridViewRow newRow;

            groupView.Rows.Clear();
            npcView.Rows.Clear();

            switch(tabControl1.SelectedTab.Text)
            {
                case "重生组":
                    {
                        currentNode = reviveTree.SelectedNode;

                        if (currentNode != null && currentNode.Level == 1)
                        {
                            infoTable = currentNode.Tag as Hashtable;
                            groupID = infoTable["dwGroupID"] as string;
                            groupName = infoTable["szName"] as string;
                            string minCount = infoTable["nMinNpcCount"] as string;
                            string maxCount = infoTable["nMaxNpcCount"] as string;
                            string randomSeed = infoTable["nRandom"] as string;

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[0];
                            newRow.Cells["GroupInfoName"].Value = "名称";
                            newRow.Cells["GroupInfoValue"].Value = groupName;

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[1];
                            newRow.Cells["GroupInfoName"].Value = "MaxCount";
                            newRow.Cells["GroupInfoValue"].Value = maxCount;

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[2];
                            newRow.Cells["GroupInfoName"].Value = "MinCount";
                            newRow.Cells["GroupInfoValue"].Value = minCount;

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[3];
                            newRow.Cells["GroupInfoName"].Value = "Random";
                            newRow.Cells["GroupInfoValue"].Value = randomSeed;
                            newRow.ReadOnly = true; // Random不能被编辑

                            switch (currentNode.Parent.Text)
                            {
                                case "NPC":
                                    {
                                        ShowMemberInfo(npcInfoList, "ReliveID", groupID);
                                        break;
                                    }
                                case "Doodad":
                                    {
                                        ShowMemberInfo(doodadInfoList, "ReliveID", groupID);
                                        break;
                                    }
                                default:
                                    {
                                        break;
                                    }
                            }                            
                        }

                        break;
                    }
                case "仇恨组":
                    {
                        currentNode = aiTree.SelectedNode;

                        if (currentNode != null)
                        {
                            infoTable = currentNode.Tag as Hashtable;
                            groupID = infoTable["dwSetID"] as string;
                            groupName = infoTable["szName"] as string;

                            string infoString = "";
                            baseDoc.DocLogical.GetAIGroupInfo(int.Parse(groupID), ref infoString);

                            string[] dataArray = infoString.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                            int currentIndex = 0;

                            foreach (string s in dataArray)
                            {
                                Hashtable npcInfoTable = GetNpcInfoTable(s);

                                if (npcInfoTable != null)
                                {
                                    string npcName = npcInfoTable["szName"] as string;
                                    string npcTemplateID = npcInfoTable["nTempleteID"] as string;
                                    string npcIndex = npcInfoTable["nIndex"] as string;
                                    
                                    npcView.Rows.Add(1);
                                    newRow = npcView.Rows[currentIndex];
                                    newRow.Cells["NpcName"].Value = npcName;
                                    newRow.Cells["NpcTemplateID"].Value = npcTemplateID;
                                    newRow.Cells["NpcIndex"].Value = npcIndex;
                                    currentIndex++;                                    
                                }
                            }

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[0];
                            newRow.Cells["GroupInfoName"].Value = "名称";
                            newRow.Cells["GroupInfoValue"].Value = groupName;
                        }

                        break;
                    }
                case "随机组":
                    {
                        currentNode = randomTree.SelectedNode;

                        if (currentNode != null)
                        {
                            infoTable = currentNode.Tag as Hashtable;
                            groupID = infoTable["dwGroupID"] as string;
                            groupName = infoTable["szName"] as string;

                            ShowMemberInfo(npcInfoList, "RandomID", groupID);

                            string infoString = "";
                            baseDoc.DocLogical.GetRandomGroupInfo(int.Parse(groupID), ref infoString);

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[0];
                            newRow.Cells["GroupInfoName"].Value = "名称";
                            newRow.Cells["GroupInfoValue"].Value = groupName;

                            groupView.Rows.Add(1);
                            newRow = groupView.Rows[1];
                            newRow.Cells["GroupInfoName"].Value = "模板ID";
                            newRow.Cells["GroupInfoValue"].Value = infoString;
                        }                        

                        break;
                    }
                case "AI参数组":
                    {
                        currentNode = aiParameterTree.SelectedNode;

                        if (currentNode != null)
                        {
                            List<string[]> infoList = currentNode.Tag as List<string[]>;
                            int currentIndex = 0;

                            foreach (string[] infoArray in infoList)
                            {
                                string npcName = infoArray[0];
                                string npcTemplateID = infoArray[2];
                                string npcIndex = infoArray[1];

                                npcView.Rows.Add(1);
                                newRow = npcView.Rows[currentIndex];
                                newRow.Cells["NpcName"].Value = npcName;
                                newRow.Cells["NpcTemplateID"].Value = npcTemplateID;
                                newRow.Cells["NpcIndex"].Value = npcIndex;
                                currentIndex++;
                            }                            

                            int aiSetID = GetAIParameterSetID(currentNode.Text);

                            string infoString = "";
                            baseDoc.DocLogical.GetAIParameterSetInfo(aiSetID, ref infoString);
                            string[] tempArray = infoString.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);

                            foreach (string s in tempArray)
                            {
                                string[] dataArray = s.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);                                    

                                groupView.Rows.Add(1);
                                newRow = groupView.Rows[groupView.Rows.Count - 1];
                                newRow.Cells["GroupInfoName"].Value = dataArray[0];
                                newRow.Cells["GroupInfoValue"].Value = dataArray[1];
                                newRow.ReadOnly = true;
                            }                            
                        }

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }
예제 #35
0
 //  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< AMMO POOLS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  \\
 private void AmmoTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     try
     {
         AmmoPoolRemaining.Value = (decimal)CurrentWSG.RemainingPools[AmmoTree.SelectedIndex];
         AmmoSDULevel.Value = CurrentWSG.PoolLevels[AmmoTree.SelectedIndex];
     }
     catch { }
 }
예제 #36
0
 private void EchoTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     try
     {
         if (EchoTree.SelectedNode.Name == "PT2")
         {
             EchoDLCValue1.Value = CurrentWSG.EchoValuesPT2[EchoTree.SelectedIndex, 0];
             EchoDLCValue2.Value = CurrentWSG.EchoValuesPT2[EchoTree.SelectedIndex, 1];
         }
         else if (EchoTree.SelectedNode.Name == "PT1")
         {
             EchoDLCValue1.Value = CurrentWSG.EchoValues[EchoTree.SelectedIndex, 0];
             EchoDLCValue2.Value = CurrentWSG.EchoValues[EchoTree.SelectedIndex, 1];
         }
     }
     catch { }
 }
예제 #37
0
        /// <summary>
        /// 选择交通路径及交通点
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void advTree2_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = trafficTree.SelectedNode;
            beginEdit = false;
            dataGridViewX2.Rows.Clear();

            if (currentNode != null)
            {
                _AtlObjInfo objectInfo = (_AtlObjInfo)currentNode.Tag;
                Hashtable infoTable = Helper.GetInfoTable(objectInfo);
                List<string> fieldList = new List<string>();
                List<string> displayFieldList = new List<string>();
                Node cameraNode = currentNode;

                if (currentNode.Level == 1)
                {
                    fieldList.Add("vPosition");
                    displayFieldList.Add("位置");

                    cameraNode = currentNode;
                }
                else
                {
                    fieldList.Add("szName");
                    displayFieldList.Add("路径名");
                    fieldList.Add("m_dwCostMoney");
                    displayFieldList.Add("耗费金钱");
                    fieldList.Add("m_dwVelocity");
                    displayFieldList.Add("VeloCity");
                    fieldList.Add("m_dwStep");
                    displayFieldList.Add("小球间距");
                    fieldList.Add("m_dwFromID");
                    displayFieldList.Add("FromID");
                    fieldList.Add("m_dwToID");
                    displayFieldList.Add("ToID");

                    if (currentNode.Nodes.Count > 0)
                    {
                        cameraNode = currentNode.Nodes[0];
                    }
                }

                // 刷新属性框
                for (int i = 0; i < fieldList.Count; i++)
                {
                    dataGridViewX2.Rows.Add(1);
                    DataGridViewRow newRow = dataGridViewX2.Rows[i];
                    newRow.HeaderCell.Value = displayFieldList[i];
                    newRow.Cells["ArgumentValue"].Value = infoTable[fieldList[i]];
                    newRow.Cells["ArgumentValue"].Tag = infoTable[fieldList[i]];
                    newRow.Tag = fieldList[i];
                }

                // 移动摄像机位置
                if (cameraNode != null)
                {
                    m_doc.DocLogical.GetObjDisplayInfo("TrafficLittlePoint", cameraNode.Index, cameraNode.Parent.Index, ref name, ref nickName, ref hasScript, ref representObj, ref logicObj, ref templateID);
                    MoveCameraToRepresentObj(representObj);
                    SelectOnlyRepresentObj(representObj);                   
                }
            }

            beginEdit = true;
        }
예제 #38
0
 private void advTree_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
 {
     FixControl();
 }