コード例 #1
0
        private void SetTreeViewData(TreeNode startNode, NanoD2dCollection controls)
        {
            foreach (var control in controls)
            {
                TreeNode tmpNode = new TreeNode(control.Name)
                {
                    Tag = control
                };

                if (startNode == null)
                {
                    treeView1.Nodes.Add(tmpNode);
                }
                else
                {
                    startNode.Nodes.Add(tmpNode);
                }

                if (control is NanoD2dCollection subControls)
                {
                    SetTreeViewData(tmpNode, subControls);
                }
            }
        }
コード例 #2
0
ファイル: SettingData.cs プロジェクト: Hot-key/NanoWallpaper
 public static void SaveWallPaperSetting(NanoD2dCollection mainForm)
 {
     File.WriteAllText(SettingData.FormFilePos, mainForm.OnSave().ToString());
 }