コード例 #1
0
        void txtPath_Leave(object sender, EventArgs e)
        {
            TreeNode curNode = tvAllViews.SelectedNode;

            if (curNode == null)
            {
                return;
            }

            VDView view = getViewFromNode(curNode);

            if (view == null)
            {
                return;
            }

            string curPath = SettingsHelper.getViewPathFromView(view, m_rootViewPath);
            string newPath = this.txtPath.Text;

            // path not changed
            if (string.Compare(curPath, newPath, true) == 0)
            {
                return;
            }

            if (string.IsNullOrEmpty(newPath))
            {
                SettingsHelper.saveViewPathToView(string.Empty, view, m_rootViewPath);
            }
            else
            {
                SettingsHelper.saveViewPathToView(newPath, view, m_rootViewPath);
            }
        }
コード例 #2
0
        internal void initTreeView(VDView rootView, string rootViewPath)
        {
            m_rootViewPath = rootViewPath;

            tvAllViews.Nodes.Clear();
            TreeNode rootNode = new TreeNode(rootView.WidgetName);
            saveViewToNode(rootNode, rootView);
            tvAllViews.Nodes.Add(rootNode);
            createTreeNode(rootView, rootNode);
        }
コード例 #3
0
 private static void createTreeNode(VDView parentView, TreeNode parentNode)
 {
     List<VDView> childViews = parentView.GetChildren<VDView>();
     foreach (VDView cv in childViews)
     {
         TreeNode cn = new TreeNode(cv.WidgetName);
         saveViewToNode(cn, cv);
         parentNode.Nodes.Add(cn);
         createTreeNode(cv, cn);
     }
 }
コード例 #4
0
        internal void initTreeView(VDView rootView, string rootViewPath)
        {
            m_rootViewPath = rootViewPath;

            tvAllViews.Nodes.Clear();
            TreeNode rootNode = new TreeNode(rootView.WidgetName);

            saveViewToNode(rootNode, rootView);
            tvAllViews.Nodes.Add(rootNode);
            createTreeNode(rootView, rootNode);
        }
コード例 #5
0
        static private void createTreeNode(VDView parentView, TreeNode parentNode)
        {
            List <VDView> childViews = parentView.GetChildren <VDView>();

            foreach (VDView cv in childViews)
            {
                TreeNode cn = new TreeNode(cv.WidgetName);
                saveViewToNode(cn, cv);
                parentNode.Nodes.Add(cn);
                createTreeNode(cv, cn);
            }
        }
コード例 #6
0
        internal void initView(VDView rootView, string rootViewPath)
        {
            m_rootViewPath = rootViewPath;
            m_rootView = rootView;

            if (m_rootView != null)
            {
                string path = SettingsHelper.getCSModelPathFromView(rootView, m_rootViewPath);
                if (string.IsNullOrEmpty(path))
                    this.txtPath.Text = string.Empty;
                else
                    this.txtPath.Text = path;
            }
        }
コード例 #7
0
        void tvAllViews_AfterSelect(object sender, TreeViewEventArgs e)
        {
            VDView view = getViewFromNode(e.Node);

            if (view != null)
            {
                string path = SettingsHelper.getViewPathFromView(view, m_rootViewPath);
                if (string.IsNullOrEmpty(path))
                {
                    this.txtPath.Text = string.Empty;
                }
                else
                {
                    this.txtPath.Text = path;
                }
            }
        }
コード例 #8
0
        internal void initView(VDView rootView, string rootViewPath)
        {
            m_rootViewPath = rootViewPath;
            m_rootView     = rootView;

            if (m_rootView != null)
            {
                string path = SettingsHelper.getCSModelPathFromView(rootView, m_rootViewPath);
                if (string.IsNullOrEmpty(path))
                {
                    this.txtPath.Text = string.Empty;
                }
                else
                {
                    this.txtPath.Text = path;
                }
            }
        }
コード例 #9
0
 private static void saveViewToNode(TreeNode node, VDView view)
 {
     node.Tag = view;
 }
コード例 #10
0
 static private void saveViewToNode(TreeNode node, VDView view)
 {
     node.Tag = view;
 }