Esempio n. 1
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 = "";
            }
        }
Esempio n. 2
0
 private void AdvTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     if (isBankPicker)
     {
         SelectedBank           = e.Node?.Tag as CustomModelBank;
         buttonX_Select.Enabled = SelectedBank != null;
     }
     else
     {
         Model = e.Node?.Tag as CustomModelConfig;
         buttonX_Select.Enabled = Model != null;
     }
 }
Esempio n. 3
0
        // G U I

        private void ScriptTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node.Parent == nGeolayoutScripts)
            {
                ShowGeolayoutScript((int)e.Node.Tag);
            }
            else if (e.Node.Name.StartsWith(nDisplaylistScripts.Name) && e.Node.Tag is int[])
            {
                ShowDisplaylistScript((int[])e.Node.Tag);
            }
            else
            {
                RichTextBoxEx_Script.Text = string.Empty;
            }
        }
Esempio n. 4
0
 private void advTree_licenseList_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     //if (e.Node != null)
     //{
     //    LicenseClass license = new LicenseClass(int.Parse(e.Node.Tag.ToString()));
     //    webBrowser1.DocumentText = license.getHtml();
     //    lastSelectNode = e.Node;
     //}
     //else
     //{
     //    LicenseClass license = new LicenseClass(int.Parse(lastSelectNode.Tag.ToString()));
     //    advTree_licenseList.SelectedNode = lastSelectNode;
     //    webBrowser1.DocumentText = license.getHtml();
     //}
 }
Esempio n. 5
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)
            {
                //
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 注册事件切换
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void advTree2_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node currentNode = registedEventTree.SelectedNode;

            if (currentNode != null)
            {
                AI_Event aiEvent     = currentNode.Tag as AI_Event;
                string   description = aiEvent.Info;

                if (string.IsNullOrEmpty(description))
                {
                    description = aiEvent.Name;
                }

                informationBox.Text = description;
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 树节点 选择打印日期
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvTimes_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node selectNode = this.tvTimes.SelectedNode;

            if (selectNode != null && this.tvTimes.Nodes.Count > 1)
            {
                if (selectNode.Text == "显示全部")
                {
                    this.isAll                   = true;
                    this.ppcPreview.Rows         = this.tvTimes.Nodes.Count - 1;
                    this.pdDocument.DocumentName = (this.tvTimes.Nodes.Count - 1).ToString();
                }
                else
                {
                    this.isAll = false;
                    string   tempString   = selectNode.Text;
                    string   temp         = tempString.Split('(')[1].ToString();
                    string   howWeek      = tempString.Split('(')[0].ToString();
                    string   weeks        = howWeek.Substring(1, howWeek.Length - 2);
                    string[] startEndDate = temp.Substring(0, temp.Length - 1).Split('~');
                    this.startTime = startEndDate[0];
                    this.endTime   = startEndDate[1];
                    if (isChild)
                    {
                        phChild.PageIndex   = selectNode.Index + 1;
                        phChild.User["科室:"] = TemperatureMethod.GetSection(phChild.User["编号:"], phChild.PageIndex.ToString());
                        //phChild.User["床号:"] = TemperatureMethod.GetTransferBed(this.pid, phChild.PageIndex.ToString(), this.bedNo);
                        //ph.User["诊断:"] = TemperatureMethod.GetDiagnose(this.pid);
                    }
                    else
                    {
                        ph.PageIndex = selectNode.Index + 1;
                        //ph.User["床号:"] = TemperatureMethod.GetTransferBed(this.pid, ph.PageIndex.ToString(), this.bedNo);
                        //ph.User["诊断:"] = TemperatureMethod.GetDiagnose(this.pid);
                        ph.User["科室:"] = TemperatureMethod.GetSection(ph.User["编号:"], ph.PageIndex.ToString());
                        ph.User["病区:"] = App.UserAccount.CurrentSelectRole.Role_type == "N" ? ph.User["病区:"] :
                                         TemperatureMethod.GetSection(this.id, ph.PageIndex.ToString());
                    }
                    this.ppcPreview.Rows         = 1;
                    this.pdDocument.DocumentName = "1";
                }
                this.ppcPreview.InvalidatePreview();
            }
        }
        /// <summary>
        /// 选中统计大类
        /// </summary>
        /// <param name="sender">控件</param>
        /// <param name="e">参数</param>
        private void treeStat_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node == null)
            {
                return;
            }

            Basic_CenterStatItem item = e.Node.Tag as Basic_CenterStatItem;

            if (item.DelFlag == 0)
            {
                btnStop.Text = "停用";
            }
            else
            {
                btnStop.Text = "启用";
            }

            bar1.Refresh();
        }
Esempio n. 9
0
        /// <summary>
        /// 选中统计大类
        /// </summary>
        /// <param name="sender">控件</param>
        /// <param name="e">参数</param>
        private void treeStat_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            if (e.Node == null)
            {
                return;
            }

            Basic_CenterStatItem item = e.Node.Tag as Basic_CenterStatItem;

            currStatItem             = new Basic_StatItem();
            currStatItem.ID          = getsubitemId(item.StatID);
            currStatItem.StatID      = item.StatID;
            currStatItem.StatName    = item.StatName;
            currStatItem.AccItemID   = getsubclassId(1, item.StatID);
            currStatItem.CostItemID  = getsubclassId(2, item.StatID);
            currStatItem.BaItemID    = getsubclassId(3, item.StatID);
            currStatItem.PoItemID    = getsubclassId(4, item.StatID);
            currStatItem.OutFpItemID = getsubclassId(5, item.StatID);
            currStatItem.InFpItemID  = getsubclassId(6, item.StatID);
            frmFormItem.Load(currStatItem);
        }
Esempio n. 10
0
        /// <summary>
        /// 树节点 选择打印日期
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvTimes_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            Node selectNode = this.tvTimes.SelectedNode;

            if (selectNode != null)
            {
                panel1.AutoScrollPosition = new Point(0, 0);

                if (selectNode.Text == _txtDisplayAllNode)  //显示全部
                {
                    isAll = true;
                    this.ppcPreview.Rows         = this.tvTimes.Nodes.Count - 1;
                    this.pdDocument.DocumentName = (this.tvTimes.Nodes.Count - 1).ToString();
                }
                else
                {
                    isAll = false;
                    this.ppcPreview.Rows         = 1;
                    this.pdDocument.DocumentName = selectNode.Tag.ToString();

                    txtIndex.Text = selectNode.Tag.ToString();
                    //初始化一周体温单的开始和结束时间this.startDate, this.endDate
                    string tempString = selectNode.Text;
                    StarToEndTime(tempString);

                    currentPage.Objs      = new List <ClsDataObj>();
                    currentPage.Starttime = startDate + " 00:00:00";
                    currentPage.Endtime   = endDate + " 23:59:59";

                    //模板赋值
                    tempetureDataComm.GetPageContentByPageObj_child(pat, ref currentPage, selectNode.Tag.ToString(), outTime, ref cm);
                }
                txtIndex.Enabled = btn_up.Enabled = btn_next.Enabled = label1.Enabled = label4.Enabled = !isAll;
                txtIndex.Visible = btn_up.Visible = btn_next.Visible = label1.Visible = label4.Visible = !isAll;
                this.ppcPreview.InvalidatePreview();
            }
        }
Esempio n. 11
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 = "无模型";
            }
        }
Esempio n. 12
0
 private void trvMenuOrButton_AfterNodeDeselect(object sender, AdvTreeNodeEventArgs e)
 {
 }
Esempio n. 13
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;
        }
Esempio n. 14
0
 private void treePara_AfterCollapse(object sender, AdvTreeNodeEventArgs e)
 {
 }
Esempio n. 15
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;
            }
            }
        }
Esempio n. 16
0
 private void advTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     TreeSelect();
 }
Esempio n. 17
0
 private void AdvTree_Objs_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     customObject = e.Node?.Tag as CustomObject;
     LoadObjectProps();
 }
Esempio n. 18
0
        private void TreeView_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            var item = (OfferedCourse)e.Node?.Tag;

            OnItemSelected(item);
        }
Esempio n. 19
0
 private void Tree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     SetListPanel(e.Node as KeyNode);
 }
Esempio n. 20
0
 private void adv_roleList_AfterNodeDeselect(object sender, AdvTreeNodeEventArgs e)
 {
     this.btn_roleDelete.Enabled = false;
     this.btn_roleModify.Enabled = false;
 }
        protected virtual void TreeView_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            var item = (Batch)e.Node?.Tag;

            OnItemSelected(item);
        }
Esempio n. 22
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;
        }
Esempio n. 23
0
        /// <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 = "无动作";
            }
        }
Esempio n. 24
0
 private void adv_realnameList_AfterNodeDeselect(object sender, AdvTreeNodeEventArgs e)
 {
     btn_edit.Enabled   = false;
     btn_delete.Enabled = false;
 }
Esempio n. 25
0
 private void AdvTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     Task.Run(() => LoadPosition((HUDOptionsBlock)e.Node.Tag));
 }
Esempio n. 26
0
        private void advTree1_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
        {
            txtContent.Text = "";
            if (trvDoctorBook.SelectedNode.Parent != null)
            {
                XmlDocument tempXml = new XmlDocument();
                if (trvDoctorBook.SelectedNode.Tag.GetType().ToString().Contains("Class_Text"))
                {
                    Class_Text text = this.trvDoctorBook.SelectedNode.Tag as Class_Text;

                    if (text.Issimpleinstance == "1")           //多例
                    {
                        StringBuilder strBuilder = new StringBuilder();
                        int           i          = 1;
                        foreach (Node node in trvDoctorBook.SelectedNode.Nodes)
                        {
                            Patient_Doc pDoc = node.Tag as Patient_Doc;
                            string      xml  = GetSelectNodes(pDoc);
                            if (xml != null && xml != string.Empty)
                            {
                                tempXml.LoadXml(xml);
                                StringBuilder builder  = new StringBuilder();
                                XmlNodeList   xmlNodes = tempXml.SelectNodes("emrtextdoc/body/span");
                                tempXml.GetElementsByTagName("span");
                                foreach (XmlNode childNode in xmlNodes)
                                {
                                    builder.Append(childNode.InnerText);
                                }
                                strBuilder.Append(text.Textname + ":子文书" + i.ToString() + "\r\n" + builder.ToString() + "\r\n");
                                i++;
                            }
                        }
                        txtContent.Text = strBuilder.ToString();
                    }
                    else
                    {
                        string xml = GetSelectNodes(text);
                        if (xml != null && xml != string.Empty)
                        {
                            tempXml.LoadXml(xml);
                            XmlNodeList xmlNodes = tempXml.SelectNodes("emrtextdoc/text"); //body/span
                            foreach (XmlNode node in xmlNodes)
                            {
                                txtContent.Text += node.InnerText + "\r\n";
                            }
                        }
                    }
                }
                else if (trvDoctorBook.SelectedNode.Tag.GetType().ToString().Contains("Patient_Doc"))
                {
                    Patient_Doc pDoc = this.trvDoctorBook.SelectedNode.Tag as Patient_Doc;
                    string      xml  = GetSelectNodes(pDoc);
                    if (xml != null && xml != string.Empty)
                    {
                        tempXml.LoadXml(xml);
                        XmlNodeList xmlNodes = tempXml.SelectNodes("emrtextdoc/body/span");
                        foreach (XmlNode node in xmlNodes)
                        {
                            txtContent.Text += node.InnerText;
                        }
                    }
                }
            }
        }
Esempio n. 27
0
 private void AdvTree_Codes_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     SetSelectedAsm(e.Node?.Tag as CustomAsmArea);
 }
Esempio n. 28
0
 /// <summary>
 /// 选择树结点之后
 /// </summary>
 /// <param name="sender">事件发送者</param>
 /// <param name="e">事件参数</param>
 private void guideTree_AfterNodeSelect(object sender, AdvTreeNodeEventArgs e)
 {
     LoadRecord();
     lastSelectedNode = guideTree.SelectedNode;
 }
Esempio n. 29
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);
                }
            }
        }