private void UISelect_Click(object sender, RoutedEventArgs e)
        {
            mCreateData.ResourceName = UIName.Text;
            if (UIList.SelectedItem == null)
            {
                DialogResult          = true;
                mCreateData.ClassType = typeof(EngineNS.Bricks.Particle.McParticleEffector);
                mMacrossResourceInfo.BaseTypeSaveName = mCreateData.ClassType.FullName;
                //HostResourceInfo.
                this.Close();
                return;
            }

            EditorCommon.TreeListView.TreeNode treenode = UIList.SelectedItem as EditorCommon.TreeListView.TreeNode;
            BindData data = treenode.Tag as BindData;

            if (data == null)
            {
                DialogResult = true;
                this.Close();
                return;
            }
            mCreateData.TemplateName = data.FileName;

            DialogResult = true;
            this.Close();
        }
Beispiel #2
0
        private void Button_SaveXls(object sender, System.Windows.RoutedEventArgs e)
        {
            //rinfo为空后不可用
            if (mExcelResourceInfo == null)
            {
                return;
            }

            if (UIMacrossTrees.SelectedItem == null)
            {
                return;
            }

            Type type = UIMacrossTrees.SelectedItem.GetType();

            EditorCommon.TreeListView.TreeNode TreeModel = UIMacrossTrees.SelectedItem as EditorCommon.TreeListView.TreeNode;
            BindData data = TreeModel.Tag as BindData;

            //ExcelExporter export = new ExcelExporter();
            //export.CreateHeaderForSheet(0, data._Type);
            //export.Save(mExcelResourceInfo.ResourceName.Address);
            mCreateData.MacrossName = data.MacrossName;
            mCreateData.ExcelName   = UIName.Text;
            DialogResult            = true;
            //PropertyInfo[] propertys = data._Type.GetProperties();
            //foreach (var i in propertys)
            //{
            //    export.a
            //}
        }
        private void UIList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (UIList.SelectedItem == null)
            {
                return;
            }

            EditorCommon.TreeListView.TreeNode treenode = UIList.SelectedItem as EditorCommon.TreeListView.TreeNode;
            BindData data = treenode.Tag as BindData;

            if (data == null)
            {
                return;
            }

            UITemplate.Text = data.FileName;
        }
        private void Button_Select(object sender, System.Windows.RoutedEventArgs e)
        {
            if (UIList.SelectedItem == null)
            {
                this.Close();
                return;
            }


            EditorCommon.TreeListView.TreeNode treenode = UIList.SelectedItem as EditorCommon.TreeListView.TreeNode;
            BindData data = treenode.Tag as BindData;

            if (data == null)
            {
                return;
            }
            CurrentParticleShape = data;
            this.Close();
        }
        private void Button_Select(object sender, System.Windows.RoutedEventArgs e)
        {
            if (UIAttribute.SelectedItem == null)
            {
                this.Close();
                return;
            }

            foreach (var item in UIAttribute.SelectedItems)
            {
                EditorCommon.TreeListView.TreeNode treenode = item as EditorCommon.TreeListView.TreeNode;
                BindData data = treenode.Tag as BindData;
                if (data == null)
                {
                    continue;
                }
                CurrentAttributeTypes.Add(data.Host);
            }

            this.Close();
        }
        private void TreeView_SelectionChanged(object sender, RoutedEventArgs e)
        {
            UIDevice.Visibility = Visibility.Collapsed;
            if (UIDevice.SelectedItem == null)
            {
                return;
            }

            EditorCommon.TreeListView.TreeNode node = UIDevice.SelectedItem as EditorCommon.TreeListView.TreeNode;
            if (node == null)
            {
                return;
            }

            BindData data = node.Tag as BindData;

            if (data == null)
            {
                return;
            }

            UIName.Text = data.ShowName;
        }
        private void TreeViewActors_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (UITrees.SelectedIndex < 0)
            {
                return;
            }


            EditorCommon.TreeListView.TreeNode node = UITrees.SelectedItem as EditorCommon.TreeListView.TreeNode;
            if (node == null)
            {
                return;
            }

            BindData data = node.Tag as BindData;

            if (data == null)
            {
                return;
            }

            UIProperty.SetValue(data.Value);
        }