OSDN Git Service

Signed-off-by: AndouTomo <tomando.clar02@gmail.com> master
authorAndouTomo <tomando.clar02@gmail.com>
Sun, 17 Mar 2013 12:13:23 +0000 (21:13 +0900)
committerAndouTomo <tomando.clar02@gmail.com>
Sun, 17 Mar 2013 12:13:23 +0000 (21:13 +0900)
38 files changed:
Controller/NodeController.cs [new file with mode: 0644]
Controller/OpmlApplicationException.cs [new file with mode: 0644]
MainLogic.cs [new file with mode: 0644]
OPMLEditor.csproj [new file with mode: 0644]
OPMLEditor.sln [new file with mode: 0644]
OPMLEditor.suo [new file with mode: 0644]
Properties/AssemblyInfo.cs [new file with mode: 0644]
Properties/DataSources/OPMLEditor.Structure.StructureBase.datasource [new file with mode: 0644]
Properties/Resources.Designer.cs [new file with mode: 0644]
Properties/Resources.resx [new file with mode: 0644]
Properties/Settings.Designer.cs [new file with mode: 0644]
Properties/Settings.settings [new file with mode: 0644]
Properties/app.manifest [new file with mode: 0644]
Structure/StructureNode.cs [new file with mode: 0644]
Structure/StructurePanel.cs [new file with mode: 0644]
app.config [new file with mode: 0644]
export/ExportController.cs [new file with mode: 0644]
export/ExportIF.cs [new file with mode: 0644]
export/NumericTextExporter.cs [new file with mode: 0644]
export/TabTextExporter.cs [new file with mode: 0644]
export/abTextExporter.cs [new file with mode: 0644]
forms/FrmBase.Designer.cs [new file with mode: 0644]
forms/FrmBase.cs [new file with mode: 0644]
forms/FrmBase.resx [new file with mode: 0644]
forms/FrmCredit.Designer.cs [new file with mode: 0644]
forms/FrmCredit.cs [new file with mode: 0644]
forms/FrmCredit.resx [new file with mode: 0644]
forms/FrmNote.Designer.cs [new file with mode: 0644]
forms/FrmNote.cs [new file with mode: 0644]
forms/FrmNote.resx [new file with mode: 0644]
forms/FrmSearch.Designer.cs [new file with mode: 0644]
forms/FrmSearch.cs [new file with mode: 0644]
forms/FrmSearch.resx [new file with mode: 0644]
manual.opml [new file with mode: 0644]
opml.ico [new file with mode: 0644]
opml/OpmlParser.cs [new file with mode: 0644]
opml/OpmlStructure.cs [new file with mode: 0644]
opml2.ico [new file with mode: 0644]

diff --git a/Controller/NodeController.cs b/Controller/NodeController.cs
new file mode 100644 (file)
index 0000000..910b909
--- /dev/null
@@ -0,0 +1,395 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.Structure;\r
+using OPMLEditor.Forms;\r
+\r
+namespace OPMLEditor.Controller\r
+{\r
+    class NodeController\r
+    {\r
+        private List<StructureNode> parentList;\r
+        private FrmBase frontWindow;\r
+\r
+        private List<StructureNode> redoBackup;\r
+        private StructureNode bkSelectedNode;\r
+        \r
+        private StructureNode selectedNode;\r
+        private StructureNode focusNode;\r
+        \r
+        private static NodeController singleton;\r
+\r
+        public static NodeController getNodeController()\r
+        {\r
+            if (singleton == null)\r
+            {\r
+                singleton = new NodeController();\r
+            }\r
+            return singleton;\r
+        }\r
+        /// <summary>\r
+        /// ノードコントローラをリセットする。\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public NodeController resetNodeController()\r
+        {\r
+            singleton = new NodeController();\r
+            return singleton;\r
+        }\r
+\r
+        private NodeController()\r
+        {\r
+            parentList = new List<StructureNode>();\r
+            \r
+\r
+            StructureNode data = new StructureNode(this);\r
+            data.TitleText = string.Empty;\r
+            parentList.Add(data);\r
+\r
+        }\r
+\r
+\r
+        public List<StructureNode> ParentList\r
+        {\r
+            get { return parentList; }\r
+            set { parentList = value; }\r
+        }\r
+        public FrmBase FrontWindow\r
+        {\r
+            set { frontWindow = value; }\r
+        }\r
+        public StructureNode FocusData\r
+        {\r
+            get { return focusNode; }\r
+        }\r
+        public StructureNode SelectedNode\r
+        {\r
+            get { return selectedNode; }\r
+            set { this.selectedNode = value; }\r
+        }\r
+\r
+        private void reflesh(StructureNode focusData)\r
+        {\r
+            resetSearch();\r
+            this.focusNode = focusData;\r
+            frontWindow.refleshNode();\r
+        }\r
+\r
+\r
+        #region backup/undo\r
+        public void undo()\r
+        {\r
+            resetSearch();\r
+            parentList = redoBackup;\r
+\r
+            selectedNode = bkSelectedNode;\r
+            focusNode = bkSelectedNode;\r
+            frontWindow.refleshNode();\r
+\r
+            //フロントのUndo機能をOffにする\r
+            frontWindow.undoToolControl(false);\r
+        }\r
+        private void backup()\r
+        {\r
+            redoBackup = new List<StructureNode>();\r
+            foreach (StructureNode current in parentList)\r
+            {\r
+                StructureNode bkup = current.clone();\r
+                if (current == selectedNode) { bkSelectedNode = bkup; }\r
+                recursiveBackup(bkup, current);\r
+                redoBackup.Add(bkup);\r
+            }\r
+            //フロントのUndo機能をOnにする\r
+            frontWindow.undoToolControl(true);\r
+\r
+        }\r
+        private void recursiveBackup(StructureNode bkupData, StructureNode currentData)\r
+        {\r
+            foreach (StructureNode currentChild in currentData.getAllChildlen())\r
+            {\r
+                StructureNode bkChild = currentChild.clone(bkupData);\r
+                if (currentChild == selectedNode) { bkSelectedNode = bkChild; }\r
+\r
+                recursiveBackup(bkChild, currentChild);\r
+                bkupData.addChild(bkChild);\r
+            }\r
+        }\r
+        #endregion\r
+\r
+\r
+        #region search\r
+        private List<StructureNode> searchResult;\r
+        public void search(string target)\r
+        {\r
+            searchResult = new List<StructureNode>();\r
+            foreach (StructureNode node in parentList)\r
+            {\r
+                if (node.TitleText.Contains(target) || node.Note.Contains(target))\r
+                {\r
+                    searchResult.Add(node);\r
+                    node.becomeSearchResult(true);\r
+\r
+                }\r
+                else\r
+                {\r
+                    node.becomeSearchResult(false);\r
+                }\r
+                recursiveSearch(node,target);\r
+            }\r
+            if (searchResult.Count == 0) { return; }\r
+            \r
+            currentTarget = searchResult[0];\r
+            searchTarget(currentTarget);\r
+        }\r
+        private void recursiveSearch(StructureNode parent,string target)\r
+        {\r
+            foreach(StructureNode child in parent.getAllChildlen())\r
+            {\r
+                if (child.TitleText.Contains(target) || child.Note.Contains(target))\r
+                {\r
+                    searchResult.Add(child);\r
+                    child.becomeSearchResult(true);\r
+                }\r
+                else\r
+                {\r
+                    child.becomeSearchResult(false);\r
+                }\r
+                recursiveSearch(child,target);\r
+            }\r
+            \r
+        }\r
+        public void resetSearch()\r
+        {\r
+            if (searchResult == null) { return; }\r
+            foreach (StructureNode sTarget in searchResult)\r
+            {\r
+                sTarget.becomeSearchResult(false);\r
+            }\r
+            searchResult=new List<StructureNode>();\r
+        }\r
+        private StructureNode currentTarget;\r
+        public void searchPrev()\r
+        {\r
+            if (searchResult == null || searchResult.Count == 0) { return; }\r
+            if (searchResult.IndexOf(currentTarget) == 0) { return; }\r
+            searchTarget(searchResult[searchResult.IndexOf(currentTarget)-1]);\r
+        }\r
+        public void searchNext()\r
+        {\r
+            if (searchResult == null || searchResult.Count == 0) { return; }\r
+            if (searchResult.IndexOf(currentTarget) == searchResult.Count - 1) { return; }\r
+            searchTarget(searchResult[searchResult.IndexOf(currentTarget) + 1]);\r
+        }\r
+        private void searchTarget(StructureNode node)\r
+        {\r
+            StructureNode target = searchResult[searchResult.IndexOf(node)];\r
+            currentTarget = target;\r
+            target.Panel.NodeTitle.Focus();\r
+            this.selectedNode = target;\r
+            \r
+        }\r
+\r
+        #endregion\r
+\r
+        #region NodeControl\r
+        public void addNodes()\r
+        {\r
+            backup();\r
+            if (selectedNode == null) return;\r
+            StructureNode newNode = new StructureNode(this);\r
+\r
+            if (selectedNode.ParentNode != null)\r
+            {\r
+                newNode.ParentNode = selectedNode.ParentNode;\r
+                selectedNode.ParentNode.addChild(newNode);\r
+            }\r
+            else\r
+            {\r
+                newNode.ParentNode = null;\r
+                parentList.Add(newNode);\r
+            }\r
+            reflesh(newNode);\r
+\r
+            \r
+        }\r
+        public void addChild()\r
+        {\r
+            backup();\r
+            StructureNode childData = new StructureNode(this);\r
+            childData.ParentNode = selectedNode;\r
+            //childData.ElderNode = (from n in selectedNode.getAllChildlen() select n).LastOrDefault();\r
+            selectedNode.addChild(childData);\r
+\r
+            reflesh(childData);\r
+        }\r
+        public void becomeChild()\r
+        {\r
+            backup();\r
+            StructureNode becomePapa;\r
+            //if (selectedNode.ElderNode == null) return;\r
+\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if(parentList.IndexOf(selectedNode)==0) return;\r
+                becomePapa = parentList[parentList.IndexOf(selectedNode) - 1];\r
+                parentList.Remove(selectedNode);\r
+\r
+            }\r
+            else\r
+            {\r
+                becomePapa= selectedNode.ElderNode;\r
+                if (becomePapa == null) return;\r
+                selectedNode.ParentNode.removeChild(selectedNode);\r
+            }\r
+\r
+             \r
+            selectedNode.ParentNode = becomePapa;\r
+            //selectedNode.ElderNode = (from n in becomePapa.getAllChildlen() select n).LastOrDefault();\r
+\r
+            becomePapa.addChild(selectedNode);\r
+            reflesh(selectedNode);\r
+        }\r
+\r
+        public void becomeParent()\r
+        {\r
+            backup();\r
+            if (selectedNode.ParentNode == null) return;\r
+\r
+            StructureNode becomeElder = selectedNode.ParentNode;\r
+            StructureNode becomePapa = selectedNode.ParentNode.ParentNode;\r
+\r
+            selectedNode.ParentNode.removeChild(selectedNode);\r
+            if (becomePapa == null)\r
+            {\r
+                \r
+                selectedNode.ParentNode = null;\r
+                parentList.Insert(parentList.IndexOf(becomeElder)+1,selectedNode);\r
+                selectedNode.Indent = 0;\r
+            }\r
+            else\r
+            {\r
+                selectedNode.ParentNode = becomePapa;\r
+                //becomePapa.addChild(selectedNode);\r
+                becomePapa.insertChild(selectedNode,becomePapa.getAllChildlen().IndexOf(becomeElder)+1);\r
+            }\r
+            \r
+            reflesh(selectedNode);\r
+        }\r
+\r
+        public void turnUp()\r
+        {\r
+            backup();\r
+            //最上位階層\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if (parentList.IndexOf(selectedNode) == 0) return;\r
+                parentList.Reverse(parentList.IndexOf(selectedNode) - 1, 2);\r
+            }\r
+            //ノード内部\r
+            else\r
+            {\r
+                if(selectedNode.nodeIndex==0) return;\r
+                selectedNode.parentList.Reverse(selectedNode.nodeIndex-1, 2);\r
+            }\r
+            \r
+            reflesh(selectedNode);\r
+        }\r
+        public void turnDown()\r
+        {\r
+            backup();\r
+            //最上位階層\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if (parentList.IndexOf(selectedNode) < parentList.Count - 1)\r
+                {\r
+                    parentList.Reverse(parentList.IndexOf(selectedNode), 2);\r
+                }\r
+            }\r
+            //ノード内部\r
+            else\r
+            {\r
+                if (selectedNode.nodeIndex < selectedNode.parentList.Count-1)\r
+                {\r
+                    selectedNode.parentList.Reverse(selectedNode.nodeIndex, 2);\r
+                }\r
+            }\r
+            \r
+            reflesh(selectedNode);\r
+        }\r
+        public void deleteNode()\r
+        {\r
+            backup();\r
+            StructureNode elderData;\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if (parentList.Count > 1)\r
+                {\r
+                    elderData = parentList[parentList.IndexOf(selectedNode) - 1];\r
+                    parentList.Remove(selectedNode);\r
+                }\r
+                else\r
+                {\r
+                    return;\r
+                }\r
+            }\r
+            else\r
+            {\r
+                elderData = selectedNode.ElderNode;\r
+                selectedNode.ParentNode.removeChild(selectedNode);\r
+            }\r
+            reflesh(elderData);\r
+        }\r
+\r
+        public void changeNodeStatus()\r
+        {\r
+            selectedNode.IsChecked = !selectedNode.IsChecked;\r
+        }\r
+        #endregion\r
+\r
+        public void addNote()\r
+        {\r
+            selectedNode.Panel.invokeNoteWindow();\r
+        }\r
+\r
+        public void gotoNext()\r
+        {\r
+            //最上位階層\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if (parentList.IndexOf(selectedNode) < parentList.Count - 1)\r
+                {\r
+                    parentList[parentList.IndexOf(selectedNode)+1].Panel.NodeTitle.Focus();\r
+                }\r
+            }\r
+            //ノード内部\r
+            else\r
+            {\r
+                if (selectedNode.nodeIndex < selectedNode.parentList.Count - 1)\r
+                {\r
+                    selectedNode.parentList[selectedNode.nodeIndex+1].Panel.NodeTitle.Focus();\r
+                }\r
+            }\r
+        }\r
+        public void gotoPrev()\r
+        {\r
+            //最上位階層\r
+            if (selectedNode.ParentNode == null)\r
+            {\r
+                if (parentList.IndexOf(selectedNode) > 0)\r
+                {\r
+                    parentList[parentList.IndexOf(selectedNode) - 1].Panel.NodeTitle.Focus();\r
+                }\r
+            }\r
+            //ノード内部\r
+            else\r
+            {\r
+                if (selectedNode.nodeIndex>0)\r
+                {\r
+                    selectedNode.parentList[selectedNode.nodeIndex - 1].Panel.NodeTitle.Focus();\r
+                }\r
+            }\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/Controller/OpmlApplicationException.cs b/Controller/OpmlApplicationException.cs
new file mode 100644 (file)
index 0000000..35813df
--- /dev/null
@@ -0,0 +1,31 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.Controller\r
+{\r
+    class OpmlApplicationExceptionControl\r
+    {\r
+        public static void ErrorDialog()\r
+        {\r
+            MessageBox.Show(\r
+                "エラーが発生しました。頻発する場合は開発者までお問い合わせください。",\r
+                "エラー",\r
+                MessageBoxButtons.OK,\r
+                MessageBoxIcon.Error,\r
+                MessageBoxDefaultButton.Button1);\r
+        }\r
+\r
+        public static void ErrorDialog(string message)\r
+        {\r
+            System.Windows.Forms.MessageBox.Show(\r
+                message,\r
+                "エラー",\r
+                MessageBoxButtons.OK,\r
+                MessageBoxIcon.Error,\r
+                MessageBoxDefaultButton.Button1);\r
+        }\r
+    }\r
+}\r
diff --git a/MainLogic.cs b/MainLogic.cs
new file mode 100644 (file)
index 0000000..007680a
--- /dev/null
@@ -0,0 +1,33 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Windows.Forms;\r
+using OPMLEditor.Forms;\r
+\r
+namespace OPMLEditor\r
+{\r
+    static class MainLogic\r
+    {\r
+        /// <summary>\r
+        /// アプリケーションのメイン エントリ ポイントです。\r
+        /// </summary>\r
+        [STAThread]\r
+        static void Main()\r
+        {\r
+            Application.EnableVisualStyles();\r
+            Application.SetCompatibleTextRenderingDefault(false);\r
+            \r
+            string[] arguments = System.Environment.GetCommandLineArgs();\r
+\r
+\r
+            if (arguments.Length > 1)\r
+            {\r
+                Application.Run(new FrmBase(arguments[1]));\r
+            }\r
+            else\r
+            {\r
+                Application.Run(new FrmBase());\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/OPMLEditor.csproj b/OPMLEditor.csproj
new file mode 100644 (file)
index 0000000..b1bdca9
--- /dev/null
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
+    <ProductVersion>8.0.30703</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{C9702B1A-9080-4841-93CB-60640AFBB698}</ProjectGuid>\r
+    <OutputType>WinExe</OutputType>\r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>OPMLEditor</RootNamespace>\r
+    <AssemblyName>OPMLEditor</AssemblyName>\r
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>\r
+    <FileAlignment>512</FileAlignment>\r
+    <IsWebBootstrapper>false</IsWebBootstrapper>\r
+    <PublishUrl>D:\pgm\opmleditor\</PublishUrl>\r
+    <Install>true</Install>\r
+    <InstallFrom>Disk</InstallFrom>\r
+    <UpdateEnabled>false</UpdateEnabled>\r
+    <UpdateMode>Foreground</UpdateMode>\r
+    <UpdateInterval>7</UpdateInterval>\r
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
+    <UpdatePeriodically>false</UpdatePeriodically>\r
+    <UpdateRequired>false</UpdateRequired>\r
+    <MapFileExtensions>true</MapFileExtensions>\r
+    <TargetCulture>ja</TargetCulture>\r
+    <ApplicationRevision>6</ApplicationRevision>\r
+    <ApplicationVersion>0.1.1.%2a</ApplicationVersion>\r
+    <UseApplicationTrust>false</UseApplicationTrust>\r
+    <PublishWizardCompleted>true</PublishWizardCompleted>\r
+    <BootstrapperEnabled>false</BootstrapperEnabled>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DefineConstants>DEBUG</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <UseVSHostingProcess>false</UseVSHostingProcess>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <DebugType>pdbonly</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DefineConstants>\r
+    </DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>\r
+    <UseVSHostingProcess>false</UseVSHostingProcess>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <ManifestCertificateThumbprint>AA57F59488F05A65D952B73C7EC05A9DC0310304</ManifestCertificateThumbprint>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <ManifestKeyFile>OPMLEditor_TemporaryKey.pfx</ManifestKeyFile>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <GenerateManifests>true</GenerateManifests>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <SignManifests>false</SignManifests>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <ApplicationIcon>opml2.ico</ApplicationIcon>\r
+  </PropertyGroup>\r
+  <PropertyGroup />\r
+  <PropertyGroup />\r
+  <PropertyGroup>\r
+    <StartupObject>OPMLEditor.MainLogic</StartupObject>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <SignAssembly>false</SignAssembly>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <TargetZone>Internet</TargetZone>\r
+  </PropertyGroup>\r
+  <PropertyGroup />\r
+  <PropertyGroup />\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Core" />\r
+    <Reference Include="System.Xml.Linq" />\r
+    <Reference Include="System.Data.DataSetExtensions" />\r
+    <Reference Include="Microsoft.CSharp" />\r
+    <Reference Include="System.Data" />\r
+    <Reference Include="System.Deployment" />\r
+    <Reference Include="System.Drawing" />\r
+    <Reference Include="System.Windows.Forms" />\r
+    <Reference Include="System.Xml" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="Controller\NodeController.cs" />\r
+    <Compile Include="Controller\OpmlApplicationException.cs" />\r
+    <Compile Include="export\abTextExporter.cs" />\r
+    <Compile Include="export\ExportController.cs" />\r
+    <Compile Include="export\ExportIF.cs" />\r
+    <Compile Include="export\TabTextExporter.cs" />\r
+    <Compile Include="export\NumericTextExporter.cs" />\r
+    <Compile Include="forms\FrmBase.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="forms\FrmBase.Designer.cs">\r
+      <DependentUpon>FrmBase.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="forms\FrmCredit.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="forms\FrmCredit.Designer.cs">\r
+      <DependentUpon>FrmCredit.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="forms\FrmNote.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="forms\FrmNote.Designer.cs">\r
+      <DependentUpon>FrmNote.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="forms\FrmSearch.cs">\r
+      <SubType>Form</SubType>\r
+    </Compile>\r
+    <Compile Include="forms\FrmSearch.Designer.cs">\r
+      <DependentUpon>FrmSearch.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="MainLogic.cs" />\r
+    <Compile Include="opml\OpmlParser.cs" />\r
+    <Compile Include="opml\OpmlStructure.cs" />\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <Compile Include="Structure\StructureNode.cs" />\r
+    <Compile Include="Structure\StructurePanel.cs" />\r
+    <EmbeddedResource Include="forms\FrmBase.resx">\r
+      <DependentUpon>FrmBase.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="forms\FrmCredit.resx">\r
+      <DependentUpon>FrmCredit.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="forms\FrmNote.resx">\r
+      <DependentUpon>FrmNote.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="forms\FrmSearch.resx">\r
+      <DependentUpon>FrmSearch.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="Properties\Resources.resx">\r
+      <Generator>ResXFileCodeGenerator</Generator>\r
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
+    <Compile Include="Properties\Resources.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Resources.resx</DependentUpon>\r
+      <DesignTime>True</DesignTime>\r
+    </Compile>\r
+    <None Include="app.config" />\r
+    <None Include="manual.opml">\r
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+    </None>\r
+    <None Include="Properties\app.manifest" />\r
+    <None Include="Properties\DataSources\OPMLEditor.Structure.StructureBase.datasource" />\r
+    <None Include="Properties\Settings.settings">\r
+      <Generator>SettingsSingleFileGenerator</Generator>\r
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
+    </None>\r
+    <Compile Include="Properties\Settings.Designer.cs">\r
+      <AutoGen>True</AutoGen>\r
+      <DependentUpon>Settings.settings</DependentUpon>\r
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">\r
+      <Visible>False</Visible>\r
+      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 および x64%29</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">\r
+      <Visible>False</Visible>\r
+      <ProductName>.NET Framework 3.5 SP1</ProductName>\r
+      <Install>false</Install>\r
+    </BootstrapperPackage>\r
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">\r
+      <Visible>False</Visible>\r
+      <ProductName>Windows インストーラー 3.1</ProductName>\r
+      <Install>true</Install>\r
+    </BootstrapperPackage>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Content Include="opml.ico" />\r
+    <Content Include="opml2.ico">\r
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+    </Content>\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+</Project>
\ No newline at end of file
diff --git a/OPMLEditor.sln b/OPMLEditor.sln
new file mode 100644 (file)
index 0000000..a9e705c
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual C# Express 2010\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OPMLEditor", "OPMLEditor.csproj", "{C9702B1A-9080-4841-93CB-60640AFBB698}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|x86 = Debug|x86\r
+               Release|x86 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {C9702B1A-9080-4841-93CB-60640AFBB698}.Debug|x86.ActiveCfg = Debug|x86\r
+               {C9702B1A-9080-4841-93CB-60640AFBB698}.Debug|x86.Build.0 = Debug|x86\r
+               {C9702B1A-9080-4841-93CB-60640AFBB698}.Release|x86.ActiveCfg = Release|x86\r
+               {C9702B1A-9080-4841-93CB-60640AFBB698}.Release|x86.Build.0 = Release|x86\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/OPMLEditor.suo b/OPMLEditor.suo
new file mode 100644 (file)
index 0000000..e109e7e
Binary files /dev/null and b/OPMLEditor.suo differ
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..72f18dc
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。\r
+// アセンブリに関連付けられている情報を変更するには、\r
+// これらの属性値を変更してください。\r
+[assembly: AssemblyTitle("OPMLEditor")]\r
+[assembly: AssemblyDescription("OPML形式の構造化テキストエディタ")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("OPML Editor")]\r
+[assembly: AssemblyCopyright("Copyright © by AndouTomo 2013")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから \r
+// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、\r
+// その型の ComVisible 属性を true に設定してください。\r
+[assembly: ComVisible(false)]\r
+\r
+// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です\r
+[assembly: Guid("03ab22af-9545-4151-997d-2ac9d17899f9")]\r
+\r
+// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:\r
+//\r
+//      Major Version\r
+//      Minor Version \r
+//      Build Number\r
+//      Revision\r
+//\r
+// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を \r
+// 既定値にすることができます:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.1.6")]\r
+[assembly: AssemblyFileVersion("1.0.1.6")]\r
diff --git a/Properties/DataSources/OPMLEditor.Structure.StructureBase.datasource b/Properties/DataSources/OPMLEditor.Structure.StructureBase.datasource
new file mode 100644 (file)
index 0000000..8545b1b
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!--\r
+    This file is automatically generated by Visual Studio .Net. It is \r
+    used to store generic object data source configuration information.  \r
+    Renaming the file extension or editing the content of this file may   \r
+    cause the file to be unrecognizable by the program.\r
+-->\r
+<GenericObjectDataSource DisplayName="StructureBase" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">\r
+   <TypeInfo>OPMLEditor.Structure.StructureBase, OPMLEditor, Version=1.0.1.6, Culture=neutral, PublicKeyToken=null</TypeInfo>\r
+</GenericObjectDataSource>
\ No newline at end of file
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
new file mode 100644 (file)
index 0000000..1db2d26
--- /dev/null
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     このコードはツールによって生成されました。\r
+//     ランタイム バージョン:4.0.30319.296\r
+//\r
+//     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
+//     コードが再生成されるときに損失したりします。\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace OPMLEditor.Properties {\r
+    using System;\r
+    \r
+    \r
+    /// <summary>\r
+    ///   ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。\r
+    /// </summary>\r
+    // このクラスは StronglyTypedResourceBuilder クラスが ResGen\r
+    // または Visual Studio のようなツールを使用して自動生成されました。\r
+    // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に\r
+    // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]\r
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    internal class Resources {\r
+        \r
+        private static global::System.Resources.ResourceManager resourceMan;\r
+        \r
+        private static global::System.Globalization.CultureInfo resourceCulture;\r
+        \r
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
+        internal Resources() {\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Resources.ResourceManager ResourceManager {\r
+            get {\r
+                if (object.ReferenceEquals(resourceMan, null)) {\r
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OPMLEditor.Properties.Resources", typeof(Resources).Assembly);\r
+                    resourceMan = temp;\r
+                }\r
+                return resourceMan;\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、\r
+        ///   現在のスレッドの CurrentUICulture プロパティをオーバーライドします。\r
+        /// </summary>\r
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+        internal static global::System.Globalization.CultureInfo Culture {\r
+            get {\r
+                return resourceCulture;\r
+            }\r
+            set {\r
+                resourceCulture = value;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
new file mode 100644 (file)
index 0000000..ffecec8
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
new file mode 100644 (file)
index 0000000..ea1fce7
--- /dev/null
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+//     このコードはツールによって生成されました。\r
+//     ランタイム バージョン:4.0.30319.296\r
+//\r
+//     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
+//     コードが再生成されるときに損失したりします。\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace OPMLEditor.Properties {\r
+    \r
+    \r
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]\r
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
+        \r
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
+        \r
+        public static Settings Default {\r
+            get {\r
+                return defaultInstance;\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
new file mode 100644 (file)
index 0000000..abf36c5
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">\r
+  <Profiles>\r
+    <Profile Name="(Default)" />\r
+  </Profiles>\r
+  <Settings />\r
+</SettingsFile>\r
diff --git a/Properties/app.manifest b/Properties/app.manifest
new file mode 100644 (file)
index 0000000..f3aea84
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+  <assemblyIdentity version="1.0.0.0" name="MyApplication.app" />\r
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">\r
+    <security>\r
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">\r
+        <!-- UAC マニフェスト オプション\r
+            Windows のユーザー アカウント制御のレベルを変更するには、\r
+            requestedExecutionLevel ノードを以下のいずれかで置換します。\r
+\r
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />\r
+        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />\r
+        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />\r
+\r
+            requestedExecutionLevel ノードを指定すると、ファイルおよびレジストリの仮想化は無効になります。\r
+            旧バージョンとの互換性のためにファイルおよびレジストリの仮想化を\r
+            使用する場合は、requestedExecutionLevel ノードを削除します。\r
+        -->\r
+        <requestedExecutionLevel level="asInvoker" uiAccess="false" />\r
+      </requestedPrivileges>\r
+      <applicationRequestMinimum>\r
+        <defaultAssemblyRequest permissionSetReference="Custom" />\r
+        <PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />\r
+      </applicationRequestMinimum>\r
+    </security>\r
+  </trustInfo>\r
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">\r
+    <application>\r
+      <!-- このアプリケーションが動作するように設計されている、Windows のすべてのバージョンの一覧。Windows は最も互換性の高い環境を自動的に選択します。-->\r
+      <!-- アプリケーションが Windows 7 で動作するように設計されている場合は、次の supportedOS ノードのコメントを解除します。-->\r
+      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->\r
+    </application>\r
+  </compatibility>\r
+  <!-- Windows のコモン コントロールとダイアログのテーマを有効にします (Windows XP 以降) -->\r
+  <!-- <dependency>\r
+    <dependentAssembly>\r
+      <assemblyIdentity\r
+          type="win32"\r
+          name="Microsoft.Windows.Common-Controls"\r
+          version="6.0.0.0"\r
+          processorArchitecture="*"\r
+          publicKeyToken="6595b64144ccf1df"\r
+          language="*"\r
+        />\r
+    </dependentAssembly>\r
+  </dependency>-->\r
+</asmv1:assembly>
\ No newline at end of file
diff --git a/Structure/StructureNode.cs b/Structure/StructureNode.cs
new file mode 100644 (file)
index 0000000..6ae29c9
--- /dev/null
@@ -0,0 +1,288 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.Controller;\r
+\r
+namespace OPMLEditor.Structure\r
+{\r
+    /// <summary>\r
+    /// 階層テキストを管理するBean。一つの階層内に回帰的に同じクラスをもたせることで階層を管理する。\r
+    /// </summary>\r
+    class StructureNode\r
+    {\r
+        /// <summary>\r
+        /// タイトルテキスト\r
+        /// </summary>\r
+        private string titleText;\r
+        /// <summary>\r
+        /// ノート\r
+        /// </summary>\r
+        private string note;\r
+        /// <summary>\r
+        /// そのノードが開いているかどうか\r
+        /// </summary>\r
+        private bool isOpen;\r
+        /// <summary>\r
+        /// 子ノード\r
+        /// </summary>\r
+        private List<StructureNode> children;\r
+        /// <summary>\r
+        /// インデント\r
+        /// </summary>\r
+        private int indent;\r
+        /// <summary>\r
+        /// 親ノード情報\r
+        /// </summary>\r
+        private StructureNode parentNode;\r
+        /// <summary>\r
+        /// ノードコントローラ情報(コントロールに対しリセット等を依頼する)\r
+        /// </summary>\r
+        private NodeController ctrl;\r
+        /// <summary>\r
+        /// ノードを表現する画面パーツ群\r
+        /// </summary>\r
+        private StructurePanel panel;\r
+        /// <summary>\r
+        /// ノードがチェックされているかどうか\r
+        /// </summary>\r
+        private bool isChecked;\r
+\r
+        #region Constructor\r
+        public StructureNode(NodeController prmCtrl)\r
+        {\r
+            this.ctrl = prmCtrl;\r
+            children = new List<StructureNode>();\r
+            \r
+            titleText = string.Empty;\r
+            note = string.Empty;\r
+            \r
+            isOpen = true;\r
+            isChecked = false;\r
+            panel = new StructurePanel(this);\r
+        }\r
+\r
+        public StructureNode(NodeController prmCtrl,string prmText, string prmNote,bool prmIsChecked)\r
+        {\r
+            this.ctrl = prmCtrl;\r
+            children = new List<StructureNode>();\r
+            panel = new StructurePanel(this);\r
+\r
+            TitleText = prmText;\r
+            if (prmNote == null)\r
+            {\r
+                Note = string.Empty;\r
+            }\r
+            else\r
+            {\r
+                Note = prmNote.Replace("\n", "&#10;");\r
+            }\r
+            IsChecked = prmIsChecked;\r
+            IsOpen = true;\r
+\r
+        }\r
+\r
+        public StructureNode clone()\r
+        {\r
+            StructureNode cloneNode = new StructureNode(this.ctrl, titleText, note, isChecked);\r
+            cloneNode.IsOpen = isOpen;\r
+            cloneNode.Indent = indent;\r
+\r
+            return cloneNode;\r
+        }\r
+        public StructureNode clone(StructureNode parentNode)\r
+        {\r
+            StructureNode cloneNode = clone();\r
+            cloneNode.ParentNode = parentNode;\r
+\r
+            return cloneNode;\r
+        }\r
+\r
+        #endregion\r
+\r
+        #region getter/setter\r
+        public string TitleText\r
+        {\r
+            get { return titleText; }\r
+            set\r
+            {\r
+                titleText = value;\r
+                panel.NodeTitle.Text = titleText;\r
+            }\r
+        }\r
+        public string Note\r
+        {\r
+            get { return note; }\r
+            set \r
+            { \r
+                note = value;\r
+                panel.changeButton();\r
+            }\r
+        }\r
+\r
+        public bool IsOpen\r
+        {\r
+            get { return isOpen; }\r
+            set \r
+            {\r
+                isOpen = value;\r
+                panel.ChkVisible.Checked = isOpen;\r
+                panel.PnlNode.Visible = isOpen;\r
+            }\r
+        }\r
+        public bool IsChecked { \r
+            get { return isChecked; } \r
+            set \r
+            {\r
+                isChecked = value;\r
+                panel.ChkChecked.Checked = isChecked;\r
+            } \r
+        }\r
+\r
+        public StructurePanel Panel\r
+        {\r
+            get { return panel; }\r
+        }\r
+\r
+        public StructureNode ParentNode{\r
+            get { return parentNode; }\r
+            set { parentNode = value; }\r
+        }\r
+\r
+        public StructureNode ElderNode\r
+        {\r
+            get\r
+            {\r
+                if (parentNode == null) { return null; }\r
+                else\r
+                {\r
+                    return parentNode.children.IndexOf(this) <= 0 ? null : parentNode.children[parentNode.children.IndexOf(this) - 1];\r
+                }\r
+            }\r
+        }\r
+\r
+        public int Indent \r
+        {\r
+            get { return indent; } \r
+            set\r
+            {\r
+                indent = value;\r
+                foreach (StructureNode child in children)\r
+                {\r
+                    child.Indent = indent + 1;\r
+                }\r
+                panel.reRendaring();\r
+            } \r
+        }\r
+        public List<StructureNode> parentList\r
+        {\r
+            get { return this.parentNode.getAllChildlen(); }\r
+        }\r
+        public int nodeIndex\r
+        {\r
+            get { return this.parentNode.getAllChildlen().IndexOf(this); }\r
+        }\r
+        public int TotalIndex\r
+        {\r
+            get { return this.Panel.NodeTitle.TabIndex; }\r
+        }\r
+        #endregion\r
+\r
+        /// <summary>\r
+        /// 子ノードを全部取得\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public List<StructureNode> getAllChildlen()\r
+        {\r
+            return children;\r
+        }\r
+\r
+        /// <summary>\r
+        /// 子ノードを追加\r
+        /// 追加する際にインデックスを絶対インデックスに変換\r
+        /// </summary>\r
+        /// <param name="node"></param>\r
+        public void addChild(StructureNode node)\r
+        {\r
+            //node.Index = children.Count;\r
+            node.Indent =indent + 1;\r
+\r
+            panel.ChkVisible.Visible = true;\r
+            panel.ChkVisible.Checked = true;\r
+            panel.ChkVisible.CheckedChanged += this.ChkVisible_CheckedChanged;\r
+            \r
+            children.Add(node);\r
+        }\r
+        public void insertChild(StructureNode node, int index)\r
+        {\r
+\r
+            if (children.Count == 0)\r
+            {\r
+                addChild(node);\r
+            }\r
+            else\r
+            {\r
+                node.Indent = indent + 1;\r
+                children.Insert(index, node);\r
+            }\r
+            //node.panel.NodeTitle.Focus();\r
+        }\r
+        public void removeChild(StructureNode node)\r
+        {\r
+            children.Remove(node);\r
+\r
+            if (children.Count == 0)\r
+            {\r
+                panel.ChkVisible.CheckedChanged -= this.ChkVisible_CheckedChanged;\r
+                panel.ChkVisible.Checked = false;\r
+                panel.ChkVisible.Visible = false;\r
+            }\r
+            //this.panel.NodeTitle.Focus();\r
+        }\r
+\r
+        #region EventHandler For StructurePanel\r
+        public void catchEnter()\r
+        {\r
+            ctrl.addNodes();\r
+        }\r
+        public void catchCtrlEnter()\r
+        {\r
+            ctrl.addChild();\r
+        }\r
+        public void catchDelete()\r
+        {\r
+            ctrl.SelectedNode = this;\r
+            ctrl.deleteNode();\r
+        }\r
+\r
+        private void ChkVisible_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            foreach (StructureNode child in children)\r
+            {\r
+                child.IsOpen = panel.ChkVisible.Checked;\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        public void MyPartCall()\r
+        {\r
+            ctrl.SelectedNode = this;\r
+        }\r
+        public void becomeSearchResult(bool isTarget)\r
+        {\r
+            isSearchResult = isTarget;\r
+            panel.becomeSearchResult();\r
+        }\r
+        private bool isSearchResult;\r
+        public bool IsSearchResult { get { return isSearchResult; } }\r
+\r
+        internal void catchDown()\r
+        {\r
+            ctrl.gotoNext();\r
+        }\r
+        internal void catchUp()\r
+        {\r
+            ctrl.gotoPrev();\r
+        }\r
+    }\r
+}\r
diff --git a/Structure/StructurePanel.cs b/Structure/StructurePanel.cs
new file mode 100644 (file)
index 0000000..4602432
--- /dev/null
@@ -0,0 +1,259 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OPMLEditor.Forms;\r
+\r
+\r
+namespace OPMLEditor.Structure\r
+{\r
+    class StructurePanel\r
+    {\r
+        private TextBox nodeTitle;\r
+        private CheckBox chkVisible;\r
+        private Button btnSetNote;\r
+        private Panel pnlNode;\r
+        private StructureNode spirit;\r
+        private CheckBox chkChecked;\r
+\r
+        #region getter/setter\r
+        public TextBox NodeTitle { get{return nodeTitle;} set{nodeTitle = value;} }\r
+        public CheckBox ChkVisible { get { return chkVisible; } set { chkVisible = value; } }\r
+        public Button BtnSetNote { get { return btnSetNote; } set { btnSetNote = value; } }\r
+        public Panel PnlNode { get { return pnlNode; } set { pnlNode = value; } }\r
+        public CheckBox ChkChecked { get { return chkChecked; } set { chkChecked = value; } }\r
+\r
+        #endregion\r
+        #region Constructor\r
+        public StructurePanel(StructureNode spirit)\r
+        {\r
+            this.spirit = spirit;\r
+            pnlNode = new Panel();\r
+\r
+            nodeTitle = new TextBox();\r
+            chkVisible = new CheckBox();\r
+            btnSetNote = new Button();\r
+            chkChecked = new CheckBox();\r
+            // \r
+            // NodeTitle\r
+            // \r
+            this.nodeTitle.Font = new System.Drawing.Font("MS UI Gothic", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));\r
+            this.nodeTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |  System.Windows.Forms.AnchorStyles.Right)));\r
+            this.nodeTitle.Location = new System.Drawing.Point(20, 0);\r
+            this.nodeTitle.Size = new System.Drawing.Size(900, 20);\r
+            this.nodeTitle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
+\r
+            // \r
+            // chkVisible\r
+            // \r
+            this.chkVisible.AutoSize = true;\r
+            this.chkVisible.Location = new System.Drawing.Point(3, 6);\r
+            this.chkVisible.Size = new System.Drawing.Size(15, 14);\r
+            this.chkVisible.TabStop = false;\r
+            this.chkVisible.UseVisualStyleBackColor = true;\r
+            this.chkVisible.Visible = false;\r
+\r
+            // \r
+            // btnSetNote\r
+            // \r
+            this.btnSetNote.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));\r
+            this.btnSetNote.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));\r
+            this.btnSetNote.Location = new System.Drawing.Point(945, 3);\r
+            this.btnSetNote.Size = new System.Drawing.Size(30, 20);\r
+            this.btnSetNote.TabStop = false;\r
+            if (spirit.Note == null || spirit.Note == string.Empty )\r
+            {\r
+                this.btnSetNote.Text = "-";\r
+            }\r
+            else\r
+            {\r
+                this.btnSetNote.Text = "≡";\r
+            }\r
+            this.btnSetNote.UseVisualStyleBackColor = true;\r
+            //\r
+            // chkChecked\r
+            //\r
+            this.chkChecked.AutoSize = true;\r
+            this.chkChecked.Location = new System.Drawing.Point(925, 6);\r
+            this.chkChecked.Size = new System.Drawing.Size(15, 14);\r
+            this.chkChecked.TabStop = false;\r
+            this.chkChecked.UseVisualStyleBackColor = true;\r
+            this.chkChecked.Visible = true;\r
+\r
+            // \r
+            // panel1\r
+            // \r
+            this.pnlNode.Anchor = ((System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left));\r
+            this.pnlNode.Size = new System.Drawing.Size(980, 25);\r
+            \r
+            this.pnlNode.Controls.Add(this.chkVisible);\r
+            this.pnlNode.Controls.Add(this.NodeTitle);\r
+            this.pnlNode.Controls.Add(this.btnSetNote);\r
+            this.pnlNode.Controls.Add(this.chkChecked);\r
+            //Event Handler\r
+            this.nodeTitle.KeyPress += new KeyPressEventHandler(this.nodeTitle_KeyPress);\r
+            this.nodeTitle.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.nodeTitle_Keydown);\r
+            this.nodeTitle.GotFocus += new EventHandler(nodeTitle_GotFocus);\r
+            this.nodeTitle.TextChanged += new EventHandler(nodeTitle_TextChanged);\r
+            this.nodeTitle.LostFocus += new EventHandler(nodeTitle_LostFocus);\r
+            this.btnSetNote.Click += new EventHandler(btnSetNote_Enter);\r
+            this.chkChecked.CheckedChanged += new EventHandler(chkChecked_CheckedChanged);\r
+            nodeTitle.Text = spirit.TitleText;\r
+            chkVisible.Checked = spirit.IsOpen;\r
+            \r
+            setIndentVisual();\r
+        }\r
+        #endregion\r
+        #region EventHandler\r
+        void chkChecked_CheckedChanged(object sender, EventArgs e)\r
+        {\r
+            checkedStateColorControll(false);\r
+            spirit.IsChecked = this.chkChecked.Checked;\r
+        }\r
+\r
+\r
+        private void btnSetNote_Enter(object sender, EventArgs e)\r
+        {\r
+            invokeNoteWindow();\r
+        }\r
+        private void nodeTitle_GotFocus(object sender, EventArgs e)\r
+        {\r
+            nodeTitle.Select(nodeTitle.Text.Length, 0);\r
+\r
+            checkedStateColorControll(true);\r
+            spirit.MyPartCall();\r
+            \r
+        }\r
+        private void nodeTitle_LostFocus(object sender, EventArgs e)\r
+        {\r
+            checkedStateColorControll(false);\r
+        }\r
+\r
+        private void nodeTitle_TextChanged(object sender, EventArgs e)\r
+        {\r
+            spirit.TitleText = nodeTitle.Text;\r
+        }\r
+        private void btnDelete_Enter(object sender, EventArgs e)\r
+        {\r
+            spirit.catchDelete();\r
+        }\r
+        private void nodeTitle_KeyPress(object sender, KeyPressEventArgs e)\r
+        {\r
+            //EnterやEscapeキーでビープ音が鳴らないようにする\r
+            if (e.KeyChar == (char)Keys.Enter || e.KeyChar == (char)Keys.Escape)\r
+            {\r
+                e.Handled = true;\r
+            }\r
+            else if (e.KeyChar == '\n')\r
+            {\r
+                e.Handled = true;\r
+            }\r
+\r
+        }\r
+        //PreviewKeyDownイベントハンドラ\r
+        private void nodeTitle_Keydown(object sender,\r
+            PreviewKeyDownEventArgs e)\r
+        {\r
+\r
+            switch (e.KeyCode)\r
+            {\r
+                case Keys.Enter:\r
+                    if (e.Control)\r
+                    {\r
+                        spirit.catchCtrlEnter();\r
+                    }\r
+                    else\r
+                    {\r
+                        spirit.catchEnter();\r
+                    }\r
+                    break;\r
+                case Keys.Down:\r
+                    if (!e.Control)\r
+                    {\r
+                        spirit.catchDown();\r
+                    }\r
+                    break;\r
+                case Keys.Up:\r
+                    if (!e.Control)\r
+                    {\r
+                        spirit.catchUp();\r
+                    }\r
+                    break;\r
+            }\r
+        }\r
+\r
+        #endregion\r
+        public void invokeNoteWindow()\r
+        {\r
+            FrmNote frmNote = new FrmNote(this.spirit.Note);\r
+            frmNote.Owner = FrmBase.ActiveForm;\r
+\r
+            DialogResult res = frmNote.ShowDialog();\r
+            if (res == DialogResult.OK)\r
+            {\r
+                this.spirit.Note = ((FrmBase)frmNote.Owner).TmpNote;\r
+            }\r
+            changeButton();\r
+        }\r
+\r
+        public void changeButton()\r
+        {\r
+            if (this.spirit.Note == string.Empty)\r
+            {\r
+                this.btnSetNote.Text = "-";\r
+            }\r
+            else\r
+            {\r
+                this.btnSetNote.Text = "≡";\r
+            }\r
+        }\r
+\r
+        private void setIndentVisual()\r
+        {\r
+            this.nodeTitle.Left = 20 + (spirit.Indent * 15);\r
+            this.nodeTitle.Size = new System.Drawing.Size(900 - (spirit.Indent * 15), 20);\r
+            this.chkVisible.Left = 3 + (spirit.Indent * 15);\r
+        }\r
+\r
+        public void reRendaring()\r
+        {\r
+            setIndentVisual();\r
+        }\r
+        private void checkedStateColorControll(bool isFocused)\r
+        {\r
+            //パネル全体の色をフォーカスとステータス、検索結果で変更する\r
+            if (isFocused)\r
+            {\r
+                this.pnlNode.BackColor = System.Drawing.Color.AliceBlue;\r
+            }\r
+            else if (spirit.IsSearchResult)\r
+            {\r
+                this.pnlNode.BackColor = System.Drawing.Color.Yellow;\r
+            }\r
+            else if (this.chkChecked.Checked)\r
+            {\r
+                this.pnlNode.BackColor = System.Drawing.Color.LightGray;\r
+            }\r
+            else\r
+            {\r
+                this.pnlNode.BackColor = System.Drawing.Color.Transparent;\r
+            }\r
+            //テキストボックスの色は分けて処理する\r
+            if (this.chkChecked.Checked)\r
+            {\r
+                this.nodeTitle.BackColor = System.Drawing.Color.WhiteSmoke;\r
+            }\r
+            else\r
+            {\r
+                this.nodeTitle.BackColor = System.Drawing.Color.White;\r
+            }\r
+\r
+        }\r
+        public void becomeSearchResult()\r
+        {\r
+            checkedStateColorControll(false);\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/app.config b/app.config
new file mode 100644 (file)
index 0000000..f76deb9
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>\r
+<configuration>\r
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>\r
diff --git a/export/ExportController.cs b/export/ExportController.cs
new file mode 100644 (file)
index 0000000..790274b
--- /dev/null
@@ -0,0 +1,43 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.opml;\r
+using OPMLEditor.Controller;\r
+using System.IO;\r
+\r
+namespace OPMLEditor.export\r
+{\r
+    class ExportController\r
+    {\r
+        public void export(ExportIF exporter)\r
+        {\r
+            string fileName = exporter.showFileNameDialog();\r
+\r
+            if (fileName == null || fileName == string.Empty) { return; }\r
+            \r
+            exporter.DataSource = \r
+                OpmlParser.Parser.createOpmlData(\r
+                fileName, NodeController.getNodeController().ParentList);\r
+\r
+            try\r
+            {\r
+                using (StreamWriter sw = new StreamWriter(fileName))\r
+                {\r
+\r
+                    List<string> arrangedList = exporter.arrangeData();\r
+\r
+                    foreach (string text in arrangedList)\r
+                    {\r
+                        sw.WriteLine(text);\r
+                    }\r
+                }\r
+\r
+            }\r
+            catch (Exception ex)\r
+            {\r
+                OpmlApplicationExceptionControl.ErrorDialog("エクスポートに失敗しました。");\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/export/ExportIF.cs b/export/ExportIF.cs
new file mode 100644 (file)
index 0000000..0700931
--- /dev/null
@@ -0,0 +1,19 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.opml;\r
+\r
+namespace OPMLEditor.export\r
+{\r
+    interface ExportIF\r
+    {\r
+        Opml DataSource\r
+        {\r
+            set;\r
+        }\r
+        List<string> arrangeData();\r
+        string showFileNameDialog();\r
+\r
+    }\r
+}\r
diff --git a/export/NumericTextExporter.cs b/export/NumericTextExporter.cs
new file mode 100644 (file)
index 0000000..594b3fc
--- /dev/null
@@ -0,0 +1,59 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.opml;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.export\r
+{\r
+    class NumericTextExporter : abTextExporter,ExportIF\r
+    {\r
+        private Opml dataSource;\r
+        public override Opml DataSource\r
+        {\r
+            set { this.dataSource = value; }\r
+        }\r
+\r
+        public override List<string> arrangeData()\r
+        {\r
+            List<string> retData = new List<string>();\r
+            int numerics = 1;\r
+            foreach(Outline node in dataSource.body.outline)\r
+            {\r
+                string numericString = numerics.ToString() + " : ";\r
+                retData.Add(numericString + node.text);\r
+                if (node.note != null && node.note != string.Empty)\r
+                {\r
+                    string noteText = node.note;\r
+\r
+                    retData.Add("\t" + noteText.Replace("\n", "\n\t"));\r
+                }\r
+                recursiveArrangeData(node.outline,retData, numerics.ToString());\r
+\r
+                numerics++;\r
+            }\r
+            return retData;\r
+        }\r
+\r
+        private void recursiveArrangeData(List<Outline> list,List<string> retData, string numerics)\r
+        {\r
+            int numericsInner = 1;\r
+            foreach (Outline childNode in list)\r
+            {\r
+                retData.Add(numerics + "." + numericsInner.ToString() + " : " + childNode.text);\r
+                if (childNode.note != null && childNode.note != string.Empty)\r
+                {\r
+                    string noteText = childNode.note;\r
+\r
+                    retData.Add("\t" + noteText.Replace("\n", "\n\t"));\r
+                }\r
+                recursiveArrangeData(childNode.outline, retData, numerics + "." + numericsInner.ToString());\r
+\r
+                numericsInner++;\r
+            }\r
+        }\r
+\r
+\r
+    }\r
+}\r
diff --git a/export/TabTextExporter.cs b/export/TabTextExporter.cs
new file mode 100644 (file)
index 0000000..2441f22
--- /dev/null
@@ -0,0 +1,58 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using OPMLEditor.opml;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.export\r
+{\r
+    class TabTextExporter:abTextExporter,ExportIF\r
+    {\r
+        private Opml dataSource;\r
+        public override Opml DataSource\r
+        {\r
+            set { this.dataSource = value; }\r
+        }\r
+\r
+        public override List<string> arrangeData()\r
+        {\r
+            List<string> retData = new List<string>();\r
+            \r
+            foreach(Outline node in dataSource.body.outline)\r
+            {\r
+                retData.Add(node.text);\r
+                if (node.note != null && node.note != string.Empty)\r
+                {\r
+                    string noteText = node.note;\r
+\r
+                    retData.Add("\t" + noteText.Replace("\n", "\n\t"));\r
+                }\r
+                recursiveArrangeData(node.outline,retData, 1);\r
+            }\r
+            return retData;\r
+        }\r
+\r
+        private void recursiveArrangeData(List<Outline> list,List<string> retData, int p)\r
+        {\r
+            string tabSeparater = string.Empty;\r
+            for (int i = 0; i < p; i++)\r
+            {\r
+                tabSeparater += "\t";\r
+            }\r
+\r
+            foreach (Outline childNode in list)\r
+            {\r
+                retData.Add(tabSeparater + childNode.text);\r
+                if (childNode.note != null && childNode.note != string.Empty)\r
+                {\r
+                    string noteText = childNode.note;\r
+\r
+                    retData.Add(tabSeparater + "\t" + noteText.Replace("\n", "\n\t"+tabSeparater));\r
+                }\r
+                recursiveArrangeData(childNode.outline, retData, p+1);\r
+            }\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/export/abTextExporter.cs b/export/abTextExporter.cs
new file mode 100644 (file)
index 0000000..ce3cd75
--- /dev/null
@@ -0,0 +1,27 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.export\r
+{\r
+    abstract class abTextExporter:ExportIF\r
+    {\r
+\r
+        public abstract opml.Opml DataSource\r
+        {\r
+            set;\r
+        }\r
+\r
+        public abstract List<string> arrangeData();\r
+        \r
+        public string showFileNameDialog()\r
+        {\r
+            SaveFileDialog exportFileDialog = new SaveFileDialog();\r
+            exportFileDialog.Filter = "テキスト ファイル(*.txt)|*.txt|すべてのファイル(*.*)|*.*";\r
+            DialogResult result = exportFileDialog.ShowDialog();\r
+            return exportFileDialog.FileName;\r
+        }\r
+    }\r
+}\r
diff --git a/forms/FrmBase.Designer.cs b/forms/FrmBase.Designer.cs
new file mode 100644 (file)
index 0000000..7f4b616
--- /dev/null
@@ -0,0 +1,475 @@
+namespace OPMLEditor.Forms\r
+{\r
+    partial class FrmBase\r
+    {\r
+        /// <summary>\r
+        /// 必要なデザイナー変数です。\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// 使用中のリソースをすべてクリーンアップします。\r
+        /// </summary>\r
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows フォーム デザイナーで生成されたコード\r
+\r
+        /// <summary>\r
+        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を\r
+        /// コード エディターで変更しないでください。\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));\r
+            this.menuStrip1 = new System.Windows.Forms.MenuStrip();\r
+            this.FileMenu = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.NewMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.OpenMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.SaveMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.SaveAsMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.ExportMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.exportTabTextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.QuitMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.EditToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.UndoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.SearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.searchPrevToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.searchNextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.ClearSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.NodeMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.NewNodeMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.InsertNodeMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.DeleteMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.UpMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.DownMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.RightMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.LeftMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.NoteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.chngStatusToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.ヘルプToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.manualToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.creditToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
+            this.openDialog = new System.Windows.Forms.OpenFileDialog();\r
+            this.panelBase = new System.Windows.Forms.Panel();\r
+            this.saveDialog = new System.Windows.Forms.SaveFileDialog();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
+            this.statusIndicator = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.NumericTextExportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.menuStrip1.SuspendLayout();\r
+            this.panelBase.SuspendLayout();\r
+            this.statusStrip1.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // menuStrip1\r
+            // \r
+            this.menuStrip1.Anchor = System.Windows.Forms.AnchorStyles.None;\r
+            this.menuStrip1.AutoSize = false;\r
+            this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;\r
+            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.FileMenu,\r
+            this.EditToolStripMenuItem,\r
+            this.NodeMenuItem,\r
+            this.ヘルプToolStripMenuItem});\r
+            this.menuStrip1.Location = new System.Drawing.Point(0, 0);\r
+            this.menuStrip1.Name = "menuStrip1";\r
+            this.menuStrip1.Size = new System.Drawing.Size(1008, 26);\r
+            this.menuStrip1.TabIndex = 6;\r
+            this.menuStrip1.Text = "menuStrip1";\r
+            // \r
+            // FileMenu\r
+            // \r
+            this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.NewMenuItem,\r
+            this.OpenMenuItem,\r
+            this.SaveMenuItem,\r
+            this.SaveAsMenuItem,\r
+            this.toolStripSeparator1,\r
+            this.ExportMenuItem,\r
+            this.toolStripSeparator2,\r
+            this.QuitMenuItem});\r
+            this.FileMenu.Name = "FileMenu";\r
+            this.FileMenu.Size = new System.Drawing.Size(68, 22);\r
+            this.FileMenu.Text = "ファイル";\r
+            // \r
+            // NewMenuItem\r
+            // \r
+            this.NewMenuItem.Name = "NewMenuItem";\r
+            this.NewMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));\r
+            this.NewMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.NewMenuItem.Text = "新規作成";\r
+            this.NewMenuItem.Click += new System.EventHandler(this.NewMenuItem_Click);\r
+            // \r
+            // OpenMenuItem\r
+            // \r
+            this.OpenMenuItem.Name = "OpenMenuItem";\r
+            this.OpenMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\r
+            this.OpenMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.OpenMenuItem.Text = "開く";\r
+            this.OpenMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click);\r
+            // \r
+            // SaveMenuItem\r
+            // \r
+            this.SaveMenuItem.Name = "SaveMenuItem";\r
+            this.SaveMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));\r
+            this.SaveMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.SaveMenuItem.Text = "上書き保存";\r
+            this.SaveMenuItem.Click += new System.EventHandler(this.SaveMenuItem_Click);\r
+            // \r
+            // SaveAsMenuItem\r
+            // \r
+            this.SaveAsMenuItem.Name = "SaveAsMenuItem";\r
+            this.SaveAsMenuItem.ShortcutKeyDisplayString = "";\r
+            this.SaveAsMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)\r
+                        | System.Windows.Forms.Keys.S)));\r
+            this.SaveAsMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.SaveAsMenuItem.Text = "名前を付けて保存";\r
+            this.SaveAsMenuItem.Click += new System.EventHandler(this.SaveAsMenuItem_Click);\r
+            // \r
+            // toolStripSeparator1\r
+            // \r
+            this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(253, 6);\r
+            // \r
+            // ExportMenuItem\r
+            // \r
+            this.ExportMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.exportTabTextToolStripMenuItem,\r
+            this.NumericTextExportToolStripMenuItem});\r
+            this.ExportMenuItem.Name = "ExportMenuItem";\r
+            this.ExportMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.ExportMenuItem.Text = "エクスポート";\r
+            // \r
+            // exportTabTextToolStripMenuItem\r
+            // \r
+            this.exportTabTextToolStripMenuItem.Name = "exportTabTextToolStripMenuItem";\r
+            this.exportTabTextToolStripMenuItem.Size = new System.Drawing.Size(184, 22);\r
+            this.exportTabTextToolStripMenuItem.Text = "タブ付きテキスト";\r
+            this.exportTabTextToolStripMenuItem.Click += new System.EventHandler(this.exportTabTextToolStripMenuItem_Click);\r
+            // \r
+            // toolStripSeparator2\r
+            // \r
+            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
+            this.toolStripSeparator2.Size = new System.Drawing.Size(253, 6);\r
+            // \r
+            // QuitMenuItem\r
+            // \r
+            this.QuitMenuItem.Name = "QuitMenuItem";\r
+            this.QuitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));\r
+            this.QuitMenuItem.Size = new System.Drawing.Size(256, 22);\r
+            this.QuitMenuItem.Text = "終了";\r
+            this.QuitMenuItem.Click += new System.EventHandler(this.QuitMenuItem_Click);\r
+            // \r
+            // EditToolStripMenuItem\r
+            // \r
+            this.EditToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.UndoToolStripMenuItem,\r
+            this.SearchToolStripMenuItem,\r
+            this.searchPrevToolStripMenuItem,\r
+            this.searchNextToolStripMenuItem,\r
+            this.ClearSearchToolStripMenuItem});\r
+            this.EditToolStripMenuItem.Name = "EditToolStripMenuItem";\r
+            this.EditToolStripMenuItem.Size = new System.Drawing.Size(44, 22);\r
+            this.EditToolStripMenuItem.Text = "編集";\r
+            // \r
+            // UndoToolStripMenuItem\r
+            // \r
+            this.UndoToolStripMenuItem.Enabled = false;\r
+            this.UndoToolStripMenuItem.Name = "UndoToolStripMenuItem";\r
+            this.UndoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));\r
+            this.UndoToolStripMenuItem.Size = new System.Drawing.Size(255, 22);\r
+            this.UndoToolStripMenuItem.Text = "元に戻す";\r
+            this.UndoToolStripMenuItem.Click += new System.EventHandler(this.UndoToolStripMenuItem_Click);\r
+            // \r
+            // SearchToolStripMenuItem\r
+            // \r
+            this.SearchToolStripMenuItem.Name = "SearchToolStripMenuItem";\r
+            this.SearchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));\r
+            this.SearchToolStripMenuItem.Size = new System.Drawing.Size(255, 22);\r
+            this.SearchToolStripMenuItem.Text = "検索";\r
+            this.SearchToolStripMenuItem.Click += new System.EventHandler(this.SearchToolStripMenuItem_Click);\r
+            // \r
+            // searchPrevToolStripMenuItem\r
+            // \r
+            this.searchPrevToolStripMenuItem.Name = "searchPrevToolStripMenuItem";\r
+            this.searchPrevToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F3)));\r
+            this.searchPrevToolStripMenuItem.Size = new System.Drawing.Size(255, 22);\r
+            this.searchPrevToolStripMenuItem.Text = "前の結果";\r
+            this.searchPrevToolStripMenuItem.Click += new System.EventHandler(this.searchPrevToolStripMenuItem_Click);\r
+            // \r
+            // searchNextToolStripMenuItem\r
+            // \r
+            this.searchNextToolStripMenuItem.Name = "searchNextToolStripMenuItem";\r
+            this.searchNextToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;\r
+            this.searchNextToolStripMenuItem.Size = new System.Drawing.Size(255, 22);\r
+            this.searchNextToolStripMenuItem.Text = "次の結果";\r
+            this.searchNextToolStripMenuItem.Click += new System.EventHandler(this.searchNextToolStripMenuItem_Click);\r
+            // \r
+            // ClearSearchToolStripMenuItem\r
+            // \r
+            this.ClearSearchToolStripMenuItem.Name = "ClearSearchToolStripMenuItem";\r
+            this.ClearSearchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)\r
+                        | System.Windows.Forms.Keys.F)));\r
+            this.ClearSearchToolStripMenuItem.Size = new System.Drawing.Size(255, 22);\r
+            this.ClearSearchToolStripMenuItem.Text = "検索結果をクリア";\r
+            this.ClearSearchToolStripMenuItem.Click += new System.EventHandler(this.ClearSearchToolStripMenuItem_Click);\r
+            // \r
+            // NodeMenuItem\r
+            // \r
+            this.NodeMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.NewNodeMenuItem,\r
+            this.InsertNodeMenuItem,\r
+            this.DeleteMenuItem,\r
+            this.toolStripSeparator3,\r
+            this.UpMenuItem,\r
+            this.DownMenuItem,\r
+            this.RightMenuItem,\r
+            this.LeftMenuItem,\r
+            this.toolStripSeparator4,\r
+            this.NoteToolStripMenuItem,\r
+            this.chngStatusToolStripMenuItem});\r
+            this.NodeMenuItem.Name = "NodeMenuItem";\r
+            this.NodeMenuItem.Size = new System.Drawing.Size(56, 22);\r
+            this.NodeMenuItem.Text = "ノード";\r
+            // \r
+            // NewNodeMenuItem\r
+            // \r
+            this.NewNodeMenuItem.Name = "NewNodeMenuItem";\r
+            this.NewNodeMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.J)));\r
+            this.NewNodeMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.NewNodeMenuItem.Text = "新規";\r
+            this.NewNodeMenuItem.Click += new System.EventHandler(this.NewNodeMenuItem_Click);\r
+            // \r
+            // InsertNodeMenuItem\r
+            // \r
+            this.InsertNodeMenuItem.Name = "InsertNodeMenuItem";\r
+            this.InsertNodeMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.K)));\r
+            this.InsertNodeMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.InsertNodeMenuItem.Text = "子ノード挿入";\r
+            this.InsertNodeMenuItem.Click += new System.EventHandler(this.InsertNodeMenuItem_Click);\r
+            // \r
+            // DeleteMenuItem\r
+            // \r
+            this.DeleteMenuItem.Name = "DeleteMenuItem";\r
+            this.DeleteMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete)));\r
+            this.DeleteMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.DeleteMenuItem.Text = "削除";\r
+            this.DeleteMenuItem.Click += new System.EventHandler(this.DeleteMenuItem_Click);\r
+            // \r
+            // toolStripSeparator3\r
+            // \r
+            this.toolStripSeparator3.Name = "toolStripSeparator3";\r
+            this.toolStripSeparator3.Size = new System.Drawing.Size(201, 6);\r
+            // \r
+            // UpMenuItem\r
+            // \r
+            this.UpMenuItem.Name = "UpMenuItem";\r
+            this.UpMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up)));\r
+            this.UpMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.UpMenuItem.Text = "上へ";\r
+            this.UpMenuItem.Click += new System.EventHandler(this.UpMenuItem_Click);\r
+            // \r
+            // DownMenuItem\r
+            // \r
+            this.DownMenuItem.Name = "DownMenuItem";\r
+            this.DownMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Down)));\r
+            this.DownMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.DownMenuItem.Text = "下へ";\r
+            this.DownMenuItem.Click += new System.EventHandler(this.DownMenuItem_Click);\r
+            // \r
+            // RightMenuItem\r
+            // \r
+            this.RightMenuItem.Name = "RightMenuItem";\r
+            this.RightMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Right)));\r
+            this.RightMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.RightMenuItem.Text = "右へ";\r
+            this.RightMenuItem.Click += new System.EventHandler(this.RightMenuItem_Click);\r
+            // \r
+            // LeftMenuItem\r
+            // \r
+            this.LeftMenuItem.Name = "LeftMenuItem";\r
+            this.LeftMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Left)));\r
+            this.LeftMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.LeftMenuItem.Text = "左へ";\r
+            this.LeftMenuItem.Click += new System.EventHandler(this.LeftMenuItem_Click);\r
+            // \r
+            // toolStripSeparator4\r
+            // \r
+            this.toolStripSeparator4.Name = "toolStripSeparator4";\r
+            this.toolStripSeparator4.Size = new System.Drawing.Size(201, 6);\r
+            // \r
+            // NoteToolStripMenuItem\r
+            // \r
+            this.NoteToolStripMenuItem.Name = "NoteToolStripMenuItem";\r
+            this.NoteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));\r
+            this.NoteToolStripMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.NoteToolStripMenuItem.Text = "ノート";\r
+            this.NoteToolStripMenuItem.Click += new System.EventHandler(this.noteToolStripMenuItem_Click);\r
+            // \r
+            // chngStatusToolStripMenuItem\r
+            // \r
+            this.chngStatusToolStripMenuItem.Name = "chngStatusToolStripMenuItem";\r
+            this.chngStatusToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+-";\r
+            this.chngStatusToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.OemMinus)));\r
+            this.chngStatusToolStripMenuItem.Size = new System.Drawing.Size(204, 22);\r
+            this.chngStatusToolStripMenuItem.Text = "ステータス変更";\r
+            this.chngStatusToolStripMenuItem.Click += new System.EventHandler(this.chngStatusToolStripMenuItem_Click);\r
+            // \r
+            // ヘルプToolStripMenuItem\r
+            // \r
+            this.ヘルプToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.manualToolStripMenuItem,\r
+            this.creditToolStripMenuItem});\r
+            this.ヘルプToolStripMenuItem.Name = "ヘルプToolStripMenuItem";\r
+            this.ヘルプToolStripMenuItem.Size = new System.Drawing.Size(56, 22);\r
+            this.ヘルプToolStripMenuItem.Text = "ヘルプ";\r
+            // \r
+            // manualToolStripMenuItem\r
+            // \r
+            this.manualToolStripMenuItem.Name = "manualToolStripMenuItem";\r
+            this.manualToolStripMenuItem.Size = new System.Drawing.Size(160, 22);\r
+            this.manualToolStripMenuItem.Text = "使用例ファイル";\r
+            this.manualToolStripMenuItem.Click += new System.EventHandler(this.manualToolStripMenuItem_Click);\r
+            // \r
+            // creditToolStripMenuItem\r
+            // \r
+            this.creditToolStripMenuItem.Name = "creditToolStripMenuItem";\r
+            this.creditToolStripMenuItem.Size = new System.Drawing.Size(160, 22);\r
+            this.creditToolStripMenuItem.Text = "クレジット";\r
+            this.creditToolStripMenuItem.Click += new System.EventHandler(this.creditToolStripMenuItem_Click);\r
+            // \r
+            // flowLayoutPanel1\r
+            // \r
+            this.flowLayoutPanel1.AutoSize = true;\r
+            this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
+            this.flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;\r
+            this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;\r
+            this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+            this.flowLayoutPanel1.Name = "flowLayoutPanel1";\r
+            this.flowLayoutPanel1.Size = new System.Drawing.Size(0, 0);\r
+            this.flowLayoutPanel1.TabIndex = 8;\r
+            this.flowLayoutPanel1.WrapContents = false;\r
+            // \r
+            // openDialog\r
+            // \r
+            this.openDialog.Filter = "OPML File(*.opml)|*.opml|すべてのファイル(*.*)|*.*";\r
+            // \r
+            // panelBase\r
+            // \r
+            this.panelBase.AutoScroll = true;\r
+            this.panelBase.Controls.Add(this.flowLayoutPanel1);\r
+            this.panelBase.Location = new System.Drawing.Point(-1, 27);\r
+            this.panelBase.Name = "panelBase";\r
+            this.panelBase.Size = new System.Drawing.Size(1008, 678);\r
+            this.panelBase.TabIndex = 9;\r
+            // \r
+            // saveDialog\r
+            // \r
+            this.saveDialog.DefaultExt = "opml";\r
+            this.saveDialog.Filter = "OPML File(*.opml)|*.opml|すべてのファイル(*.*)|*.*";\r
+            // \r
+            // statusStrip1\r
+            // \r
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.statusIndicator});\r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 708);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(1008, 22);\r
+            this.statusStrip1.TabIndex = 10;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
+            // statusIndicator\r
+            // \r
+            this.statusIndicator.Name = "statusIndicator";\r
+            this.statusIndicator.Size = new System.Drawing.Size(0, 17);\r
+            // \r
+            // NumericTextExportToolStripMenuItem\r
+            // \r
+            this.NumericTextExportToolStripMenuItem.Name = "NumericTextExportToolStripMenuItem";\r
+            this.NumericTextExportToolStripMenuItem.Size = new System.Drawing.Size(184, 22);\r
+            this.NumericTextExportToolStripMenuItem.Text = "数字区切りテキスト";\r
+            this.NumericTextExportToolStripMenuItem.Click += new System.EventHandler(this.NumericTextExportToolStripMenuItem_Click);\r
+            // \r
+            // FrmBase\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.AutoScrollMargin = new System.Drawing.Size(0, 20);\r
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\r
+            this.BackColor = System.Drawing.Color.White;\r
+            this.ClientSize = new System.Drawing.Size(1008, 730);\r
+            this.Controls.Add(this.statusStrip1);\r
+            this.Controls.Add(this.panelBase);\r
+            this.Controls.Add(this.menuStrip1);\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MainMenuStrip = this.menuStrip1;\r
+            this.Name = "FrmBase";\r
+            this.Text = "OPML Editor";\r
+            this.menuStrip1.ResumeLayout(false);\r
+            this.menuStrip1.PerformLayout();\r
+            this.panelBase.ResumeLayout(false);\r
+            this.panelBase.PerformLayout();\r
+            this.statusStrip1.ResumeLayout(false);\r
+            this.statusStrip1.PerformLayout();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.MenuStrip menuStrip1;\r
+        private System.Windows.Forms.ToolStripMenuItem FileMenu;\r
+        private System.Windows.Forms.ToolStripMenuItem NewMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem OpenMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem SaveMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem SaveAsMenuItem;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\r
+        private System.Windows.Forms.ToolStripMenuItem ExportMenuItem;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;\r
+        private System.Windows.Forms.ToolStripMenuItem QuitMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem NodeMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem NewNodeMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem InsertNodeMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem DeleteMenuItem;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;\r
+        private System.Windows.Forms.ToolStripMenuItem UpMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem DownMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem RightMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem LeftMenuItem;\r
+        private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;\r
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;\r
+        private System.Windows.Forms.ToolStripMenuItem NoteToolStripMenuItem;\r
+        private System.Windows.Forms.OpenFileDialog openDialog;\r
+        private System.Windows.Forms.Panel panelBase;\r
+        private System.Windows.Forms.SaveFileDialog saveDialog;\r
+        private System.Windows.Forms.StatusStrip statusStrip1;\r
+        private System.Windows.Forms.ToolStripStatusLabel statusIndicator;\r
+        private System.Windows.Forms.ToolStripMenuItem chngStatusToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem EditToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem UndoToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem SearchToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem searchPrevToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem searchNextToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem ClearSearchToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem ヘルプToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem manualToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem creditToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem exportTabTextToolStripMenuItem;\r
+        private System.Windows.Forms.ToolStripMenuItem NumericTextExportToolStripMenuItem;\r
+\r
+    }\r
+}\r
+\r
diff --git a/forms/FrmBase.cs b/forms/FrmBase.cs
new file mode 100644 (file)
index 0000000..d8e267c
--- /dev/null
@@ -0,0 +1,317 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OPMLEditor.Structure;\r
+using OPMLEditor.Controller;\r
+using OPMLEditor.opml;\r
+using OPMLEditor.forms;\r
+using OPMLEditor.export;\r
+\r
+namespace OPMLEditor.Forms\r
+{\r
+    public partial class FrmBase : Form\r
+    {\r
+        private NodeController nodeCtrl;\r
+        private int totalIndex;\r
+        private ExportController expCtrl;\r
+        private string openFileName;\r
+        private string tmpNote;\r
+\r
+        private string tmpSearchTarget;\r
+\r
+        public string TmpSearchTarget\r
+        {\r
+            get { return tmpSearchTarget; }\r
+            set \r
+            {\r
+                this.tmpSearchTarget = value;\r
+                nodeCtrl.search(this.tmpSearchTarget);\r
+            }\r
+        }\r
+        public string TmpNote\r
+        {\r
+            get { return tmpNote; }\r
+            set { tmpNote = value; }\r
+        }\r
+\r
+        #region Constructor\r
+        public FrmBase()\r
+        {\r
+            InitializeComponent();\r
+            nodeCtrl = NodeController.getNodeController();\r
+            nodeCtrl.FrontWindow = this;\r
+            refleshNode();\r
+\r
+            expCtrl = new ExportController();\r
+            \r
+        }\r
+\r
+        public FrmBase(string filePath)\r
+            : this()\r
+        {\r
+            OpmlParser.Parser.LoadFile(filePath, nodeCtrl);\r
+            refleshNode();\r
+\r
+            openFileName = filePath;\r
+            this.Text = "Opml Editor" + " : " + filePath; \r
+        }\r
+        #endregion\r
+\r
+        #region Form Reflesh Method\r
+        public void refleshNode()\r
+        {\r
+            flowLayoutPanel1.Controls.Clear();\r
+            totalIndex = 1;\r
+\r
+            StructureNode focusData = nodeCtrl.FocusData;\r
+            foreach (StructureNode data in nodeCtrl.ParentList)\r
+            {\r
+                this.flowLayoutPanel1.Controls.Add(data.Panel.PnlNode);\r
+\r
+                if (data == focusData)\r
+                {\r
+                    data.Panel.NodeTitle.Focus();\r
+                }\r
+                \r
+                data.Panel.PnlNode.TabIndex = totalIndex;\r
+            \r
+                totalIndex++;\r
+\r
+\r
+                recursiveAddPanel(data, 1,focusData);\r
+            }\r
+\r
+            this.statusIndicator.Text = "";\r
+\r
+        }\r
+\r
+        private void recursiveAddPanel(StructureNode data, int indent,StructureNode focusData)\r
+        {\r
+            if (data.getAllChildlen().Count == 0) { return; }\r
+            foreach (StructureNode childData in data.getAllChildlen())\r
+            {\r
+                \r
+                this.flowLayoutPanel1.Controls.Add(childData.Panel.PnlNode);\r
+                \r
+                if (childData == focusData)\r
+                {\r
+                    childData.Panel.NodeTitle.Focus();\r
+                }\r
+                childData.Panel.PnlNode.TabIndex = totalIndex;\r
+                totalIndex++;\r
+\r
+                if (childData.getAllChildlen().Count > 0)\r
+                {\r
+                    recursiveAddPanel(childData, indent + 1,focusData);\r
+                }\r
+            }\r
+        }\r
+        #endregion\r
+\r
+\r
+        #region EventHandler\r
+        private void NewNodeMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.addNodes();\r
+        }\r
+\r
+        private void InsertNodeMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.addChild();\r
+        }\r
+\r
+        private void RightMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.becomeChild();\r
+        }\r
+\r
+        private void LeftMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.becomeParent();\r
+        }\r
+\r
+        private void DownMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.turnDown();\r
+        }\r
+\r
+        private void UpMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.turnUp();\r
+        }\r
+\r
+        private void DeleteMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.deleteNode();\r
+        }\r
+\r
+        private void QuitMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+\r
+        private void noteToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.addNote();\r
+        }\r
+\r
+        private void OpenMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            DialogResult res = openDialog.ShowDialog();\r
+            string filePath = openDialog.FileName;\r
+            if (filePath == null || filePath == string.Empty)\r
+            {\r
+                return;\r
+            }\r
+            OpmlParser.Parser.LoadFile(filePath, nodeCtrl);\r
+            \r
+            refleshNode();\r
+\r
+            openFileName = filePath;\r
+            this.Text = "Opml Editor" + " : " + filePath;\r
+            this.statusIndicator.Text = "";\r
+        }\r
+\r
+        private void SaveAsMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            this.statusIndicator.Text = "saving..";\r
+            saveDialog.ShowDialog();\r
+            string filePath = saveDialog.FileName;\r
+            if (filePath == null || filePath == string.Empty) { return; }\r
+            \r
+            OpmlParser.Parser.SaveFile(filePath, nodeCtrl);\r
+\r
+            openFileName = filePath;\r
+            this.Text = "Opml Editor" + " : " + filePath;\r
+\r
+            this.statusIndicator.Text = "saved " + filePath;\r
+        }\r
+\r
+        private void SaveMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            if (openFileName == null || openFileName == string.Empty) \r
+            {\r
+                SaveAsMenuItem_Click(sender, e);\r
+                return; \r
+            }\r
+\r
+            this.statusIndicator.Text = "saving..";\r
+            OpmlParser.Parser.SaveFile(openFileName, nodeCtrl);\r
+            this.statusIndicator.Text = "saved " + openFileName;\r
+        }\r
+\r
+        private void NewMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl = nodeCtrl.resetNodeController();\r
+            nodeCtrl.FrontWindow = this;\r
+            refleshNode();\r
+\r
+            openFileName = string.Empty;\r
+            this.Text = "Opml Editor";\r
+            this.statusIndicator.Text = "";\r
+        }\r
+        \r
+        private void chngStatusToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.changeNodeStatus();\r
+        }\r
+        #endregion\r
+\r
+        private void UndoToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.undo();\r
+        }\r
+\r
+        public void undoToolControl(bool isEnabled)\r
+        {\r
+            this.UndoToolStripMenuItem.Enabled = isEnabled;\r
+        }\r
+\r
+        private void SearchToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            FrmSearch searchWindow = new FrmSearch();\r
+            searchWindow.Owner = this;\r
+            searchWindow.ShowDialog();\r
+\r
+            nodeCtrl.search(tmpSearchTarget);\r
+\r
+        }\r
+\r
+        private void searchPrevToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.searchPrev();\r
+        }\r
+\r
+        private void searchNextToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.searchNext();\r
+        }\r
+\r
+        private void ClearSearchToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            nodeCtrl.resetSearch();\r
+        }\r
+\r
+        private void manualToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            string manualFile = ".\\manual.opml";\r
+\r
+            DialogResult res =System.Windows.Forms.MessageBox.Show(\r
+                "現在の内容は失われます。内容を保存してください。\n続行しますか?",\r
+                "確認",\r
+                MessageBoxButtons.YesNo,\r
+                MessageBoxIcon.Question,\r
+                MessageBoxDefaultButton.Button2);\r
+            if (res == DialogResult.Yes)\r
+            {\r
+                //マニュアルファイルがなければ\r
+                if (System.IO.File.Exists(manualFile))\r
+                {\r
+                    OpmlParser.Parser.LoadFile(manualFile, nodeCtrl);\r
+                    refleshNode();\r
+\r
+                    openFileName = manualFile;\r
+                    this.Text = "Opml Editor" + " : " + manualFile;\r
+                    this.statusIndicator.Text = "";\r
+                }\r
+                else\r
+                {\r
+                    System.Windows.Forms.MessageBox.Show(\r
+                        "マニュアルファイルを読み込めませんでした",\r
+                        "エラー",\r
+                        MessageBoxButtons.OK,\r
+                        MessageBoxIcon.Error,\r
+                        MessageBoxDefaultButton.Button1);\r
+                }\r
+            }\r
+        }\r
+\r
+        private void creditToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            FrmCredit credit = new FrmCredit();\r
+            credit.ShowDialog();\r
+        }\r
+\r
+        private void exportTabTextToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            TabTextExporter exporter = new TabTextExporter();\r
+            expCtrl.export(exporter);\r
+        }\r
+\r
+        private void NumericTextExportToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            NumericTextExporter exporter = new NumericTextExporter();\r
+            expCtrl.export(exporter);\r
+        }\r
+\r
+\r
+\r
+\r
+\r
+    }\r
+}\r
diff --git a/forms/FrmBase.resx b/forms/FrmBase.resx
new file mode 100644 (file)
index 0000000..02c8f6b
--- /dev/null
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <metadata name="menuStrip1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>True</value>\r
+  </metadata>\r
+  <metadata name="openDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>139, 17</value>\r
+  </metadata>\r
+  <metadata name="saveDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>260, 15</value>\r
+  </metadata>\r
+  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>376, 15</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAEAAAAAAA\r
+        AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//\r
+        AAD///8A//////////////////////////////////////////////////AAAAAAAAAAAAAP////8ADw\r
+        ////////////D/////Dw8P///////////w/////wAPD///////////8P///////wAAAAAAAAAAAAD///\r
+        ////////////////////////AAAAAAAAAAAAAAAP//8ADwu7u7u7u7u7u7u7D///Dw8Lu7u7u7u7u7u7\r
+        uw///wAPC7u7u7u7u7u7u7sP/////wAAAAAAAAAAAAAAD/////////////////////////////AAAAAA\r
+        AAAAAAAP////8ADwd3d3d3d3d3d3D/////CA8Hd3d3d3d3d3dw/////wAPB3d3d3d3d3d3cP///////w\r
+        AAAAAAAAAAAAD///////////////////////////AAAAAAAAAAAAAAAP//8ADw//////////////D///\r
+        Dw8P/////////////w///wAPD/////////////8P/////wAAAAAAAAAAAAAAD///////////////////\r
+        //////AAAAAAAAAAAAAAAAAP8ADw7u7u7u7u7u7u7u7uD/Dw8O7u7u7u7u7u7u7u7g/wAPDu7u7u7u7u\r
+        7u7u7u4P///wAAAAAAAAAAAAAAAAD/////////////////////8AAAAAAAAAAAAf//4B0AAOAVAADgHQ\r
+        AA4AH//+AAAAAAD///4OgAACCoAAAg6AAAIA///+AAAAAAAf//4B0AACAVAAAgHQAAIAH//+AAAAAAD/\r
+        //4OgAACCoAAAg6AAAIA///+AAAAAAf///50AAACdAAAAnQAAAJ3///+AAAAAA==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/forms/FrmCredit.Designer.cs b/forms/FrmCredit.Designer.cs
new file mode 100644 (file)
index 0000000..4d115fe
--- /dev/null
@@ -0,0 +1,131 @@
+namespace OPMLEditor.forms\r
+{\r
+    partial class FrmCredit\r
+    {\r
+        /// <summary>\r
+        /// 必要なデザイナー変数です。\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// 使用中のリソースをすべてクリーンアップします。\r
+        /// </summary>\r
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows フォーム デザイナーで生成されたコード\r
+\r
+        /// <summary>\r
+        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を\r
+        /// コード エディターで変更しないでください。\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCredit));\r
+            this.label1 = new System.Windows.Forms.Label();\r
+            this.label2 = new System.Windows.Forms.Label();\r
+            this.linkLabel1 = new System.Windows.Forms.LinkLabel();\r
+            this.label3 = new System.Windows.Forms.Label();\r
+            this.label5 = new System.Windows.Forms.Label();\r
+            this.label4 = new System.Windows.Forms.Label();\r
+            this.SuspendLayout();\r
+            // \r
+            // label1\r
+            // \r
+            this.label1.AutoSize = true;\r
+            this.label1.Font = new System.Drawing.Font("MS UI Gothic", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(128)));\r
+            this.label1.Location = new System.Drawing.Point(20, 12);\r
+            this.label1.Name = "label1";\r
+            this.label1.Size = new System.Drawing.Size(133, 21);\r
+            this.label1.TabIndex = 0;\r
+            this.label1.Text = "OPML Editor";\r
+            // \r
+            // label2\r
+            // \r
+            this.label2.AutoSize = true;\r
+            this.label2.Font = new System.Drawing.Font("Gentium Book Basic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label2.Location = new System.Drawing.Point(63, 51);\r
+            this.label2.Name = "label2";\r
+            this.label2.Size = new System.Drawing.Size(274, 19);\r
+            this.label2.TabIndex = 1;\r
+            this.label2.Text = "Written by Tom Andou(@AndouTomo)";\r
+            // \r
+            // linkLabel1\r
+            // \r
+            this.linkLabel1.AutoSize = true;\r
+            this.linkLabel1.Font = new System.Drawing.Font("Gentium Book Basic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.linkLabel1.Location = new System.Drawing.Point(85, 70);\r
+            this.linkLabel1.Name = "linkLabel1";\r
+            this.linkLabel1.Size = new System.Drawing.Size(252, 17);\r
+            this.linkLabel1.TabIndex = 2;\r
+            this.linkLabel1.TabStop = true;\r
+            this.linkLabel1.Text = "http://stepinstepover.wordpress.com/";\r
+            // \r
+            // label3\r
+            // \r
+            this.label3.AutoEllipsis = true;\r
+            this.label3.Location = new System.Drawing.Point(22, 144);\r
+            this.label3.Name = "label3";\r
+            this.label3.Size = new System.Drawing.Size(315, 40);\r
+            this.label3.TabIndex = 3;\r
+            this.label3.Text = "※本ソフトウェアは商用・非商用を問わず無償で利用できますが, ソースコードの著作権は作者が留保しています.";\r
+            // \r
+            // label5\r
+            // \r
+            this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
+            this.label5.AutoSize = true;\r
+            this.label5.Font = new System.Drawing.Font("Gentium Book Basic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label5.Location = new System.Drawing.Point(121, 101);\r
+            this.label5.Name = "label5";\r
+            this.label5.Size = new System.Drawing.Size(216, 19);\r
+            this.label5.TabIndex = 4;\r
+            this.label5.Text = "Copyright 2013 by Tom Andou";\r
+            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            // \r
+            // label4\r
+            // \r
+            this.label4.AutoSize = true;\r
+            this.label4.Location = new System.Drawing.Point(22, 174);\r
+            this.label4.Name = "label4";\r
+            this.label4.Size = new System.Drawing.Size(141, 12);\r
+            this.label4.TabIndex = 5;\r
+            this.label4.Text = "本ソフトウェアは無保証です。";\r
+            // \r
+            // FrmCredit\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(363, 212);\r
+            this.Controls.Add(this.label4);\r
+            this.Controls.Add(this.label5);\r
+            this.Controls.Add(this.label3);\r
+            this.Controls.Add(this.linkLabel1);\r
+            this.Controls.Add(this.label2);\r
+            this.Controls.Add(this.label1);\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MaximizeBox = false;\r
+            this.MinimizeBox = false;\r
+            this.Name = "FrmCredit";\r
+            this.Text = "クレジット";\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.Label label1;\r
+        private System.Windows.Forms.Label label2;\r
+        private System.Windows.Forms.LinkLabel linkLabel1;\r
+        private System.Windows.Forms.Label label3;\r
+        private System.Windows.Forms.Label label5;\r
+        private System.Windows.Forms.Label label4;\r
+    }\r
+}
\ No newline at end of file
diff --git a/forms/FrmCredit.cs b/forms/FrmCredit.cs
new file mode 100644 (file)
index 0000000..5926633
--- /dev/null
@@ -0,0 +1,19 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.forms\r
+{\r
+    public partial class FrmCredit : Form\r
+    {\r
+        public FrmCredit()\r
+        {\r
+            InitializeComponent();\r
+        }\r
+    }\r
+}\r
diff --git a/forms/FrmCredit.resx b/forms/FrmCredit.resx
new file mode 100644 (file)
index 0000000..f4c59cc
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAEAAAAAAA\r
+        AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//\r
+        AAD///8A//////////////////////////////////////////////////AAAAAAAAAAAAAP////8ADw\r
+        ////////////D/////Dw8P///////////w/////wAPD///////////8P///////wAAAAAAAAAAAAD///\r
+        ////////////////////////AAAAAAAAAAAAAAAP//8ADwu7u7u7u7u7u7u7D///Dw8Lu7u7u7u7u7u7\r
+        uw///wAPC7u7u7u7u7u7u7sP/////wAAAAAAAAAAAAAAD/////////////////////////////AAAAAA\r
+        AAAAAAAP////8ADwd3d3d3d3d3d3D/////CA8Hd3d3d3d3d3dw/////wAPB3d3d3d3d3d3cP///////w\r
+        AAAAAAAAAAAAD///////////////////////////AAAAAAAAAAAAAAAP//8ADw//////////////D///\r
+        Dw8P/////////////w///wAPD/////////////8P/////wAAAAAAAAAAAAAAD///////////////////\r
+        //////AAAAAAAAAAAAAAAAAP8ADw7u7u7u7u7u7u7u7uD/Dw8O7u7u7u7u7u7u7u7g/wAPDu7u7u7u7u\r
+        7u7u7u4P///wAAAAAAAAAAAAAAAAD/////////////////////8AAAAAAAAAAAAf//4B0AAOAVAADgHQ\r
+        AA4AH//+AAAAAAD///4OgAACCoAAAg6AAAIA///+AAAAAAAf//4B0AACAVAAAgHQAAIAH//+AAAAAAD/\r
+        //4OgAACCoAAAg6AAAIA///+AAAAAAf///50AAACdAAAAnQAAAJ3///+AAAAAA==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/forms/FrmNote.Designer.cs b/forms/FrmNote.Designer.cs
new file mode 100644 (file)
index 0000000..e27f804
--- /dev/null
@@ -0,0 +1,92 @@
+namespace OPMLEditor.Forms\r
+{\r
+    partial class FrmNote\r
+    {\r
+        /// <summary>\r
+        /// 必要なデザイナー変数です。\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// 使用中のリソースをすべてクリーンアップします。\r
+        /// </summary>\r
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows フォーム デザイナーで生成されたコード\r
+\r
+        /// <summary>\r
+        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を\r
+        /// コード エディターで変更しないでください。\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmNote));\r
+            this.txtNote = new System.Windows.Forms.TextBox();\r
+            this.btnOK = new System.Windows.Forms.Button();\r
+            this.btnCancel = new System.Windows.Forms.Button();\r
+            this.SuspendLayout();\r
+            // \r
+            // txtNote\r
+            // \r
+            this.txtNote.AcceptsReturn = true;\r
+            this.txtNote.Font = new System.Drawing.Font("MS UI Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));\r
+            this.txtNote.Location = new System.Drawing.Point(0, 1);\r
+            this.txtNote.Multiline = true;\r
+            this.txtNote.Name = "txtNote";\r
+            this.txtNote.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
+            this.txtNote.Size = new System.Drawing.Size(380, 367);\r
+            this.txtNote.TabIndex = 0;\r
+            // \r
+            // btnOK\r
+            // \r
+            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;\r
+            this.btnOK.Location = new System.Drawing.Point(305, 375);\r
+            this.btnOK.Name = "btnOK";\r
+            this.btnOK.Size = new System.Drawing.Size(75, 23);\r
+            this.btnOK.TabIndex = 1;\r
+            this.btnOK.Text = "OK";\r
+            this.btnOK.UseVisualStyleBackColor = true;\r
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);\r
+            // \r
+            // btnCancel\r
+            // \r
+            this.btnCancel.Location = new System.Drawing.Point(224, 377);\r
+            this.btnCancel.Name = "btnCancel";\r
+            this.btnCancel.Size = new System.Drawing.Size(75, 21);\r
+            this.btnCancel.TabIndex = 2;\r
+            this.btnCancel.Text = "Cancel";\r
+            this.btnCancel.UseVisualStyleBackColor = true;\r
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);\r
+            // \r
+            // FrmNote\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(384, 402);\r
+            this.Controls.Add(this.btnCancel);\r
+            this.Controls.Add(this.btnOK);\r
+            this.Controls.Add(this.txtNote);\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.Name = "FrmNote";\r
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+            this.Text = "Note";\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.TextBox txtNote;\r
+        private System.Windows.Forms.Button btnOK;\r
+        private System.Windows.Forms.Button btnCancel;\r
+    }\r
+}
\ No newline at end of file
diff --git a/forms/FrmNote.cs b/forms/FrmNote.cs
new file mode 100644 (file)
index 0000000..1c3498f
--- /dev/null
@@ -0,0 +1,37 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OPMLEditor.Structure;\r
+\r
+namespace OPMLEditor.Forms\r
+{\r
+    /// <summary>\r
+    /// ノート編集用フォーム\r
+    /// </summary>\r
+    public partial class FrmNote : Form\r
+    {\r
+        public FrmNote()\r
+        {\r
+            InitializeComponent();\r
+        }\r
+        public FrmNote(string note)\r
+            : this()\r
+        {\r
+            txtNote.Text = note.Replace("&#10;", "\r\n");\r
+        }\r
+        private void btnOK_Click(object sender, EventArgs e)\r
+        {\r
+            ((FrmBase)Owner).TmpNote = txtNote.Text;\r
+            this.Close();\r
+        }\r
+        private void btnCancel_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+    }\r
+}\r
diff --git a/forms/FrmNote.resx b/forms/FrmNote.resx
new file mode 100644 (file)
index 0000000..f4c59cc
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAEAAAAAAA\r
+        AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//\r
+        AAD///8A//////////////////////////////////////////////////AAAAAAAAAAAAAP////8ADw\r
+        ////////////D/////Dw8P///////////w/////wAPD///////////8P///////wAAAAAAAAAAAAD///\r
+        ////////////////////////AAAAAAAAAAAAAAAP//8ADwu7u7u7u7u7u7u7D///Dw8Lu7u7u7u7u7u7\r
+        uw///wAPC7u7u7u7u7u7u7sP/////wAAAAAAAAAAAAAAD/////////////////////////////AAAAAA\r
+        AAAAAAAP////8ADwd3d3d3d3d3d3D/////CA8Hd3d3d3d3d3dw/////wAPB3d3d3d3d3d3cP///////w\r
+        AAAAAAAAAAAAD///////////////////////////AAAAAAAAAAAAAAAP//8ADw//////////////D///\r
+        Dw8P/////////////w///wAPD/////////////8P/////wAAAAAAAAAAAAAAD///////////////////\r
+        //////AAAAAAAAAAAAAAAAAP8ADw7u7u7u7u7u7u7u7uD/Dw8O7u7u7u7u7u7u7u7g/wAPDu7u7u7u7u\r
+        7u7u7u4P///wAAAAAAAAAAAAAAAAD/////////////////////8AAAAAAAAAAAAf//4B0AAOAVAADgHQ\r
+        AA4AH//+AAAAAAD///4OgAACCoAAAg6AAAIA///+AAAAAAAf//4B0AACAVAAAgHQAAIAH//+AAAAAAD/\r
+        //4OgAACCoAAAg6AAAIA///+AAAAAAf///50AAACdAAAAnQAAAJ3///+AAAAAA==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/forms/FrmSearch.Designer.cs b/forms/FrmSearch.Designer.cs
new file mode 100644 (file)
index 0000000..459056d
--- /dev/null
@@ -0,0 +1,89 @@
+namespace OPMLEditor.Forms\r
+{\r
+    partial class FrmSearch\r
+    {\r
+        /// <summary>\r
+        /// 必要なデザイナー変数です。\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary>\r
+        /// 使用中のリソースをすべてクリーンアップします。\r
+        /// </summary>\r
+        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Windows フォーム デザイナーで生成されたコード\r
+\r
+        /// <summary>\r
+        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を\r
+        /// コード エディターで変更しないでください。\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSearch));\r
+            this.txtSearch = new System.Windows.Forms.TextBox();\r
+            this.btnSearch = new System.Windows.Forms.Button();\r
+            this.btnCancel = new System.Windows.Forms.Button();\r
+            this.SuspendLayout();\r
+            // \r
+            // txtSearch\r
+            // \r
+            this.txtSearch.Font = new System.Drawing.Font("MS UI Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));\r
+            this.txtSearch.Location = new System.Drawing.Point(12, 12);\r
+            this.txtSearch.Name = "txtSearch";\r
+            this.txtSearch.Size = new System.Drawing.Size(416, 23);\r
+            this.txtSearch.TabIndex = 0;\r
+            this.txtSearch.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSearch_KeyPress);\r
+            this.txtSearch.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.txtSearch_Keydown);\r
+            // \r
+            // btnSearch\r
+            // \r
+            this.btnSearch.Location = new System.Drawing.Point(352, 42);\r
+            this.btnSearch.Name = "btnSearch";\r
+            this.btnSearch.Size = new System.Drawing.Size(75, 23);\r
+            this.btnSearch.TabIndex = 1;\r
+            this.btnSearch.Text = "検索";\r
+            this.btnSearch.UseVisualStyleBackColor = true;\r
+            this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);\r
+            // \r
+            // btnCancel\r
+            // \r
+            this.btnCancel.Location = new System.Drawing.Point(271, 41);\r
+            this.btnCancel.Name = "btnCancel";\r
+            this.btnCancel.Size = new System.Drawing.Size(75, 23);\r
+            this.btnCancel.TabIndex = 2;\r
+            this.btnCancel.Text = "キャンセル";\r
+            this.btnCancel.UseVisualStyleBackColor = true;\r
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);\r
+            // \r
+            // FrmSearch\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.ClientSize = new System.Drawing.Size(455, 93);\r
+            this.Controls.Add(this.btnCancel);\r
+            this.Controls.Add(this.btnSearch);\r
+            this.Controls.Add(this.txtSearch);\r
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.Name = "FrmSearch";\r
+            this.Text = "検索";\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.TextBox txtSearch;\r
+        private System.Windows.Forms.Button btnSearch;\r
+        private System.Windows.Forms.Button btnCancel;\r
+    }\r
+}
\ No newline at end of file
diff --git a/forms/FrmSearch.cs b/forms/FrmSearch.cs
new file mode 100644 (file)
index 0000000..06b4d33
--- /dev/null
@@ -0,0 +1,58 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Data;\r
+using System.Drawing;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+\r
+namespace OPMLEditor.Forms\r
+{\r
+    public partial class FrmSearch : Form\r
+    {\r
+        public FrmSearch()\r
+        {\r
+            InitializeComponent();\r
+        }\r
+\r
+        private void btnCancel_Click(object sender, EventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
+\r
+        private void btnSearch_Click(object sender, EventArgs e)\r
+        {\r
+            ((FrmBase)Owner).TmpSearchTarget = txtSearch.Text;\r
+            this.Close();\r
+        }\r
+\r
+        private void txtSearch_KeyPress(object sender, KeyPressEventArgs e)\r
+        {\r
+            //EnterやEscapeキーでビープ音が鳴らないようにする\r
+            if (e.KeyChar == (char)Keys.Enter || e.KeyChar == (char)Keys.Escape)\r
+            {\r
+                e.Handled = true;\r
+            }\r
+            else if (e.KeyChar == '\n')\r
+            {\r
+                e.Handled = true;\r
+            }\r
+\r
+        }\r
+        //PreviewKeyDownイベントハンドラ\r
+        private void txtSearch_Keydown(object sender,\r
+            PreviewKeyDownEventArgs e)\r
+        {\r
+\r
+            switch (e.KeyCode)\r
+            {\r
+                case Keys.Enter:\r
+                    ((FrmBase)Owner).TmpSearchTarget = txtSearch.Text;\r
+                    this.Close();\r
+                    break;\r
+\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/forms/FrmSearch.resx b/forms/FrmSearch.resx
new file mode 100644 (file)
index 0000000..f4c59cc
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAEAAAAAAA\r
+        AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//\r
+        AAD///8A//////////////////////////////////////////////////AAAAAAAAAAAAAP////8ADw\r
+        ////////////D/////Dw8P///////////w/////wAPD///////////8P///////wAAAAAAAAAAAAD///\r
+        ////////////////////////AAAAAAAAAAAAAAAP//8ADwu7u7u7u7u7u7u7D///Dw8Lu7u7u7u7u7u7\r
+        uw///wAPC7u7u7u7u7u7u7sP/////wAAAAAAAAAAAAAAD/////////////////////////////AAAAAA\r
+        AAAAAAAP////8ADwd3d3d3d3d3d3D/////CA8Hd3d3d3d3d3dw/////wAPB3d3d3d3d3d3cP///////w\r
+        AAAAAAAAAAAAD///////////////////////////AAAAAAAAAAAAAAAP//8ADw//////////////D///\r
+        Dw8P/////////////w///wAPD/////////////8P/////wAAAAAAAAAAAAAAD///////////////////\r
+        //////AAAAAAAAAAAAAAAAAP8ADw7u7u7u7u7u7u7u7uD/Dw8O7u7u7u7u7u7u7u7g/wAPDu7u7u7u7u\r
+        7u7u7u4P///wAAAAAAAAAAAAAAAAD/////////////////////8AAAAAAAAAAAAf//4B0AAOAVAADgHQ\r
+        AA4AH//+AAAAAAD///4OgAACCoAAAg6AAAIA///+AAAAAAAf//4B0AACAVAAAgHQAAIAH//+AAAAAAD/\r
+        //4OgAACCoAAAg6AAAIA///+AAAAAAf///50AAACdAAAAnQAAAJ3///+AAAAAA==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/manual.opml b/manual.opml
new file mode 100644 (file)
index 0000000..99a2ec8
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>\r
+<opml>\r
+  <head>\r
+    <title>manual</title>\r
+    <expansionState>0,1,5,9,11,17,20,26</expansionState>\r
+  </head>\r
+  <body>\r
+    <outline text="テキストを" _note="">\r
+      <outline text="こんなふうに" _note="">\r
+        <outline text="階層化して編集できます。" _note="" />\r
+      </outline>\r
+    </outline>\r
+    <outline text="Enterを押すか、Ctrl+Jを押すと" _note="" />\r
+    <outline text="同じ階層に新しいテキストが作れます。" _note="" />\r
+    <outline text="Ctrl+Enter、またはCtrl+Kで" _note="">\r
+      <outline text="下の階層にテキストが作れます。" _note="" />\r
+    </outline>\r
+    <outline text="右のボタン、またはCtrl+Lでノートを編集できます。" _note="ノートです。おおきに。" />\r
+    <outline text="ノートがある場合はボタンの表示が変わります。" _note="ノートを消すと元に戻りますよー。" />\r
+    <outline text="ファイルはopml形式で保存されます。" _note="">\r
+      <outline text="後述しますがエクスポートが可能です。" _note="" />\r
+    </outline>\r
+    <outline text="Ctrl+矢印で上下左右に動かせます。" _note="">\r
+      <outline text="色々と動かしてみてください。" _note="" />\r
+      <outline text="矢印上下で、兄弟ノード間を移動出来ます。" _note="" />\r
+      <outline text="Tab/Shift+Tabで、上から下まで移動出来ます。" _note="" />\r
+      <outline text="親ノードをまたいでの移動はできないので、一旦Ctrl+右で親ノードと並べてください。" _note="" />\r
+    </outline>\r
+    <outline text="ノードを消したい場合はCtrl+Delで消せます。" _note="" />\r
+    <outline text="右側のチェックリストをチェックすると、その項目はチェックされた扱いになります。" _note="" _status="checked">\r
+      <outline text="親ノードをチェックしても子ノードにはチェックが付きません。" _note="" />\r
+      <outline text="チェック状態は、Ctrl+&quot;-&quot;で切り替えられます。" _note="" />\r
+    </outline>\r
+    <outline text="Ctrl+Fで検索ができます。" _note="">\r
+      <outline text="検索文字列が存在するノードは黄色くなります。" _note="" />\r
+      <outline text="F3で次の検索結果、Shift+F3で前の検索結果にフォーカスします。" _note="" />\r
+      <outline text="ノートに文字列が含まれる場合も、ノードが黄色くなります。検索文字が見当たらないならCtrl+Lで。" _note="" />\r
+      <outline text="黄色いノードは、ノードに編集が入るかCtrl+Shift+Fで消えます。" _note="" />\r
+    </outline>\r
+    <outline text="エクスポート(タブテキスト、番号付与)ができます。ファイルメニューから確認してみてください。" _note="" />\r
+    <outline text="その他ご要望は、ヘルプ-クレジットの連絡先までどうぞ。" _note="">\r
+      <outline text="基本オープンソースなので、無料です。" _note="" />\r
+      <outline text="ソースコードに突っ込みいれてくれる方大歓迎です。" _note="" />\r
+    </outline>\r
+  </body>\r
+</opml>
\ No newline at end of file
diff --git a/opml.ico b/opml.ico
new file mode 100644 (file)
index 0000000..ee6b266
Binary files /dev/null and b/opml.ico differ
diff --git a/opml/OpmlParser.cs b/opml/OpmlParser.cs
new file mode 100644 (file)
index 0000000..105e4ad
--- /dev/null
@@ -0,0 +1,226 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Xml.Serialization;\r
+using OPMLEditor.Controller;\r
+using OPMLEditor.Structure;\r
+\r
+namespace OPMLEditor.opml\r
+{\r
+    class OpmlParser\r
+    {\r
+        private int allNodeCount;\r
+        private string expansionState;\r
+\r
+        public static OpmlParser Parser\r
+        {\r
+            get\r
+            {\r
+                if (singleton == null)\r
+                {\r
+                    singleton = new OpmlParser();\r
+                }\r
+                return singleton;\r
+            }\r
+            \r
+        }\r
+        private static OpmlParser singleton;\r
+        private OpmlParser()\r
+        {\r
+        }\r
+\r
+        #region Serialize/Deserialize\r
+        private Opml Deserialize(string fileName)\r
+        {\r
+            //XmlSerializerオブジェクトを作成\r
+            XmlRootAttribute xRoot = new XmlRootAttribute();\r
+            xRoot.ElementName = "opml";\r
+            xRoot.IsNullable = true;\r
+\r
+            //シリアライザ起動\r
+            System.Xml.Serialization.XmlSerializer serializer =\r
+                new System.Xml.Serialization.XmlSerializer(typeof(Opml), xRoot);\r
+\r
+            System.IO.FileStream fs;\r
+            try\r
+            {\r
+                //読み込むファイルを開く\r
+                fs = new System.IO.FileStream(fileName, System.IO.FileMode.Open);\r
+\r
+                //XMLファイルから読み込み、逆シリアル化する\r
+                Opml obj = (Opml)serializer.Deserialize(fs);\r
+                //ファイルを閉じる\r
+                fs.Close();\r
+                return obj;\r
+\r
+            }\r
+            catch (Exception e)\r
+            {\r
+                \r
+                OpmlApplicationExceptionControl.ErrorDialog(e.Message);\r
+\r
+                return null;\r
+            }\r
+        }\r
+        private void Serialize(Opml opml, String filePath)\r
+        {\r
+            //XmlSerializerオブジェクトを作成\r
+            //オブジェクトの型を指定する\r
+            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();\r
+            ns.Add("", "");\r
+\r
+            XmlRootAttribute xRoot = new XmlRootAttribute();\r
+            xRoot.ElementName = "opml";\r
+            xRoot.IsNullable = true;\r
+\r
+            XmlSerializer serializer = new XmlSerializer(typeof(Opml), xRoot);\r
+            try\r
+            {\r
+\r
+                //書き込むファイルを開く\r
+                System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.OpenOrCreate);\r
+                //シリアル化し、XMLファイルに保存する\r
+                serializer.Serialize(fs, opml, ns);\r
+                //ファイルを閉じる\r
+                fs.Close();\r
+            }\r
+            catch (Exception e)\r
+            {\r
+                OpmlApplicationExceptionControl.ErrorDialog(e.Message);\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        /// <summary>\r
+        /// ファイル読み込み処理\r
+        /// </summary>\r
+        /// <param name="fileName"></param>\r
+        /// <param name="ctrl"></param>\r
+        /// <returns></returns>\r
+        public void LoadFile(string fileName,NodeController ctrl)\r
+        {\r
+            try\r
+            {\r
+                Opml opml = Deserialize(fileName);\r
+\r
+\r
+                List<StructureNode> retData = new List<StructureNode>();\r
+\r
+                foreach (Outline outline in opml.body.outline)\r
+                {\r
+\r
+                    StructureNode baseData = new StructureNode(ctrl, outline.text, outline.note\r
+                        , (outline._status == "checked"));\r
+                    baseData.ParentNode = null;\r
+                    addStructuredChild(baseData, outline, ctrl);\r
+                    retData.Add(baseData);\r
+                }\r
+                ctrl.ParentList = retData;\r
+            }\r
+            catch (Exception ex)\r
+            {\r
+                OpmlApplicationExceptionControl.ErrorDialog("読み込みエラーが発生いたしました。");\r
+            }\r
+        }\r
+\r
+        public void SaveFile(string fileName, NodeController ctrl)\r
+        {\r
+            List<StructureNode> currentList = ctrl.ParentList;\r
+            try\r
+            {\r
+                Serialize(createOpmlData(fileName, currentList), fileName);\r
+            }\r
+            catch (Exception ex)\r
+            {\r
+                OpmlApplicationExceptionControl.ErrorDialog("書き込みエラーが発生いたしました。");\r
+            }\r
+        }\r
+\r
+        public Opml createOpmlData(string fileName,List<StructureNode> parentList)\r
+        {\r
+            allNodeCount = 0;\r
+            expansionState = string.Empty;\r
+\r
+            Opml saveData = new Opml();\r
+            saveData.head = new Head();\r
+            saveData.body = new Body();\r
+            saveData.body.outline = new List<Outline>();\r
+\r
+            foreach (StructureNode data in parentList)\r
+            {\r
+\r
+                Outline outlineInner = new Outline();\r
+                outlineInner.text = data.TitleText;\r
+                outlineInner.note = data.Note;\r
+                if (data.IsChecked)\r
+                {\r
+                    outlineInner._status = "checked";\r
+                }\r
+                addOpmlChild(outlineInner, data);\r
+                saveData.body.outline.Add(outlineInner);\r
+                allNodeCount++;\r
+\r
+            }\r
+\r
+            saveData.head.expansionState = expansionState;\r
+            string[] aryFilePath = fileName.Split('\\');\r
+            string titleName = aryFilePath[aryFilePath.Length - 1];\r
+\r
+            saveData.head.title = titleName.Replace(".opml", "");\r
+            \r
+            return saveData;\r
+        }\r
+        /// <summary>\r
+        /// 再帰的に子ノード情報を取得する(OPMLバージョン)\r
+        /// </summary>\r
+        /// <param name="parentOutline"></param>\r
+        /// <param name="data"></param>\r
+        private void addOpmlChild(Outline parentOutline, StructureNode data)\r
+        {\r
+            //子ノードがある場合はexpansionStateに追加\r
+            if (data.getAllChildlen().Count > 0)\r
+            {\r
+                if (expansionState == string.Empty)\r
+                {\r
+                    expansionState = allNodeCount.ToString();\r
+                }\r
+                else\r
+                {\r
+                    expansionState += "," + allNodeCount.ToString();\r
+                }\r
+            }\r
+            foreach (StructureNode childData in data.getAllChildlen())\r
+            {\r
+                Outline childOutline = new Outline();\r
+                childOutline.text = childData.TitleText;\r
+                childOutline.note = childData.Note;\r
+                if (childData.IsChecked)\r
+                {\r
+                    childOutline._status = "checked";\r
+                }\r
+                parentOutline.outline.Add(childOutline);\r
+                allNodeCount++;\r
+                addOpmlChild(childOutline, childData);\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// 再帰的に子ノード情報を取得する(StruvtureBaseバージョン)\r
+        /// </summary>\r
+        /// <param name="data"></param>\r
+        /// <param name="parentOutline"></param>\r
+        /// <param name="ctrl"></param>\r
+        private void addStructuredChild(StructureNode data, Outline parentOutline,NodeController ctrl)\r
+        {\r
+            foreach (Outline childOutline in parentOutline.outline)\r
+            {\r
+                StructureNode childData = new StructureNode(ctrl, childOutline.text,\r
+                    childOutline.note,(childOutline._status == "checked"));\r
+                childData.ParentNode = data;\r
+                data.addChild(childData);\r
+                addStructuredChild(childData, childOutline, ctrl);\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/opml/OpmlStructure.cs b/opml/OpmlStructure.cs
new file mode 100644 (file)
index 0000000..494dc1e
--- /dev/null
@@ -0,0 +1,60 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Xml.Serialization;\r
+\r
+namespace OPMLEditor.opml\r
+{\r
+    [XmlRoot("OPML")]\r
+    public class Opml\r
+    {\r
+        [XmlAttribute("version")]\r
+        public string version { get; set; }\r
+        public Head head { get; set; }\r
+        public Body body { get; set; }\r
+    }\r
+    [XmlRoot("Head")]\r
+    public class Head\r
+    {\r
+\r
+        public string title { get; set; }\r
+        public string expansionState { get; set; }\r
+    }\r
+    [XmlRoot("body")]\r
+    public class Body\r
+    {\r
+        [XmlElement(typeof(Outline))]\r
+        public List<Outline> outline { get; set; }\r
+    }\r
+    [XmlRoot("outline")]\r
+    public class Outline\r
+    {\r
+        [XmlAttribute("text")]\r
+        public String text { get; set; }\r
+        [XmlAttribute("_note")]\r
+        public String note { get; set; }\r
+        [XmlAttribute("_status")]\r
+        public String _status\r
+        {\r
+            get;\r
+            set;\r
+        }\r
+        [XmlElement(typeof(Outline))]\r
+        public List<Outline> outline\r
+        {\r
+            get\r
+            {\r
+                if (outlineInner == null)\r
+                {\r
+                    outlineInner = new List<Outline>();\r
+\r
+                }\r
+                return outlineInner;\r
+            }\r
+            set { this.outlineInner = value; }\r
+        }\r
+\r
+        private List<Outline> outlineInner;\r
+    }\r
+}\r
diff --git a/opml2.ico b/opml2.ico
new file mode 100644 (file)
index 0000000..e5cd703
Binary files /dev/null and b/opml2.ico differ