OSDN Git Service

initial build for opensource v0.9.8-SeikaHoukokuSyo
authorttp <ttp@users.sourceforge.jp>
Tue, 26 Feb 2008 07:18:36 +0000 (07:18 +0000)
committerttp <ttp@users.sourceforge.jp>
Tue, 26 Feb 2008 07:18:36 +0000 (07:18 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@848 34ed2c89-c49f-4a4b-abdb-c318350108cf

63 files changed:
AppliStation.proj [new file with mode: 0644]
AppliStation.sln [new file with mode: 0644]
AppliStation/AppliStation.Util/ExceptionDialogForm.Designer.cs [new file with mode: 0644]
AppliStation/AppliStation.Util/ExceptionDialogForm.cs [new file with mode: 0644]
AppliStation/AppliStation.Util/ExceptionDialogForm.resx [new file with mode: 0644]
AppliStation/AppliStation.Util/ExecutionProgressViewer.Designer.cs [new file with mode: 0644]
AppliStation/AppliStation.Util/ExecutionProgressViewer.cs [new file with mode: 0644]
AppliStation/AppliStation.Util/ExecutionProgressViewer.resx [new file with mode: 0644]
AppliStation/AppliStation.Util/ListViewItemSortComparer.cs [new file with mode: 0644]
AppliStation/AppliStation.Util/NativeMethods.cs [new file with mode: 0644]
AppliStation/AppliStation.csproj [new file with mode: 0644]
AppliStation/ArgParse.cs [new file with mode: 0644]
AppliStation/AssemblyInfo.cs [new file with mode: 0644]
AppliStation/PackageListViewForm.Designer.cs [new file with mode: 0644]
AppliStation/PackageListViewForm.cs [new file with mode: 0644]
AppliStation/PackageListViewForm.resx [new file with mode: 0644]
AppliStation/PackageUninstallConfirmForm.Designer.cs [new file with mode: 0644]
AppliStation/PackageUninstallConfirmForm.cs [new file with mode: 0644]
AppliStation/PackageUninstallConfirmForm.resx [new file with mode: 0644]
AppliStation/PackagesInstallConfirmForm.Designer.cs [new file with mode: 0644]
AppliStation/PackagesInstallConfirmForm.cs [new file with mode: 0644]
AppliStation/PackagesInstallConfirmForm.resx [new file with mode: 0644]
AppliStation/Program.cs [new file with mode: 0644]
AppliStation/SplashScreen.png [new file with mode: 0644]
all-get/AssemblyInfo.cs [new file with mode: 0644]
all-get/Main.cs [new file with mode: 0644]
all-get/Util.cs [new file with mode: 0644]
all-get/all-get.csproj [new file with mode: 0644]
archive-inst/AssemblyInfo.cs [new file with mode: 0644]
archive-inst/InstalledFileList.cs [new file with mode: 0644]
archive-inst/MSBuild.cs [new file with mode: 0644]
archive-inst/Program.cs [new file with mode: 0644]
archive-inst/archive-inst.csproj [new file with mode: 0644]
build.bat [new file with mode: 0644]
na-get-lib/AssemblyInfo.cs [new file with mode: 0644]
na-get-lib/NaGet.InteropServices/CommonArchiverExtracter.cs [new file with mode: 0644]
na-get-lib/NaGet.InteropServices/CreateProcessCaller.cs [new file with mode: 0644]
na-get-lib/NaGet.InteropServices/DllAccess.cs [new file with mode: 0644]
na-get-lib/NaGet.InteropServices/PEFileInfoUtils.cs [new file with mode: 0644]
na-get-lib/NaGet.InteropServices/ShellLink.cs [new file with mode: 0644]
na-get-lib/NaGet.Net/Downloader.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/Installation.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/InstallationLog.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/InstalledPackage.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/RegistriedUninstallers.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/UninstallInformation.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages.Install/Uninstallation.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/HashValue.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/Package.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/PackageList.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/PackageListsManager.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/Platform.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/ProviderList.cs [new file with mode: 0644]
na-get-lib/NaGet.Packages/VersionComparetor.cs [new file with mode: 0644]
na-get-lib/NaGet.SubCommands/NaGetInstall.cs [new file with mode: 0644]
na-get-lib/NaGet.SubCommands/NaGetTask.cs [new file with mode: 0644]
na-get-lib/NaGet.SubCommands/NaGetTaskSet.cs [new file with mode: 0644]
na-get-lib/NaGet.SubCommands/NaGetUninstall.cs [new file with mode: 0644]
na-get-lib/NaGet.SubCommands/NaGetUpdate.cs [new file with mode: 0644]
na-get-lib/NaGet/Env.cs [new file with mode: 0644]
na-get-lib/NaGet/Utils.cs [new file with mode: 0644]
na-get-lib/na-get-lib.csproj [new file with mode: 0644]
provider.list.txt [new file with mode: 0644]

diff --git a/AppliStation.proj b/AppliStation.proj
new file mode 100644 (file)
index 0000000..9bbc716
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Dist" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+\r
+    <DistDir>dist</DistDir>\r
+    <AllGetBinDir>all-get/bin/$(Configuration)</AllGetBinDir>\r
+    <ArchiveInstBinDir>archive-inst/bin/$(Configuration)</ArchiveInstBinDir>\r
+    <AppliStationBinDir>AppliStation/bin/$(Configuration)</AppliStationBinDir>\r
+  </PropertyGroup>\r
+\r
+  <ItemGroup>\r
+    <ProviderList Include="provider.list.txt" />\r
+  </ItemGroup>\r
+\r
+  <ItemGroup>\r
+    <AllGetBin Include="$(AllGetBinDir)/*.exe;$(AllGetBinDir)/*.dll" />\r
+    <ArchiveInstBin Include="$(ArchiveInstBinDir)/*.exe" />\r
+    <AppliStationBin Include="$(AppliStationBinDir)/*.png;$(AppliStationBinDir)/*.exe" />\r
+  </ItemGroup>\r
+\r
+  <ItemGroup Condition=" '$(IncludePdb)' == 'Yes' ">\r
+    <AllGetBin Include="$(AllGetBinDir)/*.exe;$(AllGetBinDir)/*.dll;$(AllGetBinDir)/*.pdb" />\r
+    <ArchiveInstBin Include="$(ArchiveInstBinDir)/*.exe;$(ArchiveInstBinDir)/*.pdb" />\r
+    <AppliStationBin Include="$(AppliStationBinDir)/*.png;$(AppliStationBinDir)/*.exe;$(AppliStationBinDir)/*.pdb" />\r
+  </ItemGroup>\r
+\r
+  <Target Name="Build">\r
+    <MSBuild Projects="AppliStation.sln" />\r
+  </Target>\r
+\r
+  <Target Name="Dist">\r
+    <MakeDir Directories="$(DistDir)" />\r
+\r
+    <Copy SourceFiles="@(AllGetBin)" DestinationFolder="$(DistDir)" />\r
+    <Copy SourceFiles="@(ProviderList)" DestinationFolder="$(DistDir)" />\r
+    <Copy SourceFiles="@(ArchiveInstBin)" DestinationFolder="$(DistDir)" />\r
+    <Copy SourceFiles="@(AppliStationBin)" DestinationFolder="$(DistDir)" />\r
+  </Target>\r
+\r
+</Project>\r
diff --git a/AppliStation.sln b/AppliStation.sln
new file mode 100644 (file)
index 0000000..631d282
--- /dev/null
@@ -0,0 +1,44 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+# SharpDevelop 2.2.1.2648\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "na-get-lib", "na-get-lib\na-get-lib.csproj", "{058E953D-3986-4F74-8516-5A50D267D36A}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "all-get", "all-get\all-get.csproj", "{F212C7FF-0FC5-4319-BD72-87DB3A4CC55F}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "archive-inst", "archive-inst\archive-inst.csproj", "{9D7ADB99-6E53-4E3E-A13B-6D82412B3671}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppliStation", "AppliStation\AppliStation.csproj", "{0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {B4CD5E33-03CC-427D-A358-39360D6E4AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {B4CD5E33-03CC-427D-A358-39360D6E4AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {B4CD5E33-03CC-427D-A358-39360D6E4AD0}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {B4CD5E33-03CC-427D-A358-39360D6E4AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {25332B1A-85A4-47DB-AC50-97A6F418ED22}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {25332B1A-85A4-47DB-AC50-97A6F418ED22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {25332B1A-85A4-47DB-AC50-97A6F418ED22}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {25332B1A-85A4-47DB-AC50-97A6F418ED22}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {F212C7FF-0FC5-4319-BD72-87DB3A4CC55F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {F212C7FF-0FC5-4319-BD72-87DB3A4CC55F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {F212C7FF-0FC5-4319-BD72-87DB3A4CC55F}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {F212C7FF-0FC5-4319-BD72-87DB3A4CC55F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {058E953D-3986-4F74-8516-5A50D267D36A}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {058E953D-3986-4F74-8516-5A50D267D36A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {058E953D-3986-4F74-8516-5A50D267D36A}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {058E953D-3986-4F74-8516-5A50D267D36A}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {9D7ADB99-6E53-4E3E-A13B-6D82412B3671}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {9D7ADB99-6E53-4E3E-A13B-6D82412B3671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {9D7ADB99-6E53-4E3E-A13B-6D82412B3671}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {9D7ADB99-6E53-4E3E-A13B-6D82412B3671}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/AppliStation/AppliStation.Util/ExceptionDialogForm.Designer.cs b/AppliStation/AppliStation.Util/ExceptionDialogForm.Designer.cs
new file mode 100644 (file)
index 0000000..aae925b
--- /dev/null
@@ -0,0 +1,164 @@
+namespace AppliStation.Util\r
+{\r
+       partial class ExceptionDialogForm\r
+       {\r
+               /// <summary>\r
+               /// Designer variable used to keep track of non-visual components.\r
+               /// </summary>\r
+               private System.ComponentModel.IContainer components = null;\r
+               \r
+               /// <summary>\r
+               /// Disposes resources used by the form.\r
+               /// </summary>\r
+               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+               protected override void Dispose(bool disposing)\r
+               {\r
+                       if (disposing) {\r
+                               if (components != null) {\r
+                                       components.Dispose();\r
+                               }\r
+                       }\r
+                       base.Dispose(disposing);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This method is required for Windows Forms designer support.\r
+               /// Do not change the method contents inside the source code editor. The Forms designer might\r
+               /// not be able to load this method if it was changed manually.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       this.label1 = new System.Windows.Forms.Label();\r
+                       this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.detailTextBox = new System.Windows.Forms.TextBox();\r
+                       this.buttonsPanel = new System.Windows.Forms.FlowLayoutPanel();\r
+                       this.viewDetailButton = new System.Windows.Forms.Button();\r
+                       this.quitButton = new System.Windows.Forms.Button();\r
+                       this.continueButton = new System.Windows.Forms.Button();\r
+                       this.tableLayoutPanel1.SuspendLayout();\r
+                       this.buttonsPanel.SuspendLayout();\r
+                       this.SuspendLayout();\r
+                       // \r
+                       // label1\r
+                       // \r
+                       this.label1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.label1.Location = new System.Drawing.Point(8, 8);\r
+                       this.label1.Margin = new System.Windows.Forms.Padding(8);\r
+                       this.label1.Name = "label1";\r
+                       this.label1.RightToLeft = System.Windows.Forms.RightToLeft.No;\r
+                       this.label1.Size = new System.Drawing.Size(408, 84);\r
+                       this.label1.TabIndex = 0;\r
+                       this.label1.Text = "ご迷惑をかけて申し訳ありません。AppliStationの実行中に予期せぬエラーが発生いたしました。\r\n\r\n動作を継続すればAppliStationはご利用いただ" +\r
+                       "けますが、正常な動作をしないことがありえます。";\r
+                       this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
+                       // \r
+                       // tableLayoutPanel1\r
+                       // \r
+                       this.tableLayoutPanel1.ColumnCount = 1;\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 414F));\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
+                       this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);\r
+                       this.tableLayoutPanel1.Controls.Add(this.detailTextBox, 0, 2);\r
+                       this.tableLayoutPanel1.Controls.Add(this.buttonsPanel, 0, 1);\r
+                       this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+                       this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
+                       this.tableLayoutPanel1.RowCount = 3;\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.Size = new System.Drawing.Size(424, 136);\r
+                       this.tableLayoutPanel1.TabIndex = 0;\r
+                       // \r
+                       // detailTextBox\r
+                       // \r
+                       this.detailTextBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.detailTextBox.ImeMode = System.Windows.Forms.ImeMode.Off;\r
+                       this.detailTextBox.Location = new System.Drawing.Point(12, 148);\r
+                       this.detailTextBox.Margin = new System.Windows.Forms.Padding(12);\r
+                       this.detailTextBox.Multiline = true;\r
+                       this.detailTextBox.Name = "detailTextBox";\r
+                       this.detailTextBox.ReadOnly = true;\r
+                       this.detailTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
+                       this.detailTextBox.Size = new System.Drawing.Size(400, 1);\r
+                       this.detailTextBox.TabIndex = 5;\r
+                       this.detailTextBox.Visible = false;\r
+                       // \r
+                       // buttonsPanel\r
+                       // \r
+                       this.buttonsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));\r
+                       this.buttonsPanel.AutoSize = true;\r
+                       this.buttonsPanel.Controls.Add(this.viewDetailButton);\r
+                       this.buttonsPanel.Controls.Add(this.quitButton);\r
+                       this.buttonsPanel.Controls.Add(this.continueButton);\r
+                       this.buttonsPanel.Location = new System.Drawing.Point(18, 103);\r
+                       this.buttonsPanel.Name = "buttonsPanel";\r
+                       this.buttonsPanel.Size = new System.Drawing.Size(403, 30);\r
+                       this.buttonsPanel.TabIndex = 4;\r
+                       // \r
+                       // viewDetailButton\r
+                       // \r
+                       this.viewDetailButton.Anchor = System.Windows.Forms.AnchorStyles.None;\r
+                       this.viewDetailButton.AutoSize = true;\r
+                       this.viewDetailButton.Location = new System.Drawing.Point(3, 4);\r
+                       this.viewDetailButton.Margin = new System.Windows.Forms.Padding(3, 3, 10, 3);\r
+                       this.viewDetailButton.Name = "viewDetailButton";\r
+                       this.viewDetailButton.Size = new System.Drawing.Size(125, 22);\r
+                       this.viewDetailButton.TabIndex = 0;\r
+                       this.viewDetailButton.Text = "エラーの詳細を表示(&D)";\r
+                       this.viewDetailButton.Click += new System.EventHandler(this.ViewDetailLabelLinkClicked);\r
+                       // \r
+                       // quitButton\r
+                       // \r
+                       this.quitButton.AutoSize = true;\r
+                       this.quitButton.DialogResult = System.Windows.Forms.DialogResult.OK;\r
+                       this.quitButton.Location = new System.Drawing.Point(141, 3);\r
+                       this.quitButton.Name = "quitButton";\r
+                       this.quitButton.Size = new System.Drawing.Size(129, 24);\r
+                       this.quitButton.TabIndex = 1;\r
+                       this.quitButton.Text = "AppliStationを終了(&X)";\r
+                       this.quitButton.UseVisualStyleBackColor = true;\r
+                       // \r
+                       // continueButton\r
+                       // \r
+                       this.continueButton.AutoSize = true;\r
+                       this.continueButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+                       this.continueButton.Location = new System.Drawing.Point(276, 3);\r
+                       this.continueButton.Name = "continueButton";\r
+                       this.continueButton.Size = new System.Drawing.Size(124, 24);\r
+                       this.continueButton.TabIndex = 2;\r
+                       this.continueButton.Text = "強制的に動作継続(&C)";\r
+                       this.continueButton.UseVisualStyleBackColor = true;\r
+                       // \r
+                       // ExceptionDialogForm\r
+                       // \r
+                       this.AcceptButton = this.quitButton;\r
+                       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+                       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+                       this.AutoSize = true;\r
+                       this.CancelButton = this.continueButton;\r
+                       this.ClientSize = new System.Drawing.Size(424, 136);\r
+                       this.Controls.Add(this.tableLayoutPanel1);\r
+                       this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
+                       this.MaximizeBox = false;\r
+                       this.Name = "ExceptionDialogForm";\r
+                       this.ShowIcon = false;\r
+                       this.ShowInTaskbar = false;\r
+                       this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
+                       this.Text = "AppliStationのエラー発生";\r
+                       this.Shown += new System.EventHandler(this.Form_Shown);\r
+                       this.tableLayoutPanel1.ResumeLayout(false);\r
+                       this.tableLayoutPanel1.PerformLayout();\r
+                       this.buttonsPanel.ResumeLayout(false);\r
+                       this.buttonsPanel.PerformLayout();\r
+                       this.ResumeLayout(false);\r
+               }\r
+               private System.Windows.Forms.FlowLayoutPanel buttonsPanel;\r
+               private System.Windows.Forms.TextBox detailTextBox;\r
+               private System.Windows.Forms.Button continueButton;\r
+               private System.Windows.Forms.Button quitButton;\r
+               private System.Windows.Forms.Button viewDetailButton;\r
+               private System.Windows.Forms.Label label1;\r
+               private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.Util/ExceptionDialogForm.cs b/AppliStation/AppliStation.Util/ExceptionDialogForm.cs
new file mode 100644 (file)
index 0000000..2d414d6
--- /dev/null
@@ -0,0 +1,60 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+\r
+namespace AppliStation.Util\r
+{\r
+       /// <summary>\r
+       /// Description of ExceptionDialogForm.\r
+       /// </summary>\r
+       public partial class ExceptionDialogForm : Form\r
+       {\r
+               public ExceptionDialogForm()\r
+               {\r
+                       //\r
+                       // The InitializeComponent() call is required for Windows Forms designer support.\r
+                       //\r
+                       InitializeComponent();\r
+               }\r
+               \r
+               private static void Application_ThrowException(Exception e)\r
+               {\r
+                       ExceptionDialogForm form = new ExceptionDialogForm();\r
+                       if (e != null) {\r
+                               form.detailTextBox.Text = e.ToString() + System.Environment.NewLine + e.StackTrace;\r
+                       } else {\r
+                               form.viewDetailButton.Visible = false;\r
+                       }\r
+                       \r
+                       switch (form.ShowDialog()) {\r
+                               case DialogResult.Cancel:\r
+                                       return;\r
+                               default:\r
+                                       Application.Exit();\r
+                                       break;\r
+                       }\r
+               }\r
+               \r
+               public static void Application_ThrowException(object sender, System.Threading.ThreadExceptionEventArgs e)\r
+               {\r
+                       Application_ThrowException(e.Exception);\r
+               }\r
+               \r
+               public static void Application_ThrowException(object sender, UnhandledExceptionEventArgs e)\r
+               {\r
+                       Application_ThrowException((Exception) e.ExceptionObject);\r
+               }\r
+               \r
+               void ViewDetailLabelLinkClicked(object sender, EventArgs e)\r
+               {\r
+                       this.detailTextBox.Visible = true;\r
+                       this.viewDetailButton.Enabled = false;\r
+                       this.Size = new Size(this.Size.Width, this.Size.Height + 250);\r
+               }\r
+               \r
+               void Form_Shown(object sender, EventArgs e)\r
+               {\r
+                       this.quitButton.Focus();\r
+               }\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.Util/ExceptionDialogForm.resx b/AppliStation/AppliStation.Util/ExceptionDialogForm.resx
new file mode 100644 (file)
index 0000000..5ea0895
--- /dev/null
@@ -0,0 +1,120 @@
+<?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=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/AppliStation/AppliStation.Util/ExecutionProgressViewer.Designer.cs b/AppliStation/AppliStation.Util/ExecutionProgressViewer.Designer.cs
new file mode 100644 (file)
index 0000000..fe8ef84
--- /dev/null
@@ -0,0 +1,200 @@
+\r
+namespace AppliStation.Util\r
+{\r
+       partial class ExecutionProgressViewer\r
+       {\r
+               /// <summary>\r
+               /// Designer variable used to keep track of non-visual components.\r
+               /// </summary>\r
+               private System.ComponentModel.IContainer components = null;\r
+               \r
+               /// <summary>\r
+               /// Disposes resources used by the form.\r
+               /// </summary>\r
+               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+               protected override void Dispose(bool disposing)\r
+               {\r
+                       if (disposing) {\r
+                               if (components != null) {\r
+                                       components.Dispose();\r
+                               }\r
+                       }\r
+                       base.Dispose(disposing);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This method is required for Windows Forms designer support.\r
+               /// Do not change the method contents inside the source code editor. The Forms designer might\r
+               /// not be able to load this method if it was changed manually.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.progressSubLabel = new System.Windows.Forms.Label();\r
+                       this.subtitleLabel = new System.Windows.Forms.Label();\r
+                       this.progressBar = new System.Windows.Forms.ProgressBar();\r
+                       this.progressLabel = new System.Windows.Forms.Label();\r
+                       this.progressBarSub = new System.Windows.Forms.ProgressBar();\r
+                       this.bottomPanel = new System.Windows.Forms.FlowLayoutPanel();\r
+                       this.okButton = new System.Windows.Forms.Button();\r
+                       this.cancelButton = new System.Windows.Forms.Button();\r
+                       this.logBox = new System.Windows.Forms.RichTextBox();\r
+                       this.tableLayoutPanel1.SuspendLayout();\r
+                       this.bottomPanel.SuspendLayout();\r
+                       this.SuspendLayout();\r
+                       // \r
+                       // tableLayoutPanel1\r
+                       // \r
+                       this.tableLayoutPanel1.ColumnCount = 1;\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
+                       this.tableLayoutPanel1.Controls.Add(this.progressSubLabel, 0, 5);\r
+                       this.tableLayoutPanel1.Controls.Add(this.subtitleLabel, 0, 0);\r
+                       this.tableLayoutPanel1.Controls.Add(this.progressBar, 0, 1);\r
+                       this.tableLayoutPanel1.Controls.Add(this.progressLabel, 0, 2);\r
+                       this.tableLayoutPanel1.Controls.Add(this.progressBarSub, 0, 4);\r
+                       this.tableLayoutPanel1.Controls.Add(this.bottomPanel, 0, 7);\r
+                       this.tableLayoutPanel1.Controls.Add(this.logBox, 0, 6);\r
+                       this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+                       this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
+                       this.tableLayoutPanel1.RowCount = 8;\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.Size = new System.Drawing.Size(444, 318);\r
+                       this.tableLayoutPanel1.TabIndex = 0;\r
+                       // \r
+                       // progressSubLabel\r
+                       // \r
+                       this.progressSubLabel.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.progressSubLabel.Location = new System.Drawing.Point(10, 128);\r
+                       this.progressSubLabel.Margin = new System.Windows.Forms.Padding(10, 0, 3, 0);\r
+                       this.progressSubLabel.Name = "progressSubLabel";\r
+                       this.progressSubLabel.Size = new System.Drawing.Size(431, 26);\r
+                       this.progressSubLabel.TabIndex = 6;\r
+                       this.progressSubLabel.Text = "しばらくお待ちください...";\r
+                       this.progressSubLabel.Visible = false;\r
+                       // \r
+                       // subtitleLabel\r
+                       // \r
+                       this.subtitleLabel.Dock = System.Windows.Forms.DockStyle.Bottom;\r
+                       this.subtitleLabel.Location = new System.Drawing.Point(3, 27);\r
+                       this.subtitleLabel.Name = "subtitleLabel";\r
+                       this.subtitleLabel.Size = new System.Drawing.Size(438, 23);\r
+                       this.subtitleLabel.TabIndex = 0;\r
+                       this.subtitleLabel.Text = "しばらくお待ちください...";\r
+                       // \r
+                       // progressBar\r
+                       // \r
+                       this.progressBar.Dock = System.Windows.Forms.DockStyle.Top;\r
+                       this.progressBar.Location = new System.Drawing.Point(10, 53);\r
+                       this.progressBar.Margin = new System.Windows.Forms.Padding(10, 3, 10, 3);\r
+                       this.progressBar.Name = "progressBar";\r
+                       this.progressBar.Size = new System.Drawing.Size(424, 20);\r
+                       this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;\r
+                       this.progressBar.TabIndex = 2;\r
+                       // \r
+                       // progressLabel\r
+                       // \r
+                       this.progressLabel.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.progressLabel.Location = new System.Drawing.Point(10, 76);\r
+                       this.progressLabel.Margin = new System.Windows.Forms.Padding(10, 0, 3, 0);\r
+                       this.progressLabel.Name = "progressLabel";\r
+                       this.progressLabel.Size = new System.Drawing.Size(431, 26);\r
+                       this.progressLabel.TabIndex = 3;\r
+                       this.progressLabel.Text = "しばらくお待ちください...";\r
+                       // \r
+                       // progressBarSub\r
+                       // \r
+                       this.progressBarSub.Dock = System.Windows.Forms.DockStyle.Top;\r
+                       this.progressBarSub.Location = new System.Drawing.Point(10, 105);\r
+                       this.progressBarSub.Margin = new System.Windows.Forms.Padding(10, 3, 10, 3);\r
+                       this.progressBarSub.Name = "progressBarSub";\r
+                       this.progressBarSub.Size = new System.Drawing.Size(424, 20);\r
+                       this.progressBarSub.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
+                       this.progressBarSub.TabIndex = 5;\r
+                       this.progressBarSub.Visible = false;\r
+                       // \r
+                       // bottomPanel\r
+                       // \r
+                       this.bottomPanel.AutoSize = true;\r
+                       this.bottomPanel.Controls.Add(this.okButton);\r
+                       this.bottomPanel.Controls.Add(this.cancelButton);\r
+                       this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Right;\r
+                       this.bottomPanel.Location = new System.Drawing.Point(279, 286);\r
+                       this.bottomPanel.Name = "bottomPanel";\r
+                       this.bottomPanel.Size = new System.Drawing.Size(162, 29);\r
+                       this.bottomPanel.TabIndex = 4;\r
+                       // \r
+                       // okButton\r
+                       // \r
+                       this.okButton.Enabled = false;\r
+                       this.okButton.Location = new System.Drawing.Point(3, 3);\r
+                       this.okButton.Name = "okButton";\r
+                       this.okButton.Size = new System.Drawing.Size(75, 23);\r
+                       this.okButton.TabIndex = 0;\r
+                       this.okButton.Text = "OK";\r
+                       this.okButton.UseVisualStyleBackColor = true;\r
+                       this.okButton.Click += new System.EventHandler(this.OkButtonClick);\r
+                       // \r
+                       // cancelButton\r
+                       // \r
+                       this.cancelButton.Enabled = false;\r
+                       this.cancelButton.Location = new System.Drawing.Point(84, 3);\r
+                       this.cancelButton.Name = "cancelButton";\r
+                       this.cancelButton.Size = new System.Drawing.Size(75, 23);\r
+                       this.cancelButton.TabIndex = 1;\r
+                       this.cancelButton.Text = "キャンセル";\r
+                       this.cancelButton.UseVisualStyleBackColor = true;\r
+                       this.cancelButton.Click += new System.EventHandler(this.CancelButtonClick);\r
+                       // \r
+                       // logBox\r
+                       // \r
+                       this.logBox.BackColor = System.Drawing.SystemColors.Control;\r
+                       this.logBox.DetectUrls = false;\r
+                       this.logBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.logBox.ForeColor = System.Drawing.SystemColors.ControlText;\r
+                       this.logBox.Location = new System.Drawing.Point(10, 157);\r
+                       this.logBox.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);\r
+                       this.logBox.Name = "logBox";\r
+                       this.logBox.ReadOnly = true;\r
+                       this.logBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;\r
+                       this.logBox.Size = new System.Drawing.Size(431, 123);\r
+                       this.logBox.TabIndex = 8;\r
+                       this.logBox.Text = "";\r
+                       // \r
+                       // ExecutionProgressViewer\r
+                       // \r
+                       this.AcceptButton = this.okButton;\r
+                       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+                       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+                       this.ClientSize = new System.Drawing.Size(444, 318);\r
+                       this.Controls.Add(this.tableLayoutPanel1);\r
+                       this.MaximizeBox = false;\r
+                       this.Name = "ExecutionProgressViewer";\r
+                       this.ShowIcon = false;\r
+                       this.Text = "AppliStation";\r
+                       this.Shown += new System.EventHandler(this.ExecutionProgressViewerShown);\r
+                       this.tableLayoutPanel1.ResumeLayout(false);\r
+                       this.tableLayoutPanel1.PerformLayout();\r
+                       this.bottomPanel.ResumeLayout(false);\r
+                       this.ResumeLayout(false);\r
+               }\r
+               private System.Windows.Forms.Button cancelButton;\r
+               private System.Windows.Forms.Button okButton;\r
+               private System.Windows.Forms.RichTextBox logBox;\r
+               private System.Windows.Forms.Label progressSubLabel;\r
+               private System.Windows.Forms.ProgressBar progressBarSub;\r
+               private System.Windows.Forms.FlowLayoutPanel bottomPanel;\r
+               private System.Windows.Forms.Label progressLabel;\r
+               private System.Windows.Forms.ProgressBar progressBar;\r
+               private System.Windows.Forms.Label subtitleLabel;\r
+               private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.Util/ExecutionProgressViewer.cs b/AppliStation/AppliStation.Util/ExecutionProgressViewer.cs
new file mode 100644 (file)
index 0000000..2b99bfb
--- /dev/null
@@ -0,0 +1,206 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.Threading;\r
+using NaGet.SubCommands;\r
+using NaGet.Net;\r
+\r
+namespace AppliStation.Util\r
+{\r
+       /// <summary>\r
+       /// Description of ExecutionProgressViewer.\r
+       /// </summary>\r
+       public partial class ExecutionProgressViewer : Form\r
+       {\r
+               private NaGetTaskSet taskSet;\r
+               \r
+               private Downloader downloader;\r
+               \r
+               private Thread tasksetRunningThread = null;\r
+               \r
+               public Downloader Downloader {\r
+                       get { return downloader; }\r
+               }\r
+               \r
+               public ExecutionProgressViewer()\r
+               {\r
+                       //\r
+                       // The InitializeComponent() call is required for Windows Forms designer support.\r
+                       //\r
+                       InitializeComponent();\r
+                       \r
+                       downloader = new Downloader();\r
+                       downloader.DownloadEventRaised += delegate(object sender, DownloadEventArgs e) {\r
+                               if (InvokeRequired) {\r
+                                       Invoke(new EventHandler<DownloadEventArgs>(onDownloadEvent), sender, e);\r
+                               } else {\r
+                                       onDownloadEvent(sender, e);\r
+                               }\r
+                       };\r
+               }\r
+               \r
+               private void onDownloadEvent(object sender, DownloadEventArgs a)\r
+               {\r
+                       if (a.TaskProgressPercent >= 0) {\r
+                               progressBarSub.Value = (int) a.TaskProgressPercent;\r
+                               progressBarSub.Style = ProgressBarStyle.Continuous;\r
+                       } else {\r
+                               progressBarSub.Style = ProgressBarStyle.Marquee;\r
+                       }\r
+                       \r
+                       switch (a.Type) {\r
+                               case DownloadEventType.INITED:\r
+                               case DownloadEventType.CONNECTED:\r
+                                       progressSubLabel.Text = a.TaskMessage;\r
+                                       \r
+                                       progressBarSub.Visible = true;\r
+                                       progressSubLabel.Visible = true;\r
+                                       break;\r
+                               case DownloadEventType.DOWNLOADING:\r
+                                       progressSubLabel.Text = a.TaskMessage;\r
+                                       break;\r
+                               case DownloadEventType.COMPLETED:\r
+                                       progressBarSub.Visible = false;\r
+                                       progressSubLabel.Visible = false;\r
+                                       break;\r
+                               case DownloadEventType.ERROR:\r
+                                       progressBarSub.Visible = false;\r
+                                       progressSubLabel.Visible = false;\r
+                                       \r
+                                       logBox.SelectionColor = System.Drawing.Color.Red;\r
+                                       logBox.AppendText("   [\83G\83\89\81[] " + a.TaskMessage + System.Environment.NewLine);\r
+                                       logBox.SelectionColor = logBox.ForeColor;\r
+                                       break;\r
+                       }\r
+               }\r
+               \r
+               #region NaGetTaskSet\8aÖ\98A\r
+               \r
+               private void onTaskSetRaised(object sender, NaGetTaskSetEventArgs e)\r
+               {\r
+                       NaGetTaskSet taskSet = (NaGetTaskSet) sender;\r
+                       \r
+                       if (e.TaskProgressPercent >= 0) {\r
+                               progressBar.Value = (int) e.TaskProgressPercent;\r
+                               progressBar.Style = ProgressBarStyle.Continuous;\r
+                       } else {\r
+                               progressBar.Style = ProgressBarStyle.Marquee;\r
+                       }\r
+                       progressLabel.Text = e.TaskMessage ?? string.Empty;\r
+                       \r
+                       cancelButton.Enabled = taskSet.Running && taskSet.Cancelable;\r
+                       \r
+                       switch (e.Type) {\r
+                               case NaGetTaskSetEventType.COMPLETED:\r
+                                       logBox.AppendText("\8a®\97¹." + System.Environment.NewLine);\r
+                                       if (taskSet.Done) {\r
+                                               okButton.Enabled = true;\r
+                                               cancelButton.Enabled = false;\r
+                                       }\r
+                                       break;\r
+                               case NaGetTaskSetEventType.STARTED_TASKSET:\r
+                                       subtitleLabel.Text = taskSet.TaskSetNames[taskSet.CurrentTaskSetIndex];\r
+                                       logBox.AppendText("  " + e.TaskMessage + System.Environment.NewLine);\r
+                                       break;\r
+                               case NaGetTaskSetEventType.COMPLETED_TASKSET:\r
+                                       if (progressBarSub.Visible) progressBarSub.Hide();\r
+                                       if (progressSubLabel.Visible) progressSubLabel.Hide();\r
+                                       \r
+                                       NativeMethods.ProgressBar_SetState(progressBar, 1); // VistaProgress\90F\81F\83m\81[\83}\83\8b\r
+                                       \r
+                                       logBox.AppendText(string.Format(" ... \8a®\97¹. [{0}%]", (int) e.TaskProgressPercent));\r
+                                       logBox.AppendText(System.Environment.NewLine);\r
+                                       break;\r
+                               case NaGetTaskSetEventType.INFO:\r
+                                       logBox.AppendText("  " + e.TaskMessage + System.Environment.NewLine);\r
+                                       break;\r
+                               case NaGetTaskSetEventType.ERROR:\r
+                                       logBox.SelectionColor = System.Drawing.Color.Red;\r
+                                       logBox.AppendText("  [\83G\83\89\81[] " + e.TaskMessage + System.Environment.NewLine);\r
+                                       logBox.SelectionColor = logBox.ForeColor;\r
+                                       \r
+                                       NativeMethods.ProgressBar_SetState(progressBar, 2); // VistaProgress\90F\81F\83G\83\89\81[\r
+                                       \r
+                                       okButton.Enabled = true;\r
+                                       cancelButton.Enabled = false;\r
+                                       break;\r
+                               case NaGetTaskSetEventType.CANCELED:\r
+                                       logBox.SelectionColor = System.Drawing.Color.Red;\r
+                                       logBox.AppendText(e.TaskMessage + System.Environment.NewLine);\r
+                                       logBox.SelectionColor = logBox.ForeColor;\r
+                                       \r
+                                       NativeMethods.ProgressBar_SetState(progressBar, 1); // VistaProgress\90F\81F\92\86\92f\r
+                                       \r
+                                       okButton.Enabled = true;\r
+                                       cancelButton.Enabled = false;\r
+                                       break;\r
+                               case NaGetTaskSetEventType.WARNING:\r
+                                       logBox.SelectionColor = System.Drawing.Color.Red;\r
+                                       logBox.AppendText("  [\83G\83\89\81[] " + e.TaskMessage + System.Environment.NewLine);\r
+                                       logBox.SelectionColor = logBox.ForeColor;\r
+                                       \r
+                                       break;\r
+                       }\r
+                       \r
+                       if (taskSet.Done) {\r
+                               NativeMethods.Form_FlashWindow(this,\r
+                                                              NativeMethods.FlashFlag.All | NativeMethods.FlashFlag.TimerNoFG,\r
+                                                              uint.MaxValue, 0);\r
+                       }\r
+               }\r
+               \r
+               public void SetTaskSet(NaGetTaskSet taskSet)\r
+               {\r
+                       this.taskSet = taskSet;\r
+                       \r
+                       taskSet.TaskSetRaised += delegate(object sender, NaGetTaskSetEventArgs e) {\r
+                               if (InvokeRequired) {\r
+                                       Invoke(new EventHandler<NaGetTaskSetEventArgs>(onTaskSetRaised), taskSet, e);\r
+                               } else {\r
+                                       onTaskSetRaised(taskSet, e);\r
+                               }\r
+                       };\r
+               }\r
+\r
+               public void StartTaskSet()\r
+               {\r
+                       tasksetRunningThread = new Thread(taskSet.Run);\r
+                       tasksetRunningThread.Start();\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               void OkButtonClick(object sender, EventArgs e)\r
+               {\r
+                       if (taskSet == null || taskSet.Done) {\r
+                               this.Close();\r
+                               this.Dispose();\r
+                       }\r
+               }\r
+               \r
+               void CancelButtonClick(object sender, EventArgs e)\r
+               {\r
+                       if (InvokeRequired) {\r
+                               Invoke(new EventHandler(CancelButtonClickConcrete), sender, e);\r
+                       } else {\r
+                               CancelButtonClickConcrete(sender,e);\r
+                       }\r
+               }\r
+               \r
+               void CancelButtonClickConcrete(object sender, EventArgs e)\r
+               {\r
+                       if (taskSet != null && taskSet.Running && taskSet.Cancelable) {\r
+                               cancelButton.Enabled = false;\r
+                               \r
+                               NativeMethods.ProgressBar_SetState(progressBar, 3); // VistaProgress\90F\81F\92\86\92f\r
+                               \r
+                               taskSet.Cancel();\r
+                       }\r
+               }\r
+               \r
+               void ExecutionProgressViewerShown(object sender, EventArgs e)\r
+               {\r
+                       this.BringToFront();\r
+               }\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.Util/ExecutionProgressViewer.resx b/AppliStation/AppliStation.Util/ExecutionProgressViewer.resx
new file mode 100644 (file)
index 0000000..5ea0895
--- /dev/null
@@ -0,0 +1,120 @@
+<?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=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/AppliStation/AppliStation.Util/ListViewItemSortComparer.cs b/AppliStation/AppliStation.Util/ListViewItemSortComparer.cs
new file mode 100644 (file)
index 0000000..11a5f61
--- /dev/null
@@ -0,0 +1,43 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using NaGet.Packages;\r
+using NaGet.Packages.Install;\r
+using System.IO;\r
+using System.Collections.Generic;\r
+\r
+namespace AppliStation.Util\r
+{\r
+       class ListViewItemSortComparer : System.Collections.IComparer\r
+       {\r
+               public SortOrder Order = SortOrder.Ascending;\r
+               \r
+               public int Column = -1;\r
+               \r
+               public ListViewItemSortComparer(int index, SortOrder order)\r
+               {\r
+                       this.Column = index;\r
+                       this.Order = order;\r
+               }\r
+               \r
+               public int Compare(object x, object y)\r
+               {\r
+                       ListViewItem itemx = (ListViewItem) x;\r
+                       ListViewItem itemy = (ListViewItem) y;\r
+                       \r
+                       int result = -1;\r
+                       result = string.Compare(itemx.SubItems[Column].Text,\r
+                                               itemy.SubItems[Column].Text);\r
+                       \r
+                       switch (Order) {\r
+                               case SortOrder.Descending:\r
+                                       result =  -result;\r
+                                       break;\r
+                               case SortOrder.None:\r
+                                       result = 0;\r
+                                       break;\r
+                       }\r
+                       return result;\r
+               }\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.Util/NativeMethods.cs b/AppliStation/AppliStation.Util/NativeMethods.cs
new file mode 100644 (file)
index 0000000..f739712
--- /dev/null
@@ -0,0 +1,166 @@
+using System;\r
+using System.Runtime.InteropServices;\r
+using System.Windows.Forms;\r
+\r
+namespace AppliStation.Util\r
+{\r
+       public sealed class NativeMethods\r
+       {\r
+               private NativeMethods()\r
+               {\r
+               }\r
+               \r
+               \r
+               /// <summary>\r
+               /// WindowsVista\8cü\82¯\81A\83v\83\8d\83O\83\8c\83X\83o\81[\83X\83e\81[\83^\83X(\90F)\82ð\90Ý\92è\82·\82é\r
+               /// </summary>\r
+               /// <param name="progBar">\91Î\8fÛ\82Ì\83v\83\8d\83O\83\8c\83X\83o\81[</param>\r
+               /// <param name="state">\8fó\91Ô\81B(1:Normal,2:Error,3:Paused)</param>\r
+               public static void ProgressBar_SetState(ProgressBar progBar, uint state)\r
+               {\r
+                       try {\r
+                               // status := (PBST_NORMAL | PBST_ERROR | PBST_PAUSED)\r
+                               // SendMessage(progressBar.Handle, PBM_SETSTATE, state, 0);\r
+                               SendMessage(progBar.Handle, 0x410, state, 0);\r
+                       } catch (Exception) {\r
+                       }\r
+               }\r
+               \r
+               #region \83^\83X\83N\83o\81[\82¨\82æ\82Ñ\83^\83C\83g\83\8b\83o\81[\82Ì\83t\83\89\83b\83V\83\85\r
+               \r
+               /// <summary>\r
+               /// \83^\83X\83N\83o\81[\82¨\82æ\82Ñ\83^\83C\83g\83\8b\83o\81[\83{\83^\83\93\82Ì\83t\83\89\83b\83V\83\85\82Ì\90Ý\92è\83t\83\89\83O\r
+               /// </summary>\r
+               public enum FlashFlag : uint {\r
+                       /// <summary>\r
+                       /// \93_\96Å\82Ì\92â\8e~\r
+                       /// </summary>\r
+                       Stop = 0,\r
+                       /// <summary>\r
+                       /// \83^\83C\83g\83\8b\83o\81[\82ð\93_\96Å\r
+                       /// </summary>\r
+                       Caption = 1,\r
+                       /// <summary>\r
+                       /// \83^\83X\83N\83o\81[\83{\83^\83\93\82ð\93_\96Å\r
+                       /// </summary>\r
+                       Tray = 2,\r
+                       /// <summary>\r
+                       /// \83^\83C\83g\83\8b\83o\81[\82Æ\83^\83X\83N\83o\81[\83{\83^\83\93\82ð\93_\96Å\r
+                       /// </summary>\r
+                       All = 3,\r
+                       /// <summary>\r
+                       /// Stop\82ª\90Ý\92è\82³\82ê\82é\82Ü\82Å\93_\96Å\82·\82é\r
+                       /// </summary>\r
+                       Timer = 4,\r
+                       /// <summary>\r
+                       /// \83t\83H\83A\83O\83\89\83E\83\93\83h\82Ì\8fó\91Ô\82É\82È\82é\82Ü\82Å\93_\96Å\r
+                       /// </summary>\r
+                       TimerNoFG = 12,\r
+               }\r
+               \r
+               [StructLayout(LayoutKind.Sequential)]\r
+               struct FLASHWINFO\r
+               {\r
+                   public int cbSize;\r
+                   public IntPtr hWnd;\r
+                   public FlashFlag dwFlags;\r
+                   public uint uCount;\r
+                   public uint dwTimeout;\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \83^\83X\83N\83o\81[\82¨\82æ\82Ñ\83^\83C\83g\83\8b\83o\81[\83{\83^\83\93\82ð\93_\96Å\82³\82¹\82é\r
+               /// </summary>\r
+               /// <param name="form">\91Î\8fÛ\83t\83H\81[\83\80</param>\r
+               /// <param name="flag">\93_\96Å\83p\83\89\83\81\81[\83^\83t\83\89\83O</param>\r
+               /// <param name="count">\93_\96Å\89ñ\90\94</param>\r
+               /// <param name="timeout">\93_\96Å\82Ì\8aÔ\8au(\83~\83\8a\95b)</param>\r
+               /// <returns></returns>\r
+               public static bool Form_FlashWindow(Form form, FlashFlag flag, uint count, uint timeout)\r
+               {\r
+                       try {\r
+                               FLASHWINFO info = new FLASHWINFO();\r
+                               info.cbSize = Marshal.SizeOf(typeof(FLASHWINFO));\r
+                               info.hWnd = form.Handle;\r
+                               info.dwFlags = flag;\r
+                               info.uCount = count;\r
+                               info.dwTimeout = timeout;\r
+                               \r
+                               return FlashWindowEx(ref info) == 0;\r
+                       } catch (Exception) {\r
+                               return false;\r
+                       }\r
+               }\r
+               \r
+               [DllImport("user32.dll")]\r
+               static extern Int32 FlashWindowEx(ref FLASHWINFO pwfi);\r
+               \r
+               #endregion\r
+               \r
+               #region ColumnHeader\82Ì\83\\81[\83g\82Ì\8eO\8ap\88ó\97p\r
+               \r
+               [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]\r
+               internal struct HD_ITEM\r
+               {\r
+                       public uint    mask;\r
+                       public int     cxy;\r
+                       [MarshalAs(UnmanagedType.LPTStr)]public string   pszText;\r
+                       public IntPtr   hbm;\r
+                       public int     cchTextMax;\r
+                       public int     fmt;\r
+                       [MarshalAs(UnmanagedType.LPTStr)]public string  lParam;\r
+                       public int     iImage;        // index of bitmap in ImageList\r
+                       public int     iOrder;\r
+               }\r
+               \r
+               internal static IntPtr ListView_GetHeader(ListView listview)\r
+               {\r
+                       // SendMessage(hWnd, LVM_GETHEADER, 0, NULL);\r
+                       return SendMessage(listview.Handle, 0x101E, 0, 0);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// WinXP\88È\8d~\81A\83\\81[\83g\82Ì\96î\88ó\82ð\95\\8e¦\r
+               /// </summary>\r
+               /// <param name="listView">\91Î\8fÛ\82ÌListView</param>\r
+               /// <param name="column">\95\\8e¦\82·\82é\96î\88ó\82Ì\83w\83b\83_</param>\r
+               /// <param name="order">\83\\81[\83g\82Ì\8f¸\8f\87\81E\8d~\8f\87</param>\r
+               public static void ColumnHeader_SetSortState(ListView listView, int column, SortOrder order)\r
+               {\r
+                       try {\r
+                               // SendMessage(hWnd, LVM_GETHEADER, NULL, NULL);\r
+                               IntPtr hWnd = SendMessage(listView.Handle, 0x101F, 0, 0);\r
+                               \r
+                               HD_ITEM hdi = new HD_ITEM();\r
+                               hdi.mask = 0x0004; // HDI_FORMAT;\r
+                               for (int i = 0; i < listView.Columns.Count; i++) {\r
+                                       // SendMessage(hWnd, HDM_GETITEMW, i, &hdi);\r
+                                       SendMessage(hWnd, 0x120b, i, ref hdi);\r
+                                       \r
+                                       const int HDF_SORTUP = 0x400;\r
+                                       const int HDF_SORTDOWN = 0x200;\r
+                                       \r
+                                       if (i != column || order == SortOrder.None) {\r
+                                               hdi.fmt = hdi.fmt & ~(HDF_SORTUP | HDF_SORTDOWN);\r
+                                       } else if (order == SortOrder.Ascending) { // \8f¸\8f\87\r
+                                               hdi.fmt = hdi.fmt & ~HDF_SORTDOWN | HDF_SORTUP;\r
+                                       } else if (order == SortOrder.Descending) { // \8d~\8f\87\r
+                                               hdi.fmt = hdi.fmt & ~HDF_SORTUP | HDF_SORTDOWN;\r
+                                       }\r
+                                       \r
+                                       // SendMessage(hWnd, HDM_SETITEMW, i, &hdi);\r
+                                       SendMessage(hWnd, 0x120c, i, ref hdi);\r
+                               }\r
+                       } catch (Exception) {\r
+                       }\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               [DllImport("user32.dll", CharSet=CharSet.Auto)]\r
+               internal static extern IntPtr SendMessage( IntPtr hWnd, UInt32 Msg, UInt32 wParam, UInt32 lParam);\r
+               \r
+               [DllImport("user32.dll", CharSet=CharSet.Auto)]\r
+               internal static extern IntPtr SendMessage( IntPtr hWnd, UInt32 Msg, int wParam, ref HD_ITEM lParam);\r
+       }\r
+}\r
diff --git a/AppliStation/AppliStation.csproj b/AppliStation/AppliStation.csproj
new file mode 100644 (file)
index 0000000..908fae6
--- /dev/null
@@ -0,0 +1,110 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <ProjectGuid>{0FC9CFF6-95CE-4C2D-833D-F6D697CD57EB}</ProjectGuid>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <OutputType>WinExe</OutputType>\r
+    <RootNamespace>AppliStation</RootNamespace>\r
+    <AssemblyName>AppliStation</AssemblyName>\r
+    <BaseIntermediateOutputPath>bin\</BaseIntermediateOutputPath>\r
+    <AllowUnsafeBlocks>False</AllowUnsafeBlocks>\r
+    <NoStdLib>False</NoStdLib>\r
+    <WarningLevel>4</WarningLevel>\r
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>\r
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <OutputPath>bin\Debug\</OutputPath>\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>Full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <OutputType>WinExe</OutputType>\r
+    <AssemblyName>AppliStation</AssemblyName>\r
+    <RootNamespace>AppliStation</RootNamespace>\r
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <OutputPath>bin\Release\</OutputPath>\r
+    <DebugSymbols>false</DebugSymbols>\r
+    <DebugType>None</DebugType>\r
+    <Optimize>true</Optimize>\r
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>\r
+    <DefineConstants>TRACE</DefineConstants>\r
+    <OutputType>WinExe</OutputType>\r
+    <AssemblyName>AppliStation</AssemblyName>\r
+    <RootNamespace>AppliStation</RootNamespace>\r
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">\r
+    <RegisterForComInterop>False</RegisterForComInterop>\r
+    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>\r
+    <BaseAddress>4194304</BaseAddress>\r
+    <PlatformTarget>AnyCPU</PlatformTarget>\r
+    <FileAlignment>4096</FileAlignment>\r
+  </PropertyGroup>\r
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />\r
+  <ItemGroup>\r
+    <Reference Include="System" />\r
+    <Reference Include="System.Drawing" />\r
+    <Reference Include="System.Drawing.Design" />\r
+    <Reference Include="System.Web" />\r
+    <Reference Include="System.Windows.Forms" />\r
+    <Reference Include="System.Xml" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="AppliStation.Util\ExceptionDialogForm.cs" />\r
+    <Compile Include="AppliStation.Util\ExceptionDialogForm.Designer.cs">\r
+      <DependentUpon>ExceptionDialogForm.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="AppliStation.Util\ExecutionProgressViewer.cs" />\r
+    <Compile Include="AppliStation.Util\ExecutionProgressViewer.Designer.cs">\r
+      <DependentUpon>ExecutionProgressViewer.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="AppliStation.Util\ListViewItemSortComparer.cs" />\r
+    <Compile Include="AppliStation.Util\NativeMethods.cs" />\r
+    <Compile Include="AssemblyInfo.cs" />\r
+    <Compile Include="ArgParse.cs" />\r
+    <Compile Include="PackageListViewForm.cs" />\r
+    <Compile Include="PackageListViewForm.Designer.cs">\r
+      <DependentUpon>PackageListViewForm.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="PackagesInstallConfirmForm.cs" />\r
+    <Compile Include="PackagesInstallConfirmForm.Designer.cs">\r
+      <DependentUpon>PackagesInstallConfirmForm.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="PackageUninstallConfirmForm.cs" />\r
+    <Compile Include="PackageUninstallConfirmForm.Designer.cs">\r
+      <DependentUpon>PackageUninstallConfirmForm.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="Program.cs" />\r
+    <EmbeddedResource Include="AppliStation.Util\ExceptionDialogForm.resx">\r
+      <DependentUpon>ExceptionDialogForm.Designer.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="AppliStation.Util\ExecutionProgressViewer.resx">\r
+      <DependentUpon>ExecutionProgressViewer.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="PackageListViewForm.resx">\r
+      <DependentUpon>PackageListViewForm.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="PackagesInstallConfirmForm.resx">\r
+      <DependentUpon>PackagesInstallConfirmForm.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <EmbeddedResource Include="PackageUninstallConfirmForm.resx">\r
+      <DependentUpon>PackageUninstallConfirmForm.cs</DependentUpon>\r
+    </EmbeddedResource>\r
+    <None Include="SplashScreen.png">\r
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+    </None>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Folder Include="AppliStation.Util" />\r
+    <ProjectReference Include="..\na-get-lib\na-get-lib.csproj">\r
+      <Project>{058E953D-3986-4F74-8516-5A50D267D36A}</Project>\r
+      <Name>na-get-lib</Name>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
diff --git a/AppliStation/ArgParse.cs b/AppliStation/ArgParse.cs
new file mode 100644 (file)
index 0000000..5754ffa
--- /dev/null
@@ -0,0 +1,118 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace AppliStation\r
+{\r
+       /// <summary>\r
+       /// \92á\8b@\94\\82È\88ø\90\94\89ð\90Í\82ð\82·\82é\81B\r
+       /// </summary>\r
+       public class ArgParse\r
+       {\r
+               /// <summary>\r
+               /// \89ð\90Í\8c\8b\89Ê\r
+               /// </summary>\r
+               private Dictionary<string,object> opts;\r
+               \r
+               /// <summary>\r
+               /// \89ð\90Í\8c\8b\89Ê\82ð\83n\83b\83V\83\85\8e«\8f\91\82Æ\82µ\82Ä\8eæ\93¾\r
+               /// </summary>\r
+               public Dictionary<string, object> Opts {\r
+                       get {\r
+                               lock (opts) {\r
+                                       return opts;\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public ArgParse()\r
+                       : this(new Dictionary<string,object>())\r
+               {\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \8f\89\8aú\89»\r
+               /// </summary>\r
+               /// <param name="hashDefault">\8f\89\8aú\82Ì\8e«\8f\91</param>\r
+               public ArgParse(Dictionary<string,object> hashDefault)\r
+               {\r
+                       opts = hashDefault;\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \83n\83b\83V\83\85\82Ì\92\86\90g\82ð\90Ý\92è\82 \82é\82¢\82Í\8eæ\93¾\82·\82é\81B\r
+               /// </summary>\r
+               public object this[string key] {\r
+                       set {\r
+                               lock(opts) {\r
+                                       opts[key] = value;\r
+                               }\r
+                       }\r
+                       get {\r
+                               lock(opts) {\r
+                                       return opts[key];\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \88ø\90\94\82ð\89ð\90Í\82·\82é\r
+               /// </summary>\r
+               /// <param name="args">\91Î\8fÛ\88ø\90\94</param>\r
+               /// <returns>\8ec\82Á\82½(\83I\83v\83V\83\87\83\93\82Å\82Í\82È\82¢)\88ø\90\94</returns>\r
+               public string[] Parse(string[] args)\r
+               {\r
+                       List<string> rest = new List<string>();\r
+                       lock (opts) {\r
+                               bool disableOptionParse = false;\r
+                               for (int i = 0; i < args.Length; i++) {\r
+                                       if (disableOptionParse || !args[i].StartsWith("-")) {\r
+                                               rest.Add(args[i]);\r
+                                       } else {\r
+                                               if (args[i].StartsWith("-")) {\r
+                                                       if (args[i] == "--") {\r
+                                                               // \83I\83v\83V\83\87\83\93\89ð\90Í\92\86\92f\r
+                                                               disableOptionParse = true;\r
+                                                       } else {\r
+                                                               parseOption(args[i]);\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+                       \r
+                       return rest.ToArray();\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \83I\83v\83V\83\87\83\93\83g\81[\83N\83\93\82Ì\89ð\90Í\r
+               /// </summary>\r
+               /// <param name="option"></param>\r
+               private void parseOption(string option)\r
+               {\r
+                       Match match = Regex.Match(option, "^--?([^=]+)(=\"?(.+)\"?)?$");\r
+                       if (match.Success) {\r
+                               string key = match.Groups[1].Value;\r
+                               string val = match.Groups[3].Value;\r
+                               \r
+                               if (opts.ContainsKey(key)) { // \93o\98^\8c\8b\89Ê\82É\93ü\82Á\82Ä\82¢\82é\82±\82Æ\r
+                                       object origVal = opts[key];\r
+                                       \r
+                                       try {\r
+                                               if (origVal is bool) {\r
+                                                       opts[key] = val.ToLower() != "no";\r
+                                               } else if (origVal is int) {\r
+                                                       opts[key] = int.Parse(val);\r
+                                               } else /* if (origVal is string) */ {\r
+                                                       opts[key] = val;\r
+                                               }\r
+                                       } catch (FormatException) {\r
+                                               throw new ApplicationException(string.Format("Illegal Format For {0}", key));\r
+                                       }\r
+                               } else {\r
+                                       throw new ApplicationException(string.Format("Undefined option: {0}", key));\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/AppliStation/AssemblyInfo.cs b/AppliStation/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..2f28673
--- /dev/null
@@ -0,0 +1,31 @@
+#region Using directives\r
+\r
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+#endregion\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("AppliStation")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("AppliStation")]\r
+[assembly: AssemblyCopyright("")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// This sets the default COM visibility of types in the assembly to invisible.\r
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The assembly version has following format :\r
+//\r
+// Major.Minor.Build.Revision\r
+//\r
+// You can specify all the values or you can use the default the Revision and \r
+// Build Numbers by using the '*' as shown below:\r
+[assembly: AssemblyVersion("0.9.8.*")]\r
diff --git a/AppliStation/PackageListViewForm.Designer.cs b/AppliStation/PackageListViewForm.Designer.cs
new file mode 100644 (file)
index 0000000..0a0abfa
--- /dev/null
@@ -0,0 +1,406 @@
+namespace AppliStation\r
+{\r
+       partial class PackageListViewForm\r
+       {\r
+               /// <summary>\r
+               /// Designer variable used to keep track of non-visual components.\r
+               /// </summary>\r
+               private System.ComponentModel.IContainer components = null;\r
+               \r
+               /// <summary>\r
+               /// Disposes resources used by the form.\r
+               /// </summary>\r
+               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+               protected override void Dispose(bool disposing)\r
+               {\r
+                       if (disposing) {\r
+                               if (components != null) {\r
+                                       components.Dispose();\r
+                               }\r
+                       }\r
+                       base.Dispose(disposing);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This method is required for Windows Forms designer support.\r
+               /// Do not change the method contents inside the source code editor. The Forms designer might\r
+               /// not be able to load this method if it was changed manually.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       this.components = new System.ComponentModel.Container();\r
+                       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageListViewForm));\r
+                       this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+                       this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.toolStripContainer = new System.Windows.Forms.ToolStripPanel();\r
+                       this.packageListFilterToolStrip = new System.Windows.Forms.ToolStrip();\r
+                       this.packageFilterToolStripDropDownButton = new System.Windows.Forms.ToolStripDropDownButton();\r
+                       this.allPackageFilterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.notInstalledPackageFilterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.installedASPackageFilterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.installedSysPackageFilterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.searchTextBox = new System.Windows.Forms.ToolStripTextBox();\r
+                       this.packageCommandsToolStrip = new System.Windows.Forms.ToolStrip();\r
+                       this.updateToolStripButton = new System.Windows.Forms.ToolStripSplitButton();\r
+                       this.localUpdateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.upgradeToolStripButton = new System.Windows.Forms.ToolStripButton();\r
+                       this.installToolStripButton = new System.Windows.Forms.ToolStripButton();\r
+                       this.uninstallToolStripButton = new System.Windows.Forms.ToolStripButton();\r
+                       this.splitContainer = new System.Windows.Forms.SplitContainer();\r
+                       this.packageListView = new System.Windows.Forms.ListView();\r
+                       this.nameHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.versionHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.summaryHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.packageListContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+                       this.installToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.uninstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.webResourcesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.webOfficialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.webGoogleSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.openInstalledDirectoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.detailBox = new System.Windows.Forms.RichTextBox();\r
+                       this.tableLayoutPanel1.SuspendLayout();\r
+                       this.toolStripContainer.SuspendLayout();\r
+                       this.packageListFilterToolStrip.SuspendLayout();\r
+                       this.packageCommandsToolStrip.SuspendLayout();\r
+                       this.splitContainer.Panel1.SuspendLayout();\r
+                       this.splitContainer.Panel2.SuspendLayout();\r
+                       this.splitContainer.SuspendLayout();\r
+                       this.packageListContextMenuStrip.SuspendLayout();\r
+                       this.SuspendLayout();\r
+                       // \r
+                       // toolStripSeparator1\r
+                       // \r
+                       this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+                       this.toolStripSeparator1.Size = new System.Drawing.Size(222, 6);\r
+                       // \r
+                       // tableLayoutPanel1\r
+                       // \r
+                       this.tableLayoutPanel1.ColumnCount = 1;\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.Controls.Add(this.toolStripContainer, 0, 0);\r
+                       this.tableLayoutPanel1.Controls.Add(this.splitContainer, 0, 1);\r
+                       this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+                       this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
+                       this.tableLayoutPanel1.RowCount = 2;\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.Size = new System.Drawing.Size(492, 366);\r
+                       this.tableLayoutPanel1.TabIndex = 0;\r
+                       // \r
+                       // toolStripContainer\r
+                       // \r
+                       this.toolStripContainer.Controls.Add(this.packageListFilterToolStrip);\r
+                       this.toolStripContainer.Controls.Add(this.packageCommandsToolStrip);\r
+                       this.toolStripContainer.Dock = System.Windows.Forms.DockStyle.Top;\r
+                       this.toolStripContainer.Location = new System.Drawing.Point(0, 0);\r
+                       this.toolStripContainer.Name = "toolStripContainer";\r
+                       this.toolStripContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;\r
+                       this.toolStripContainer.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);\r
+                       this.toolStripContainer.Size = new System.Drawing.Size(492, 50);\r
+                       // \r
+                       // packageListFilterToolStrip\r
+                       // \r
+                       this.packageListFilterToolStrip.Dock = System.Windows.Forms.DockStyle.None;\r
+                       this.packageListFilterToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.packageFilterToolStripDropDownButton,\r
+                                                                       this.searchTextBox});\r
+                       this.packageListFilterToolStrip.Location = new System.Drawing.Point(3, 0);\r
+                       this.packageListFilterToolStrip.Name = "packageListFilterToolStrip";\r
+                       this.packageListFilterToolStrip.Size = new System.Drawing.Size(177, 25);\r
+                       this.packageListFilterToolStrip.TabIndex = 1;\r
+                       // \r
+                       // packageFilterToolStripDropDownButton\r
+                       // \r
+                       this.packageFilterToolStripDropDownButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.allPackageFilterToolStripMenuItem,\r
+                                                                       this.notInstalledPackageFilterToolStripMenuItem,\r
+                                                                       this.installedASPackageFilterToolStripMenuItem,\r
+                                                                       this.installedSysPackageFilterToolStripMenuItem});\r
+                       this.packageFilterToolStripDropDownButton.Name = "packageFilterToolStripDropDownButton";\r
+                       this.packageFilterToolStripDropDownButton.Size = new System.Drawing.Size(13, 22);\r
+                       // \r
+                       // allPackageFilterToolStripMenuItem\r
+                       // \r
+                       this.allPackageFilterToolStripMenuItem.Name = "allPackageFilterToolStripMenuItem";\r
+                       this.allPackageFilterToolStripMenuItem.Size = new System.Drawing.Size(144, 22);\r
+                       this.allPackageFilterToolStripMenuItem.Text = "全て";\r
+                       this.allPackageFilterToolStripMenuItem.ToolTipText = "全てのソフトを表示";\r
+                       this.allPackageFilterToolStripMenuItem.Click += new System.EventHandler(this.AnyPackageFilterToolStripMenuItemClicked);\r
+                       // \r
+                       // notInstalledPackageFilterToolStripMenuItem\r
+                       // \r
+                       this.notInstalledPackageFilterToolStripMenuItem.Name = "notInstalledPackageFilterToolStripMenuItem";\r
+                       this.notInstalledPackageFilterToolStripMenuItem.Size = new System.Drawing.Size(144, 22);\r
+                       this.notInstalledPackageFilterToolStripMenuItem.Text = "未インストール";\r
+                       this.notInstalledPackageFilterToolStripMenuItem.ToolTipText = "インストールされていないソフトを表示";\r
+                       this.notInstalledPackageFilterToolStripMenuItem.Click += new System.EventHandler(this.AnyPackageFilterToolStripMenuItemClicked);\r
+                       // \r
+                       // installedASPackageFilterToolStripMenuItem\r
+                       // \r
+                       this.installedASPackageFilterToolStripMenuItem.Name = "installedASPackageFilterToolStripMenuItem";\r
+                       this.installedASPackageFilterToolStripMenuItem.Size = new System.Drawing.Size(144, 22);\r
+                       this.installedASPackageFilterToolStripMenuItem.Text = "AppliStation内";\r
+                       this.installedASPackageFilterToolStripMenuItem.ToolTipText = "AppliStationにインストールされているソフトを表示";\r
+                       this.installedASPackageFilterToolStripMenuItem.Click += new System.EventHandler(this.AnyPackageFilterToolStripMenuItemClicked);\r
+                       // \r
+                       // installedSysPackageFilterToolStripMenuItem\r
+                       // \r
+                       this.installedSysPackageFilterToolStripMenuItem.Name = "installedSysPackageFilterToolStripMenuItem";\r
+                       this.installedSysPackageFilterToolStripMenuItem.Size = new System.Drawing.Size(144, 22);\r
+                       this.installedSysPackageFilterToolStripMenuItem.Text = "コンピュータ内";\r
+                       this.installedSysPackageFilterToolStripMenuItem.ToolTipText = "コンピュータにインストールされているソフトを表示";\r
+                       this.installedSysPackageFilterToolStripMenuItem.Click += new System.EventHandler(this.AnyPackageFilterToolStripMenuItemClicked);\r
+                       // \r
+                       // searchTextBox\r
+                       // \r
+                       this.searchTextBox.ForeColor = System.Drawing.SystemColors.GrayText;\r
+                       this.searchTextBox.Name = "searchTextBox";\r
+                       this.searchTextBox.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;\r
+                       this.searchTextBox.Size = new System.Drawing.Size(150, 25);\r
+                       this.searchTextBox.Text = "検索";\r
+                       this.searchTextBox.ToolTipText = "検索する語を入力";\r
+                       this.searchTextBox.Enter += new System.EventHandler(this.SearchTextBoxEnter);\r
+                       this.searchTextBox.Leave += new System.EventHandler(this.SearchTextBoxLeave);\r
+                       this.searchTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SearchTextBoxKeyPress);\r
+                       // \r
+                       // packageCommandsToolStrip\r
+                       // \r
+                       this.packageCommandsToolStrip.Dock = System.Windows.Forms.DockStyle.None;\r
+                       this.packageCommandsToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.updateToolStripButton,\r
+                                                                       this.upgradeToolStripButton,\r
+                                                                       this.installToolStripButton,\r
+                                                                       this.uninstallToolStripButton});\r
+                       this.packageCommandsToolStrip.Location = new System.Drawing.Point(3, 25);\r
+                       this.packageCommandsToolStrip.Name = "packageCommandsToolStrip";\r
+                       this.packageCommandsToolStrip.Size = new System.Drawing.Size(223, 25);\r
+                       this.packageCommandsToolStrip.TabIndex = 2;\r
+                       // \r
+                       // updateToolStripButton\r
+                       // \r
+                       this.updateToolStripButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.localUpdateToolStripMenuItem});\r
+                       this.updateToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("updateToolStripButton.Image")));\r
+                       this.updateToolStripButton.Name = "updateToolStripButton";\r
+                       this.updateToolStripButton.Size = new System.Drawing.Size(111, 22);\r
+                       this.updateToolStripButton.Text = "リストの更新(&U)";\r
+                       this.updateToolStripButton.ToolTipText = "ソフトリスト更新(U)";\r
+                       this.updateToolStripButton.ButtonClick += new System.EventHandler(this.UpdateToolStripButtonClick);\r
+                       // \r
+                       // localUpdateToolStripMenuItem\r
+                       // \r
+                       this.localUpdateToolStripMenuItem.Name = "localUpdateToolStripMenuItem";\r
+                       this.localUpdateToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;\r
+                       this.localUpdateToolStripMenuItem.Size = new System.Drawing.Size(250, 22);\r
+                       this.localUpdateToolStripMenuItem.Text = "インストール済ソフトの読み直し(&R)";\r
+                       this.localUpdateToolStripMenuItem.Click += new System.EventHandler(this.LocalupdateToolStripMenuItemClick);\r
+                       // \r
+                       // upgradeToolStripButton\r
+                       // \r
+                       this.upgradeToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("upgradeToolStripButton.Image")));\r
+                       this.upgradeToolStripButton.Name = "upgradeToolStripButton";\r
+                       this.upgradeToolStripButton.Size = new System.Drawing.Size(100, 22);\r
+                       this.upgradeToolStripButton.Text = "ソフトの更新(&G)";\r
+                       this.upgradeToolStripButton.Click += new System.EventHandler(this.UpgradeToolStripButtonClick);\r
+                       // \r
+                       // installToolStripButton\r
+                       // \r
+                       this.installToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("installToolStripButton.Image")));\r
+                       this.installToolStripButton.Name = "installToolStripButton";\r
+                       this.installToolStripButton.Size = new System.Drawing.Size(80, 22);\r
+                       this.installToolStripButton.Text = "インストール";\r
+                       this.installToolStripButton.ToolTipText = "選択されているアプリケーションをインストール";\r
+                       this.installToolStripButton.Visible = false;\r
+                       this.installToolStripButton.Click += new System.EventHandler(this.InstallToolStripButtonClick);\r
+                       // \r
+                       // uninstallToolStripButton\r
+                       // \r
+                       this.uninstallToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("uninstallToolStripButton.Image")));\r
+                       this.uninstallToolStripButton.Name = "uninstallToolStripButton";\r
+                       this.uninstallToolStripButton.Size = new System.Drawing.Size(98, 22);\r
+                       this.uninstallToolStripButton.Text = "アンインストール";\r
+                       this.uninstallToolStripButton.ToolTipText = "選択されているアプリケーションをアンインストール";\r
+                       this.uninstallToolStripButton.Visible = false;\r
+                       this.uninstallToolStripButton.Click += new System.EventHandler(this.UninstallToolStripButtonClick);\r
+                       // \r
+                       // splitContainer\r
+                       // \r
+                       this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\r
+                       this.splitContainer.Location = new System.Drawing.Point(3, 53);\r
+                       this.splitContainer.Name = "splitContainer";\r
+                       this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;\r
+                       // \r
+                       // splitContainer.Panel1\r
+                       // \r
+                       this.splitContainer.Panel1.Controls.Add(this.packageListView);\r
+                       // \r
+                       // splitContainer.Panel2\r
+                       // \r
+                       this.splitContainer.Panel2.Controls.Add(this.detailBox);\r
+                       this.splitContainer.Size = new System.Drawing.Size(486, 310);\r
+                       this.splitContainer.SplitterDistance = 225;\r
+                       this.splitContainer.TabIndex = 1;\r
+                       // \r
+                       // packageListView\r
+                       // \r
+                       this.packageListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
+                                                                       this.nameHeader,\r
+                                                                       this.versionHeader,\r
+                                                                       this.summaryHeader});\r
+                       this.packageListView.ContextMenuStrip = this.packageListContextMenuStrip;\r
+                       this.packageListView.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.packageListView.FullRowSelect = true;\r
+                       this.packageListView.GridLines = true;\r
+                       this.packageListView.Location = new System.Drawing.Point(0, 0);\r
+                       this.packageListView.MultiSelect = false;\r
+                       this.packageListView.Name = "packageListView";\r
+                       this.packageListView.Size = new System.Drawing.Size(486, 225);\r
+                       this.packageListView.TabIndex = 0;\r
+                       this.packageListView.UseCompatibleStateImageBehavior = false;\r
+                       this.packageListView.View = System.Windows.Forms.View.Details;\r
+                       this.packageListView.ItemActivate += new System.EventHandler(this.PackageListViewItemActivate);\r
+                       this.packageListView.SelectedIndexChanged += new System.EventHandler(this.PackageListViewSelectedIndexChanged);\r
+                       this.packageListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.PackageListViewColumnClick);\r
+                       // \r
+                       // nameHeader\r
+                       // \r
+                       this.nameHeader.Text = "名前";\r
+                       this.nameHeader.Width = 100;\r
+                       // \r
+                       // versionHeader\r
+                       // \r
+                       this.versionHeader.Text = "バージョン";\r
+                       // \r
+                       // summaryHeader\r
+                       // \r
+                       this.summaryHeader.Text = "概要";\r
+                       this.summaryHeader.Width = 300;\r
+                       // \r
+                       // packageListContextMenuStrip\r
+                       // \r
+                       this.packageListContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.installToolStripMenuItem,\r
+                                                                       this.uninstallToolStripMenuItem,\r
+                                                                       this.toolStripSeparator1,\r
+                                                                       this.webResourcesToolStripMenuItem,\r
+                                                                       this.openInstalledDirectoryStripMenuItem});\r
+                       this.packageListContextMenuStrip.Name = "packageListContextMenuStrip";\r
+                       this.packageListContextMenuStrip.Size = new System.Drawing.Size(226, 98);\r
+                       this.packageListContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.PackageListContextMenuStripOpening);\r
+                       // \r
+                       // installToolStripMenuItem\r
+                       // \r
+                       this.installToolStripMenuItem.Name = "installToolStripMenuItem";\r
+                       this.installToolStripMenuItem.Size = new System.Drawing.Size(225, 22);\r
+                       this.installToolStripMenuItem.Text = "インストール(&I)...";\r
+                       this.installToolStripMenuItem.Click += new System.EventHandler(this.InstallToolStripButtonClick);\r
+                       // \r
+                       // uninstallToolStripMenuItem\r
+                       // \r
+                       this.uninstallToolStripMenuItem.Name = "uninstallToolStripMenuItem";\r
+                       this.uninstallToolStripMenuItem.Size = new System.Drawing.Size(225, 22);\r
+                       this.uninstallToolStripMenuItem.Text = "アンインストール(&U)...";\r
+                       this.uninstallToolStripMenuItem.Click += new System.EventHandler(this.UninstallToolStripButtonClick);\r
+                       // \r
+                       // webResourcesToolStripMenuItem\r
+                       // \r
+                       this.webResourcesToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.webOfficialToolStripMenuItem,\r
+                                                                       this.webGoogleSearchToolStripMenuItem});\r
+                       this.webResourcesToolStripMenuItem.Name = "webResourcesToolStripMenuItem";\r
+                       this.webResourcesToolStripMenuItem.Size = new System.Drawing.Size(225, 22);\r
+                       this.webResourcesToolStripMenuItem.Tag = "\"{0}\"に関するWebページ(&W)";\r
+                       // \r
+                       // webOfficialToolStripMenuItem\r
+                       // \r
+                       this.webOfficialToolStripMenuItem.Name = "webOfficialToolStripMenuItem";\r
+                       this.webOfficialToolStripMenuItem.Size = new System.Drawing.Size(145, 22);\r
+                       this.webOfficialToolStripMenuItem.Text = "公式サイト(&O)";\r
+                       this.webOfficialToolStripMenuItem.Click += new System.EventHandler(this.WebOfficialToolStripMenuItemClick);\r
+                       // \r
+                       // webGoogleSearchToolStripMenuItem\r
+                       // \r
+                       this.webGoogleSearchToolStripMenuItem.Name = "webGoogleSearchToolStripMenuItem";\r
+                       this.webGoogleSearchToolStripMenuItem.Size = new System.Drawing.Size(145, 22);\r
+                       this.webGoogleSearchToolStripMenuItem.Text = "Google検索(&G)";\r
+                       this.webGoogleSearchToolStripMenuItem.Click += new System.EventHandler(this.WebGoogleSearchToolStripMenuItemClick);\r
+                       // \r
+                       // openInstalledDirectoryStripMenuItem\r
+                       // \r
+                       this.openInstalledDirectoryStripMenuItem.Name = "openInstalledDirectoryStripMenuItem";\r
+                       this.openInstalledDirectoryStripMenuItem.Size = new System.Drawing.Size(225, 22);\r
+                       this.openInstalledDirectoryStripMenuItem.Text = "インストール先のフォルダを開く(&O)";\r
+                       this.openInstalledDirectoryStripMenuItem.Click += new System.EventHandler(this.OpenInstalledDirectoryStripMenuItemClick);\r
+                       // \r
+                       // detailBox\r
+                       // \r
+                       this.detailBox.BackColor = System.Drawing.SystemColors.Control;\r
+                       this.detailBox.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+                       this.detailBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.detailBox.ForeColor = System.Drawing.SystemColors.ControlText;\r
+                       this.detailBox.Location = new System.Drawing.Point(0, 0);\r
+                       this.detailBox.Name = "detailBox";\r
+                       this.detailBox.ReadOnly = true;\r
+                       this.detailBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;\r
+                       this.detailBox.Size = new System.Drawing.Size(486, 81);\r
+                       this.detailBox.TabIndex = 0;\r
+                       this.detailBox.Text = "";\r
+                       this.detailBox.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.PackageDetailBoxLinkClicked);\r
+                       // \r
+                       // PackageListViewForm\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(492, 366);\r
+                       this.Controls.Add(this.tableLayoutPanel1);\r
+                       this.Name = "PackageListViewForm";\r
+                       this.Text = "AppliStation";\r
+                       this.Load += new System.EventHandler(this.Form_OnLoad);\r
+                       this.tableLayoutPanel1.ResumeLayout(false);\r
+                       this.tableLayoutPanel1.PerformLayout();\r
+                       this.toolStripContainer.ResumeLayout(false);\r
+                       this.toolStripContainer.PerformLayout();\r
+                       this.packageListFilterToolStrip.ResumeLayout(false);\r
+                       this.packageListFilterToolStrip.PerformLayout();\r
+                       this.packageCommandsToolStrip.ResumeLayout(false);\r
+                       this.packageCommandsToolStrip.PerformLayout();\r
+                       this.splitContainer.Panel1.ResumeLayout(false);\r
+                       this.splitContainer.Panel2.ResumeLayout(false);\r
+                       this.splitContainer.ResumeLayout(false);\r
+                       this.packageListContextMenuStrip.ResumeLayout(false);\r
+                       this.ResumeLayout(false);\r
+               }\r
+               private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\r
+               private System.Windows.Forms.ToolStripMenuItem openInstalledDirectoryStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem webGoogleSearchToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem webOfficialToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem webResourcesToolStripMenuItem;\r
+               private System.Windows.Forms.RichTextBox detailBox;\r
+               private System.Windows.Forms.SplitContainer splitContainer;\r
+               private System.Windows.Forms.ToolStripPanel toolStripContainer;\r
+               private System.Windows.Forms.ToolStripMenuItem installedSysPackageFilterToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem installedASPackageFilterToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem notInstalledPackageFilterToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem allPackageFilterToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripDropDownButton packageFilterToolStripDropDownButton;\r
+               private System.Windows.Forms.ToolStripButton upgradeToolStripButton;\r
+               private System.Windows.Forms.ToolStripMenuItem localUpdateToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripSplitButton updateToolStripButton;\r
+               private System.Windows.Forms.ToolStripMenuItem uninstallToolStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem installToolStripMenuItem;\r
+               private System.Windows.Forms.ContextMenuStrip packageListContextMenuStrip;\r
+               private System.Windows.Forms.ToolStripButton uninstallToolStripButton;\r
+               private System.Windows.Forms.ToolStripButton installToolStripButton;\r
+               private System.Windows.Forms.ToolStrip packageCommandsToolStrip;\r
+               private System.Windows.Forms.ToolStrip packageListFilterToolStrip;\r
+               private System.Windows.Forms.ToolStripTextBox searchTextBox;\r
+               private System.Windows.Forms.ColumnHeader versionHeader;\r
+               private System.Windows.Forms.ListView packageListView;\r
+               private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+               private System.Windows.Forms.ColumnHeader summaryHeader;\r
+               private System.Windows.Forms.ColumnHeader nameHeader;\r
+       }\r
+}\r
diff --git a/AppliStation/PackageListViewForm.cs b/AppliStation/PackageListViewForm.cs
new file mode 100644 (file)
index 0000000..66e5c56
--- /dev/null
@@ -0,0 +1,634 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using NaGet.Packages;\r
+using NaGet.Packages.Install;\r
+using System.IO;\r
+using System.Collections.Generic;\r
+\r
+namespace AppliStation\r
+{\r
+       /// <summary>\r
+       /// Description of PackageListViewForm.\r
+       /// </summary>\r
+       public partial class PackageListViewForm : Form\r
+       {\r
+               protected PackageListsManager pkgListsMan = null;\r
+               \r
+               public PackageListViewForm()\r
+               {\r
+                       //\r
+                       // The InitializeComponent() call is required for Windows Forms designer support.\r
+                       //\r
+                       InitializeComponent();\r
+                       \r
+                       installToolStripMenuItem.Font = new Font(installToolStripMenuItem.Font, FontStyle.Bold);\r
+                       uninstallToolStripMenuItem.Font = new Font(uninstallToolStripMenuItem.Font, FontStyle.Bold);\r
+                       \r
+                       pkgListsMan = new PackageListsManager();\r
+               }\r
+               \r
+               void PackageListViewSelectedIndexChanged(object sender, EventArgs e)\r
+               {\r
+                       bool installBtnEnabled = false;\r
+                       bool uninstallBtnEnabled = false;\r
+                       \r
+                       detailBox.Clear();\r
+                       foreach (ListViewItem item in packageListView.SelectedItems) {\r
+                               Package pkg = (Package) item.Tag;\r
+                               \r
+                               bool isInstalledPackage = pkg is InstalledPackage;\r
+                               uninstallBtnEnabled = isInstalledPackage;\r
+                               installBtnEnabled = ! isInstalledPackage;\r
+                               \r
+                               detailBox.SelectionFont = new Font(detailBox.Font.FontFamily, 12);\r
+                               detailBox.SelectedText += string.Format("{0} ({1})\r\n", pkg.Name, pkg.Version);\r
+                               if (! string.IsNullOrEmpty(pkg.Tags) ) {\r
+                                       detailBox.SelectionFont = new Font(detailBox.Font.FontFamily, 8);\r
+                                       detailBox.SelectedText += string.Format("\83^\83O: {0}\r\n", pkg.Tags);\r
+                               }\r
+                               if (isInstalledPackage) {\r
+                                       InstalledPackage iPkg = (InstalledPackage) pkg;\r
+                                       System.Text.StringBuilder sb = new System.Text.StringBuilder();\r
+                                       if (iPkg.UninstallInfo.InstallDate != null) {\r
+                                               sb.AppendFormat("\83C\83\93\83X\83g\81[\83\8b\82µ\82½\93ú: {0:d}  ", iPkg.UninstallInfo.InstallDate.Value);\r
+                                       }\r
+                                       if (iPkg.UninstallInfo.EstimatedSize > 0) {\r
+                                               sb.AppendFormat("\83T\83C\83Y: {0}  ", NaGet.Utils.FormatSize(iPkg.UninstallInfo.EstimatedSize*1024));\r
+                                       }\r
+                                       \r
+                                       if (sb.Length > 0) {\r
+                                               detailBox.SelectionFont = new Font(detailBox.Font.FontFamily, 8);\r
+                                               detailBox.SelectedText += sb.ToString();\r
+                                               detailBox.SelectedText += "\r\n";\r
+                                       }\r
+                               }\r
+                               detailBox.SelectionFont = detailBox.Font;\r
+                               if (pkg.Url != null && pkg.Url.Href != null) {\r
+                                       detailBox.SelectedText += "\8cö\8e®\83T\83C\83g: " + pkg.Url.Href + "\r\n";\r
+                               }\r
+                               detailBox.SelectedText += pkg.Summary;\r
+                               \r
+                               break;\r
+                       }\r
+                       \r
+                       uninstallToolStripButton.Visible = uninstallBtnEnabled;\r
+                       installToolStripButton.Visible = installBtnEnabled;\r
+                       \r
+                       if (packageListView.SelectedItems.Count <= 0) {\r
+                               detailBox.SelectionFont = detailBox.Font;\r
+                               int count = packageListView.Items.Count;\r
+                               detailBox.Text = (count > 0) ? string.Format("{0}\8cÂ\82Ì\83\\83t\83g\82ª\82 \82è\82Ü\82·\81B", count)\r
+                                       : "\8aY\93\96\82·\82é\83\\83t\83g\82ª\82 \82è\82Ü\82¹\82ñ\81B";\r
+                       }\r
+                       \r
+                       detailBox.SelectionStart = 0;\r
+                       detailBox.ScrollToCaret();\r
+               }\r
+\r
+               void PackageListViewItemActivate(object sender, EventArgs e)\r
+               {\r
+                       if (packageListView.SelectedItems.Count <= 0) {\r
+                               return; // exit \r
+                       }\r
+                       \r
+                       foreach (ListViewItem item in packageListView.SelectedItems) {\r
+                               Package pkg = (Package) item.Tag;\r
+                               \r
+                               if (pkg is InstalledPackage) {\r
+                                       UninstallToolStripButtonClick(sender, e);\r
+                               } else {\r
+                                       InstallToolStripButtonClick(sender, e);\r
+                               }\r
+                               \r
+                               break;\r
+                       }\r
+               }\r
+               \r
+               AppliStation.Util.ListViewItemSortComparer packageListViewSortComparer;\r
+\r
+               void PackageListViewColumnClick(object sender, ColumnClickEventArgs e)\r
+               {\r
+                       SortOrder order = SortOrder.None;\r
+                       \r
+                       if (packageListViewSortComparer == null) {\r
+                               order = SortOrder.Ascending;\r
+                               packageListViewSortComparer = new AppliStation.Util.ListViewItemSortComparer(e.Column, order);\r
+                               packageListView.ListViewItemSorter = packageListViewSortComparer;\r
+                       } else {\r
+                               if (packageListViewSortComparer.Column == e.Column) {\r
+                                       order = (packageListViewSortComparer.Order == SortOrder.Ascending)? SortOrder.Descending : SortOrder.Ascending;\r
+                                       \r
+                                       packageListViewSortComparer.Order = order;\r
+                               } else {\r
+                                       order = packageListViewSortComparer.Order;\r
+                                       packageListViewSortComparer.Column = e.Column;\r
+                               }\r
+                               \r
+                               packageListView.Sort();\r
+                       }\r
+                       AppliStation.Util.NativeMethods.ColumnHeader_SetSortState(packageListView, e.Column, order);\r
+                       \r
+                       // \83\\81[\83g\91Î\8fÛ\97ñ\82Ì\90F\95t\82¯\r
+                       try {\r
+                               // SendMessage(hWnd, LVM_SETSELECTEDCOLUMN, column, NULL);\r
+                               AppliStation.Util.NativeMethods.SendMessage(packageListView.Handle, 0x1000+140, (uint) e.Column, 0);\r
+                       } catch (Exception) {   \r
+                       }\r
+               }\r
+               \r
+               void Form_OnLoad(object sender, EventArgs e)\r
+               {\r
+                       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageListViewForm));\r
+                       ImageList imageList = new ImageList();\r
+                       imageList.Images.Add("installed", this.Icon);\r
+                       imageList.Images.Add("sys", (Icon)(resources.GetObject("sysinstalled.Icon")));\r
+                       packageListView.SmallImageList = imageList;\r
+                       \r
+                       updatePackageFilterToolStripMenuItemCheckState();\r
+                       installedASPackageFilterToolStripMenuItem.Image = this.Icon.ToBitmap();\r
+                       installedSysPackageFilterToolStripMenuItem.Image = ((Icon)(resources.GetObject("sysinstalled.Icon"))).ToBitmap();\r
+               }\r
+               \r
+               #region PackageFilter\8aÖ\98A\r
+               \r
+               private enum PackageFilterIndex : int\r
+               {\r
+                       All = 0,\r
+                       NotInstalled = 1,\r
+                       InstalledAS = 2,\r
+                       InstalledSys = 3,\r
+               }\r
+               \r
+               private PackageFilterIndex currentPackageFilter = PackageFilterIndex.All;\r
+               \r
+               private PackageFilterIndex CurrentPackageFilter {\r
+                       get {\r
+                               return currentPackageFilter;\r
+                       }\r
+                       set {\r
+                               currentPackageFilter = value;\r
+                               \r
+                               updatePackageFilterToolStripMenuItemCheckState();\r
+                       }\r
+               }\r
+               \r
+               private void updatePackageFilterToolStripMenuItemCheckState()\r
+               {\r
+                       ToolStripMenuItem selected = getCheckedPackageFilterToolStripItem();\r
+                       \r
+                       foreach (ToolStripMenuItem item in packageFilterToolStripDropDownButton.DropDown.Items) {\r
+                               item.Checked = selected == item;\r
+                       }\r
+                       \r
+                       packageFilterToolStripDropDownButton.Text = selected.Text;\r
+                       packageFilterToolStripDropDownButton.Image = selected.Image;\r
+                       packageFilterToolStripDropDownButton.ToolTipText = selected.ToolTipText;\r
+               }\r
+               \r
+               private ToolStripMenuItem getCheckedPackageFilterToolStripItem()\r
+               {\r
+                       switch (currentPackageFilter) {\r
+                               case PackageFilterIndex.NotInstalled:\r
+                                       return notInstalledPackageFilterToolStripMenuItem;\r
+                               case PackageFilterIndex.InstalledAS:\r
+                                       return installedASPackageFilterToolStripMenuItem;\r
+                               case PackageFilterIndex.InstalledSys:\r
+                                       return installedSysPackageFilterToolStripMenuItem;\r
+                               default:\r
+                                       return allPackageFilterToolStripMenuItem;\r
+                       }\r
+               }\r
+               \r
+               void AnyPackageFilterToolStripMenuItemClicked(object sender, EventArgs e)\r
+               {\r
+                       if (sender == notInstalledPackageFilterToolStripMenuItem) {\r
+                               currentPackageFilter = PackageFilterIndex.NotInstalled;\r
+                       } else if (sender == installedASPackageFilterToolStripMenuItem) {\r
+                               currentPackageFilter = PackageFilterIndex.InstalledAS;\r
+                       } else if (sender == installedSysPackageFilterToolStripMenuItem) {\r
+                               currentPackageFilter = PackageFilterIndex.InstalledSys;\r
+                       } else {\r
+                               currentPackageFilter = PackageFilterIndex.All;\r
+                       }\r
+                       \r
+                       updatePackageFilterToolStripMenuItemCheckState();\r
+                       searchTextBoxUpdate(false);\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               void PackageListViewUpdate()\r
+               {\r
+                       this.packageListView.Items.Clear();\r
+                       \r
+                       if (currentPackageFilter == PackageFilterIndex.All || currentPackageFilter == PackageFilterIndex.NotInstalled) {\r
+                               foreach (Package pkg in pkgListsMan.AvailablePkgList.Search(this.SearchKeyword)) {\r
+                                       if (Installation.GetPreferInstallerIndex(pkg) >= 0) { // \83C\83\93\83X\83g\81[\83\8b\89Â\94\\r
+                                               if (currentPackageFilter == PackageFilterIndex.NotInstalled &&\r
+                                                   (pkgListsMan.InstalledPkgList.GetPackageForName(pkg.Name) != null||\r
+                                                    pkgListsMan.SystemInstalledPkgList.GetPackageForName(pkg.Name) != null) ) {\r
+                                                       continue; // \83C\83\93\83X\83g\81[\83\8b\8dÏ\82Ý\82Í\8e\9f\82Ì\83\8b\81[\83v\82Ö(\96¢\83C\83\93\83X\83g\81[\83\8b\83\\83t\83g\92\8a\8fo\8e\9e)\r
+                                               }\r
+                                               \r
+                                               ListViewItem item = new ListViewItem(new string[]{pkg.Name, pkg.Version, pkg.Summary});\r
+                                               item.Tag = pkg;\r
+                                               item.ToolTipText = pkg.Summary;\r
+               \r
+                                               this.packageListView.Items.Add(item);\r
+                                       }\r
+                               }\r
+                       }\r
+                       \r
+                       if (currentPackageFilter == PackageFilterIndex.All || currentPackageFilter == PackageFilterIndex.InstalledAS) {\r
+                               foreach (Package pkg in pkgListsMan.InstalledPkgList.Search(this.SearchKeyword)) {\r
+                                       ListViewItem item = new ListViewItem(new string[]{pkg.Name, pkg.Version, pkg.Summary});\r
+                                       item.Tag = pkg;\r
+                                       item.ToolTipText = pkg.Summary;\r
+                                       item.ImageKey = "installed";\r
+       \r
+                                       this.packageListView.Items.Add(item);\r
+                               }\r
+                       }\r
+                       \r
+                       if (currentPackageFilter == PackageFilterIndex.All || currentPackageFilter == PackageFilterIndex.InstalledSys) {\r
+                               foreach (Package pkg in pkgListsMan.SystemInstalledPkgList.Search(this.SearchKeyword)) {\r
+                                       ListViewItem item = new ListViewItem(new string[]{pkg.Name, pkg.Version, pkg.Summary});\r
+                                       item.Tag = pkg;\r
+                                       item.ToolTipText = pkg.Summary;\r
+                                       item.ImageKey = "sys";\r
+       \r
+                                       this.packageListView.Items.Add(item);\r
+                               }\r
+                       }\r
+                       \r
+                       PackageListViewSelectedIndexChanged(packageListView, null);\r
+                       detailBox.Refresh();\r
+                       \r
+                       //this.packageListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);\r
+               }\r
+               \r
+               void PackageDetailBoxLinkClicked(object sender, LinkClickedEventArgs e)\r
+               {\r
+                       System.Diagnostics.Process.Start(e.LinkText);\r
+               }\r
+               \r
+               internal void updateActionInvoke(bool downloadPackageListsFlag)\r
+               {\r
+                       AppliStation.Util.ExecutionProgressViewer prog = new AppliStation.Util.ExecutionProgressViewer();\r
+                       prog.Shown += delegate(object sender2, EventArgs e2) {\r
+                               NaGet.SubCommands.NaGetUpdate tasks = new NaGet.SubCommands.NaGetUpdate(pkgListsMan, downloadPackageListsFlag);\r
+                               tasks.Downloader = prog.Downloader;\r
+                               prog.SetTaskSet(tasks);\r
+                               prog.Refresh();\r
+                               prog.StartTaskSet();\r
+                       };\r
+                       prog.Text = "\83\8a\83X\83g\82Ì\8dX\90V";\r
+                       prog.ShowDialog(this);\r
+               }\r
+                       \r
+               void UpdateToolStripButtonClick(object sender, EventArgs e)\r
+               {\r
+                       updateActionInvoke(true);\r
+                       \r
+                       UpdatePackageList();\r
+               }\r
+               \r
+               void LocalupdateToolStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       updateActionInvoke(false);\r
+                       \r
+                       UpdatePackageList();\r
+               }\r
+               \r
+               #region searchTextBox\82Ü\82í\82è\r
+               \r
+               private bool searchTextBoxIsEmpty = true;\r
+               \r
+               private Timer searchUpdateTimer = null;\r
+               \r
+               string SearchKeyword {\r
+                       get {\r
+                               return searchTextBoxIsEmpty? string.Empty : searchTextBox.Text;\r
+                       }\r
+               }\r
+               \r
+               void SearchTextBoxEnter(object sender, EventArgs e)\r
+               {\r
+                       if (searchTextBoxIsEmpty) {\r
+                               searchTextBox.Text = string.Empty;\r
+                               searchTextBox.ForeColor = DefaultForeColor;\r
+                               searchTextBoxIsEmpty = false;\r
+                       }\r
+               }\r
+               \r
+               void SearchTextBoxLeave(object sender, EventArgs e)\r
+               {\r
+                       if (string.IsNullOrEmpty(searchTextBox.Text)) {\r
+                               searchTextBox.Text = "\8c\9f\8dõ";\r
+                               searchTextBox.ForeColor = SystemColors.GrayText;\r
+                               searchTextBoxIsEmpty = true;\r
+                       }\r
+               }\r
+               \r
+               void SearchTextBoxKeyPress(object sender, KeyPressEventArgs e)\r
+               {\r
+                       switch (e.KeyChar) {\r
+                               case (char)Keys.Enter:\r
+                                       searchTextBoxUpdate(true);\r
+                                       break;\r
+                               case (char)Keys.Escape:\r
+                                       searchTextBox.Text = "";\r
+                                       searchTextBoxUpdate(false);\r
+                                       break;\r
+                               default:\r
+                                       searchTextBoxUpdate(false);\r
+                                       break;\r
+                       }\r
+               }\r
+               \r
+               private void searchTextBoxUpdate(bool force)\r
+               {\r
+                       if (! this.Created) return;\r
+                       \r
+                       if (searchUpdateTimer != null) {\r
+                               searchUpdateTimer.Stop();\r
+                       } else {\r
+                               searchUpdateTimer = new Timer();\r
+                               searchUpdateTimer.Tick += searchUpdateTimerTick;\r
+                       }\r
+                       searchUpdateTimer.Interval = (force)? 10 : 500;\r
+                       searchUpdateTimer.Start();\r
+               }\r
+               \r
+               private void searchUpdateTimerTick(object sender, EventArgs e)\r
+               {\r
+                       searchUpdateTimer.Stop();\r
+                       \r
+                       PackageListViewUpdate();\r
+               }\r
+               \r
+               #endregion\r
+               \r
+               internal void installActionInvoke(Package[] pkgs)\r
+               {\r
+                       AppliStation.Util.ExecutionProgressViewer prog = new AppliStation.Util.ExecutionProgressViewer();\r
+                       prog.Shown += delegate(object sender2, EventArgs e2) {\r
+                               NaGet.SubCommands.NaGetInstall tasks = new NaGet.SubCommands.NaGetInstall(pkgListsMan, pkgs);\r
+                               tasks.Downloader = prog.Downloader;\r
+                               prog.SetTaskSet(tasks);\r
+                               prog.Refresh();\r
+                               prog.StartTaskSet();\r
+                       };\r
+                       prog.Text = string.Format("\83\\83t\83g\83E\83F\83A\82Ì\83C\83\93\83X\83g\81[\83\8b");\r
+                       prog.ShowDialog(this);\r
+               }\r
+               \r
+               void InstallToolStripButtonClick(object sender, EventArgs e)\r
+               {\r
+                       PackagesInstallConfirmForm confirm = new PackagesInstallConfirmForm();\r
+                       confirm.PkgListsManager = pkgListsMan;\r
+                       confirm.Packages = SelectedPackages<Package>();\r
+                       confirm.UseRunas = confirm.GetShouldUseRunas();\r
+                       DialogResult result = confirm.ShowDialog(this);\r
+                       \r
+                       if (result == DialogResult.OK) {\r
+                               Package[] instPkgs = confirm.CheckedPackages;\r
+                               \r
+                               if (confirm.UseRunas) {\r
+                                       this.Enabled = false;\r
+                                       installRunasActionInvoke(instPkgs);\r
+                                       this.Enabled = true;\r
+                                       this.Focus();\r
+                               } else {\r
+                                       installActionInvoke(instPkgs);\r
+                               }\r
+                               \r
+                               UpdatePackageList();\r
+                       }\r
+               }\r
+               \r
+               public void installRunasActionInvoke(Package[] pkgs)\r
+               {\r
+                       string tmpfileName = System.IO.Path.GetTempFileName();\r
+                       try {\r
+                               NaGet.Utils.PutSerializeObject(tmpfileName, pkgs);\r
+                               \r
+                               System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo();\r
+                               procInfo.FileName = Application.ExecutablePath;\r
+                               procInfo.Arguments = string.Format("--noupdate --cmd=install \"--pkgsref={0}\"", tmpfileName);\r
+                               procInfo.Verb = "runas";\r
+                               procInfo.WorkingDirectory = Environment.CurrentDirectory;\r
+                               \r
+                               using (System.Diagnostics.Process hProc = System.Diagnostics.Process.Start(procInfo)) {\r
+                                       hProc.WaitForExit();\r
+                               }\r
+                               \r
+                               pkgListsMan.LoadPackageLists();\r
+                       } catch (System.ComponentModel.Win32Exception ex) {\r
+                               MessageBox.Show(ex.Message, "\83C\83\93\83X\83g\81[\83\8b", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       } finally {\r
+                               if (File.Exists(tmpfileName)) {\r
+                                       File.Delete(tmpfileName);\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               internal void uninstallActionInvoke(InstalledPackage[] pkgs)\r
+               {\r
+                       AppliStation.Util.ExecutionProgressViewer prog = new AppliStation.Util.ExecutionProgressViewer();\r
+                       prog.Shown += delegate(object sender2, EventArgs e2) {\r
+                               NaGet.SubCommands.NaGetUninstall tasks = new NaGet.SubCommands.NaGetUninstall(pkgListsMan, pkgs);\r
+                               prog.SetTaskSet(tasks);\r
+                               prog.Refresh();\r
+                               prog.StartTaskSet();\r
+                       };\r
+                       prog.Text = string.Format("\83\\83t\83g\83E\83F\83A\82Ì\83A\83\93\83C\83\93\83X\83g\81[\83\8b");\r
+                       prog.ShowDialog(this);\r
+               }\r
+               \r
+               internal void uninstallRunasActionInvoke(InstalledPackage[] pkgs)\r
+               {\r
+                       string tmpfileName = System.IO.Path.GetTempFileName();\r
+                       try {\r
+                               NaGet.Utils.PutSerializeObject(tmpfileName, pkgs);\r
+                               \r
+                               System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo();\r
+                               procInfo.FileName = Application.ExecutablePath;\r
+                               procInfo.Arguments = string.Format("--noupdate --cmd=uninstall \"--pkgsref={0}\"", tmpfileName);\r
+                               procInfo.Verb = "runas";\r
+                               procInfo.WorkingDirectory = Environment.CurrentDirectory;\r
+                               \r
+                               using (System.Diagnostics.Process hProc = System.Diagnostics.Process.Start(procInfo)) {\r
+                                       hProc.WaitForExit();\r
+                               }\r
+                               \r
+                               pkgListsMan.LoadPackageLists();\r
+                       } catch (System.ComponentModel.Win32Exception ex) {\r
+                               MessageBox.Show(ex.Message, "\83A\83\93\83C\83\93\83X\83g\81[\83\8b", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       } finally {\r
+                               if (File.Exists(tmpfileName)) {\r
+                                       File.Delete(tmpfileName);\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               void UninstallToolStripButtonClick(object sender, EventArgs e)\r
+               {\r
+                       PackageUninstallConfirmForm confirm = new PackageUninstallConfirmForm();\r
+                       foreach (InstalledPackage pkg in SelectedPackages<InstalledPackage>()) {\r
+                               confirm.UninstallPackage = pkg;\r
+                               break;\r
+                       }\r
+                       confirm.UseRunas = confirm.GetShouldUseRunas();\r
+                       DialogResult result = confirm.ShowDialog(this);\r
+                       \r
+                       if (result == DialogResult.OK) {\r
+                               InstalledPackage[] instPkgs = new InstalledPackage[]{confirm.UninstallPackage};\r
+                               \r
+                               if (confirm.UseRunas) {\r
+                                       this.Enabled = false;\r
+                                       uninstallRunasActionInvoke(instPkgs);\r
+                                       this.Enabled = true;\r
+                                       this.Focus();\r
+                               } else {\r
+                                       uninstallActionInvoke(instPkgs);\r
+                               }\r
+                               \r
+                               UpdatePackageList();\r
+                       }\r
+               }\r
+               \r
+               \r
+               void WebOfficialToolStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       foreach (Package pkg in SelectedPackages<Package>()) {\r
+                               string linkURL = pkg.Url.Href;\r
+                               \r
+                               if (! (pkg == null || string.IsNullOrEmpty(linkURL))) {\r
+                                       System.Diagnostics.Process.Start(linkURL);\r
+                               }\r
+                               break;\r
+                       }\r
+               }\r
+               \r
+               void WebGoogleSearchToolStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       foreach (Package pkg in SelectedPackages<Package>()) {\r
+                               string q = System.Web.HttpUtility.UrlEncode(pkg.Name, System.Text.Encoding.UTF8);\r
+                               string googleURL = @"http://www.google.co.jp/search?q="+q;\r
+                               \r
+                               System.Diagnostics.Process.Start(googleURL);\r
+\r
+                               break;\r
+                       }\r
+               }\r
+               \r
+               void OpenInstalledDirectoryStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       foreach (InstalledPackage pkg in SelectedPackages<InstalledPackage>()) {\r
+                               if (pkg.Type == InstallerType.ARCHIVE) {\r
+                                       System.Diagnostics.Process.Start(Path.Combine(NaGet.Env.ArchiveProgramFiles, pkg.Name));\r
+                               } else if (Directory.Exists(pkg.UninstallInfo.InstallLocation)) {\r
+                                       System.Diagnostics.Process.Start(pkg.UninstallInfo.InstallLocation);\r
+                               }\r
+\r
+                               break;\r
+                       }\r
+               }\r
+               \r
+               void PackageListContextMenuStripOpening(object sender, System.ComponentModel.CancelEventArgs e)\r
+               {\r
+                       // \91I\91ð\82³\82ê\82Ä\82¢\82È\82¢\82È\82ç\8aJ\82©\82È\82¢\r
+                       if (packageListView.SelectedItems.Count <= 0) {\r
+                               e.Cancel = true;\r
+                               return;\r
+                       }\r
+                       \r
+                       foreach (Package pkg in SelectedPackages<Package>()) {\r
+                               bool isInstalledPackage = pkg is InstalledPackage;\r
+                               \r
+                               installToolStripMenuItem.Visible = ! isInstalledPackage;\r
+                               uninstallToolStripMenuItem.Visible = isInstalledPackage;\r
+                               \r
+                               webResourcesToolStripMenuItem.Text = string.Format(webResourcesToolStripMenuItem.Tag.ToString(), pkg.Name);\r
+                               webOfficialToolStripMenuItem.Enabled = ! (pkg.Url == null || string.IsNullOrEmpty(pkg.Url.Href));\r
+                               // webGoogleSearchToolStripMenuItem always active.\r
+                               \r
+                               openInstalledDirectoryStripMenuItem.Visible = isInstalledPackage &&\r
+                                       ( (pkg.Type == InstallerType.ARCHIVE) || Directory.Exists(((InstalledPackage) pkg).UninstallInfo.InstallLocation) );\r
+\r
+                               break;\r
+                       }\r
+               }\r
+               \r
+               private IEnumerable<Package> getUpdatedPackages(PackageList<InstalledPackage> installedPkgList, PackageList<Package> avaiablePkgList, IComparer<string> verComp)\r
+               {\r
+                       foreach (InstalledPackage pkg in installedPkgList.Packages) {\r
+                               Package avaiablePkg = avaiablePkgList.GetPackageForName(pkg.Name);\r
+                               \r
+                               if (avaiablePkgList != null) {\r
+                                       if (verComp.Compare(pkg.Version, avaiablePkg.Version) < 0 &&\r
+                                           installedPkgList.GetPackageForPackage(pkg.Name, avaiablePkg.Version) == null) {\r
+                                               \r
+                                               yield return avaiablePkg;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               void UpgradeToolStripButtonClick(object sender, EventArgs e)\r
+               {\r
+                       List<Package> pkgs = new List<Package>();\r
+                       VersionComparetor verComp = new VersionComparetor();\r
+                       PackageList<Package> avaiablePackageList = pkgListsMan.AvailablePkgList;\r
+                       \r
+                       pkgs.AddRange(getUpdatedPackages(pkgListsMan.InstalledPkgList, avaiablePackageList, verComp));\r
+                       pkgs.AddRange(getUpdatedPackages(pkgListsMan.SystemInstalledPkgList, avaiablePackageList, verComp));\r
+                       \r
+                       if (pkgs.Count <= 0) {\r
+                               MessageBox.Show(this, "\8dX\90V\82³\82ê\82½\83\\83t\83g\82Í\82 \82è\82Ü\82¹\82ñ", "\83\\83t\83g\82Ì\8dX\90V");\r
+                               return;\r
+                       }\r
+                       \r
+                       PackagesInstallConfirmForm confirm = new PackagesInstallConfirmForm();\r
+                       confirm.PkgListsManager = pkgListsMan;\r
+                       confirm.Packages = pkgs.ToArray();\r
+                       DialogResult result = confirm.ShowDialog(this);\r
+                       \r
+                       if (result == DialogResult.OK) {\r
+                               Package[] instPkgs = confirm.CheckedPackages;\r
+                               \r
+                               if (confirm.UseRunas) {\r
+                                       this.Enabled = false;\r
+                                       installRunasActionInvoke(instPkgs);\r
+                                       this.Enabled = true;\r
+                               } else {\r
+                                       installActionInvoke(instPkgs);\r
+                               }\r
+                               \r
+                               UpdatePackageList();\r
+                       }\r
+               }\r
+               \r
+               public void UpdatePackageList()\r
+               {\r
+                       pkgListsMan.LoadPackageLists();\r
+                       this.PackageListViewUpdate();\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \83C\83\93\83X\83g\81[\83\8b\82·\82é\82æ\82¤\91I\91ð\82³\82ê\82½\83p\83b\83P\81[\83W\82Ì\94z\97ñ\r
+               /// </summary>\r
+               public TPackage[] SelectedPackages<TPackage>() where TPackage : Package\r
+               {\r
+                               List<TPackage> pkgs = new List<TPackage>();\r
+                               foreach (ListViewItem item in packageListView.SelectedItems) {\r
+                                       pkgs.Add((TPackage) item.Tag);\r
+                               }\r
+                               \r
+                               return pkgs.ToArray();\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/AppliStation/PackageListViewForm.resx b/AppliStation/PackageListViewForm.resx
new file mode 100644 (file)
index 0000000..adca5e9
--- /dev/null
@@ -0,0 +1,358 @@
+<?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=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
+  <metadata name="packageListFilterToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>127, 17</value>\r
+  </metadata>\r
+  <metadata name="packageCommandsToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>314, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="updateToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAyBJREFUOE9dU1lM\r
+        E1EUbUESd038QaNf+iMmGui0pQRDjNEPRSXKh3EJxHampUJEoyzGWEOUEKNIAgmgEKDTmVZAtpAqLlQI\r
+        yiJFoShVFgmrBUEUhmqXub43QFOd5CYv79177rnnnhGL/D4i3rgjaDVkiMSiKI+XDw4MCPwRIIY+l8eT\r
+        D2JnnfWh2r2STpCGdLfLne8rl1H6GLmaWdQ8sLge1NjA1PwVTE1DkFvbC3GZzxbkasMcQTKncQFBMRQC\r
+        AAlVvkkACFWW7VYkMNy9JzYofjUAZY2DUP9uHCw2B3QOzsLHkTmw9EzCkZQqTqY2vD6YXOEkKNojS6I3\r
+        CgCKBOMjTY7Fe6XgDUReNIGUMoBCy3rO3zHPlz638/axn9A/8QsGv81DltHqbbNPQYSW/RNxoWiDAICo\r
+        zx9IroDIRBOPHjhCRV8LI+mtEqX+kFzDWOOzGjhr/zSMTHMwMbsoRITW6Np7Tr9OAJCSNK9IYN3qnNZi\r
+        BDYRRhp3+osrVRniMavWPge8tU/D6HcOM3BJqMK1Qp6EpD3R6XU3Ux6+3xOT+WKLSKcLWAGI0llWyTVs\r
+        S3blB9ck6oxHwQyQZu7wy4/XCHm+WfzbLp8JlaEUK374auXv6JRqpxCp1U58FxVXslpII0j6DwpeCJXB\r
+        ixlJVLQbnRuwN6TakuD/Q6ait/v64YLxGQ7GZxZhDM1X9PSTV6Zmh/fFlWz+n5SO7dt2qcCqwDUh2vL1\r
+        SwzQTvFcLX3T0P55CpbZaP2LseLISI7EvLb7J3Xm5iUjFQYtrZFivBgAqzuGmDT1TMCxtGoOrbBDomRk\r
+        y2NqI7WmmRM3zHgDPHpz+RqEq1kvNkterY0fdiwIhukcmIHsym7+aGo1h7q50Zqx8vz+pMcQnVaDjWby\r
+        ASCf82dum53Ipr3Hr9cs1HeMQvuX7/CyexJq2kehtHEIsip6IIPpguwqG4RrGGRpOsQHgOdBRskVPKGi\r
+        Y2UUOxt7q37+NtsF+WY7FDb0w91KGyTlNnvwDydVMWf/ERcV6UUiEK9cYnEIUn8K0WyUJ7AOKWlwobnH\r
+        UJSHKvW7/Iv/Alo06RVYWPh9AAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <data name="upgradeToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwJJREFUOE91k1tM\r
+        0mEYxv96UVt33dRtW1e1VhfNLls3Nddc2jITswPl5sykXHmglrOpzfJCE9HKA4YIs9RSEdQhpqmc/4J4\r
+        CEQ5qcMTeAAXIjz9odAt9duefdu39/nted/v+yKiruTGREQSHcQB6+S5U+4ACGVkZARPUHyXs29ZEHIh\r
+        Ohdhpb/kwDS7gvklN8bNS2gbmEBeVTdoTK4ykck/uweSwKiLimdUBZLSWRBKNBgx2NDTNwipygjp2BKk\r
+        ygkYrAtoEJEUpGF5D4SW+cETNA9ShaROD5srgJkVH8bmNiGRj+HHMImpGQuVaBX1Qg0F4cl2Ulx7WNoU\r
+        jP6tSwX77ByU42bY1gA7JePiFoZHfmHSMAW32wOfz0e1tABmhQi0XC49BLmeWua+nVEBg8kM9bQLFhdg\r
+        Xf0r49I2ZJpRSGVa8DoV6JTKMTvvQEOXNtiKiEsQZ4hLNwtQxGrDF6keavsWZpyAmYIERU4twu/3IxAI\r
+        hHbb7DxM02ZINGak0gucPIK4SATjt3STaFYuQDK5DoXVi3HHNkbnvJCPjIfMYXm9XrR2SvBz1I4nNzL9\r
+        jQSRSMQ9YgfqWoYgHtBATo6hQ+1Ap86JNnIZTRIdflOmtfWNEMTlcoHU6tClmAYj4dlqA0HkEcnZ9Q62\r
+        YAAm61yoyGy1g9trRE2vBSyRCYV8JUoEMng8HthsNtTyW1HboUHh+ctGCtBP3GNy2S/YYkxQ0w1HXXG6\r
+        UCAgkS/QIYujwuPKIVgsFuj1ejSKFcguacHHo8e01Axeh27ifp5go6ZdBZN9AZubm+jqG0ZmtQLplcN4\r
+        UNoPWrEEOp0OkkE1KprlyImmGykzKMWEALFp5XF3XvHx6bsK6kkbMsrESH7Xi4Q3PYjNFyGhSIyOfi1Y\r
+        X2VISSleqzt8pH/HHH5RV+lvaWkFjd6cchE4QhJiuQnSESuEMhOq29XIei8EI/6pZV/z7uc4fegWg82n\r
+        ZdU5k5jcQBKTB1rOZ1/i81oD6/iJgX+xg9F34x/0jcPn/5nC5h3IH5TSYb0vmXYTAAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <data name="installToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAA49JREFUOE89k39M\r
+        GwUUx28KUTfnnGE1JF23dZuJxhmN4h8aXTJN8D91W2JnHGIQbaQVyCaoc5M4IyWOxbDE6LSUUmiFrQLp\r
+        gEFt11HaUo5B18FGx4/R0sLalVqu0Bb64+trnb7kk0vu7vu5d+/ebaiVyTbnbNyyN2dT3jYmlXyCSa5t\r
+        3bhp25ZHHt7My0Vyx/TUcDef/2RuXl7eYz6fb1ar1Zr0en2YYZgkwTAq9R8/NQxF4mdtibRyJI22UaCL\r
+        0DsA2zjQrrUHpm4H0+k0YDKZ3Hw+/w2KbSU2ZAXNSmVViFvBuWtJ/GhJQT4YR5OBg6o3iNbORZgGgwgE\r
+        gFAojYMHD12hyKeEgHggKygvLy+YnZpcvzw4ieM13ag5rUN9vR6KRgvaNSwcIy7ElwPwez2QSiUuHo8n\r
+        oVj+/x1IJJI9N5zO2B3fEmyOeYTv+uH3B+H2+eHyLODS+CJq+tyo6JpD8ceVMwKBsJrC24kHsx1UV1fv\r
+        Nv7VF7Ven0SlDfiOTeDLwXWIryTxTmcMR3+dwC89Hlw0LqKhoZ8rKqq1C4UFhRR9NNvFya++EH6vsURl\r
+        vfOoGgCK+gCxiehJorbFiYD3HqIcMDMFjNJwe+h8RcWfnp07n38zKzlZVSn8RDUWffcCB7UT+M0ehWpg\r
+        Bo1qFiH/EjIVDgNOFrikA5pVgEKRpIGeyAz0Oab8c6mw38JGdbej6HCuYlX7ERI/vwKzUgNuFUgkyBAB\r
+        po0c2KspNCoAHYlkMlOMBB8yZWUSITtkiQYCIeimI+ieO4ph9cu43GrFtTFgdga4M+HFeVU/RtglsDSj\r
+        YXYdra2jmUU6zYjFYqF5YCDq8QZhdEdQtnAIz3YJINcOYcQODBPXbQvo6LTBO7eMldU4uJU4WtSmBAnO\r
+        MqWlpUKDwRB1e+7C7lvGAfMLeKiJwXG5AoZeoEkJ9HcBDn0SMXqV/6q4+Ot5EtQyJSUluzs7OtbGxsZx\r
+        414Ye7W7sKv9aZSc/x0tchI0ARe1gMGI7EZmymyeSOXnP6UngZgRiUTbm5uVy+MTt8ClgJucB+7IGuRX\r
+        Qzj1gzV9oS0GqxVwuYBgME3hm6l9+w44KFxPvJbZpdzCwsL36+rqpjWatr9PffOtTyQ6cuvFlwosgh17\r
+        eva//sGQWHxm9tixc97Dh6UuPv+ZzJPPEG8TvIwg81c9TuwnpMQJoiL7if696S3iPeKz+9eL6Pjq/XDO\r
+        P90Qa56ijxDNAAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <data name="uninstallToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAA49JREFUOE89k39M\r
+        GwUUx28KUTfnnGE1JF23dZuJxhmN4h8aXTJN8D91W2JnHGIQbaQVyCaoc5M4IyWOxbDE6LSUUmiFrQLp\r
+        gEFt11HaUo5B18FGx4/R0sLalVqu0Bb64+trnb7kk0vu7vu5d+/ebaiVyTbnbNyyN2dT3jYmlXyCSa5t\r
+        3bhp25ZHHt7My0Vyx/TUcDef/2RuXl7eYz6fb1ar1Zr0en2YYZgkwTAq9R8/NQxF4mdtibRyJI22UaCL\r
+        0DsA2zjQrrUHpm4H0+k0YDKZ3Hw+/w2KbSU2ZAXNSmVViFvBuWtJ/GhJQT4YR5OBg6o3iNbORZgGgwgE\r
+        gFAojYMHD12hyKeEgHggKygvLy+YnZpcvzw4ieM13ag5rUN9vR6KRgvaNSwcIy7ElwPwez2QSiUuHo8n\r
+        oVj+/x1IJJI9N5zO2B3fEmyOeYTv+uH3B+H2+eHyLODS+CJq+tyo6JpD8ceVMwKBsJrC24kHsx1UV1fv\r
+        Nv7VF7Ven0SlDfiOTeDLwXWIryTxTmcMR3+dwC89Hlw0LqKhoZ8rKqq1C4UFhRR9NNvFya++EH6vsURl\r
+        vfOoGgCK+gCxiehJorbFiYD3HqIcMDMFjNJwe+h8RcWfnp07n38zKzlZVSn8RDUWffcCB7UT+M0ehWpg\r
+        Bo1qFiH/EjIVDgNOFrikA5pVgEKRpIGeyAz0Oab8c6mw38JGdbej6HCuYlX7ERI/vwKzUgNuFUgkyBAB\r
+        po0c2KspNCoAHYlkMlOMBB8yZWUSITtkiQYCIeimI+ieO4ph9cu43GrFtTFgdga4M+HFeVU/RtglsDSj\r
+        YXYdra2jmUU6zYjFYqF5YCDq8QZhdEdQtnAIz3YJINcOYcQODBPXbQvo6LTBO7eMldU4uJU4WtSmBAnO\r
+        MqWlpUKDwRB1e+7C7lvGAfMLeKiJwXG5AoZeoEkJ9HcBDn0SMXqV/6q4+Ot5EtQyJSUluzs7OtbGxsZx\r
+        414Ye7W7sKv9aZSc/x0tchI0ARe1gMGI7EZmymyeSOXnP6UngZgRiUTbm5uVy+MTt8ClgJucB+7IGuRX\r
+        Qzj1gzV9oS0GqxVwuYBgME3hm6l9+w44KFxPvJbZpdzCwsL36+rqpjWatr9PffOtTyQ6cuvFlwosgh17\r
+        eva//sGQWHxm9tixc97Dh6UuPv+ZzJPPEG8TvIwg81c9TuwnpMQJoiL7if696S3iPeKz+9eL6Pjq/XDO\r
+        P90Qa56ijxDNAAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <data name="sysinstalled.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        AAABAAMAICAAAAEAIACoEAAANgAAABgYAAABACAAiAkAAN4QAAAQEAAAAQAgAGgEAABmGgAAKAAAACAA\r
+        AABAAAAAAQAgAAAAAACAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEuLi4Sqqq\r
+        qoa2traWubm5laGhoZWBgYGHd3d3TgAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnp6eZMfH\r
+        x9nV1dX/3d3d/+Li4v/a2tr/1tbW/9zc3P/IyMj/oqKivZeXl18AAAAAAAAAAAAAAAAAAAACAAAAAQAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAl5eXC6+v\r
+        r+fZ2dn/2dnZ/9zc3P/g4OD/39/f/9DQ0P/Pz8//6urq/83Nzf/Ozs7/0NDQ/6CgoKwdHR02AAAACQAA\r
+        ACkAAAAWAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AACzs7Pn09PT/8fHx//IyMj/1NTU/9/f3//h4eH/0tLS/8/Pz//a2tr/vb29/8PDw/+2trb/xcXF/7Cw\r
+        sP8AAABUAAAAOgAAAC4AAAAXAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAqqqqLr29vf+3t7f/vr6+/8bGxv/Pz8//2tra/9vb2//Pz8//x8fH/8rKyv/Gxsb/ubm5/56e\r
+        nv+Ojo7/ycnJ/yEhIXEAAAAhAAAAMgAAAB8AAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAxcXF4c7Ozv+/v7//v7+//8nJyf/Q0ND/0tLU/8/Pz//Gxsb/vr6+/6Ki\r
+        ov+FhYX/hISE/5ubm/+VlZXvAAAAFwwMDBgICAkVAAAAEwAAAAwAAAAAOTs8GlVVV8iJh4f/UVBQngEB\r
+        AToAAAA2ExMTcRQUFGRDQ0ENAAAAAAAAAAAAAAAAiYmJo9PT1P/Ly8v/tra1/7CwsP+vr63/mpmZ/4OE\r
+        g/9qamr/U1JS/2dnZ/+Vk5P/tLS1/6Shod6loqTbw8PE/19fXVoAAAAAAAAABQAAAAB9fH3InpuZ/7ey\r
+        sf/g4OH/m5ub/0dHR/toaGj/paWk+I2Ni9oeHh1zTExNDgAAAAAAAAAAISAeSXJycL6bm5vunJqZ/3d3\r
+        df9zcHP/dHF0/4CBg/+en6H/q7K2/7fHy//A2dv/z+ns/9zk5v/T09T/Xl5egAAAAAAAAAAAAAAAAI2M\r
+        jem7t7T/jo2O/62trv/S1NL/xMTE/5CQkexSUlK6eXl6yKysrfmIiIrmKysreQAAAAoAAAAAMzE1H2Nj\r
+        ZoSKj5T9iJGY/4yco/+Xr7f/udPZ/8vk5f/Q3uD/1dLQ/9Sxp//RfHr/y7y2/7vIyP+Tk5GYAAAAAAAA\r
+        AAAAAAAAh4WF2cC6u/+koaT/rays/66urf+qqan/z8/P/9fX1/+Mi4zdU1FS4YSDhP9qbG7xjZaa7bHC\r
+        x/+1zdT/rMjO/67LzP+9xsj/xbe1/8esqv/Ilo7/xWlZ/7stHv+vBQD/owAA/5kAAP+8ioT/w+Dk/5iU\r
+        lLUAAAAAAAAAAAAAAACMiovcysTF/6ejpf+sra7/oqSk/5KRkf+RjpL/f4yO/5a0rv+5ztP/1O70/9z7\r
+        /f/Q4eP/xsDA/7yfnv+7fXX/tF1d/6s1M/+gDAD/oAAA/6EAAP+iAAD/pAsA/6sdCv+yLBj/txYA/8eJ\r
+        gP/G5ur/ko+OzAAAAAAAAAAAAAAAAJGNjuDSzcz/pqKh/66sr/+pqan/l5eX/6inrP+ntbb/wM/K/7qn\r
+        p/+wdHL/olBS/5g1M/+OERD/hQAA/4EAAP+DAQH/jQAA/5oCAP+vMR3/tz0r/7s8Kf+/Py3/wkEt/8ZD\r
+        LP/IKRD/zHRn/8bp7f+Xk5LWAAAAAAAAAAAAAAAAk4+S4drS0v+mpKX/rK6v/6yqrP+cnJz/wtPX/5BD\r
+        RP+OFBf/jAwF/3wAAP90AAD/dQAA/3sAAP+JAwD/dyIZ/28rIv+ZEAD/rRgB/8BIOf/FTD3/yks6/85P\r
+        PP/RUj7/1FZB/9ZELf/SZ1P/yubr/52enuaTk5MSAAAAAAAAAACRkZLh3tbY/6imp/+usK7/sbCx/6Cg\r
+        oP/H2t//gSsn/38AAP+NFQn/ixgP/4sXDP+JEAX/kBAA/3kkGv+xp6X/tLS0/3YeFv+1Hgv/0WVS/9Nk\r
+        Uv/XYk7/2mRQ/91nUv/gaVX/5l9H/+RoUv/Q5eb/oqip/5SQkC4AAAAAAAAAAJOQkuHe1NX/paOk/7Cv\r
+        r/+0tLX/pqam/8PQ0v+PXVj/jhMI/5gvKf+TJyD/kigd/5ETB/94HRf/xbe1/9/f3//FxcX/nYiH/6Mr\r
+        Fv/demv/3XRi/+B0Yv/jd2P/5nhk/+l7aP/rd17/7HBa/9Pe4f+psbL/kpGRSQAAAAAAAAAAko6Q4dHN\r
+        zf+dm5v/srGx/7/AwP+zs7P/yNHT/5p2ef+OGhH/njoy/5s6Nv+XMSf/fC8q/9fMy//29vb/m2Nb/7WR\r
+        i//f39//kGBY/+KPgv/mhXT/6Yd1/+uJd//uinn/8I16//OPef/0eGP/1dLR/629vv+Rjo1dAAAAAAAA\r
+        AACRjpLhzLS+/5WDiv+2urf/y8vL/7u6u//Gy83/n5KU/48hGv+mSUP/q1VM/6RJQf/UzMz/7uzr/5NO\r
+        Rf+tGAP/rTYj/+ff3//Y1tb/p311/+6Yh//wmYn/85uK//adjP/3no3/+qKR//yJcv/hxL//t8zQ/5GN\r
+        jWcAAAAAAAAAAI+BiuGvqqj/kZuV/720u//N0M7/v72//8HFxv+wtrr/jioh/65WT/+zYFf/lRkS/6RQ\r
+        Sv+UNij/qhYB/7cXAP/AGQH/s2hl//////+5sK7/y4t///Womf/4qpv/+q2c//2unf//saX//5mD/+2/\r
+        t/+80Nj/kY6NgQAAAAAAAAAAdo6D3RXyhf9Lxo7/36jE/9HX1P/FxcX/x8jJ/7rKzv+RMS3/uGdg/7BS\r
+        Sf+QAAD/pBMA/6oVAP+0GAD/whwA/8kaAP/FHw7/1cbD//39/f+oj4v/8rGj//27rP/+va3//7+u///D\r
+        tv//spr/8MK1/8DU2v+QjYu5AAAAAAAAAABogXbYAHs5/2J4af/YxND/19zb/8rKyv/Nzc7/vM7R/5M0\r
+        Mf++cGj/oisg/5sBAP+uGAD/vhkA/8odAP/WJAD/4BYA//AsBP/VraP/4N3c/+Dg4P+nioL//867///M\r
+        vP//z73//9XF///Jsf/0w63/xdTc/5GPj+CXl5cLAAAAAHRqceRHJi3/el9n/8DGx//X2Nj/w8PD/9DQ\r
+        0f++0NP/lUI9/7dhVP+cCQD/qg8A/7cZAP/EHAD/0CAA/9smAP/nDgD/9Eoo//7g2P/Erqf/3t7e/767\r
+        uv+9oZb//9jI///Zyf//287//9jD//nCqf/L19v/k5aX9paWlRgAAAAAjouNnnp0d/+trKz/9fb5////\r
+        ///h4eH/19fX/8HS1/+bWFP/oSgZ/58EAP+vFwD/uxoA/8cdAP/TIAD/3yYA/+sJAP/7d13///Hv//jV\r
+        yP/As6//1NTU/6ejof/Js6j//N/S///k2///49X//8qz/9re3v+bnaD/k5KQIQAAAAAAAAAJsbSyUaao\r
+        qbi2t7f/2NjY//z8/P//////0N7j/5xbU/+MAAD/phAA/7IXAP+/GwD/yx4A/9ckAP/jIAD/8A4A//+w\r
+        nf//+Pb//9/Z//DXz/+zrKr/vb29/62jn//55+L///Ls///z7v//2Mb/6eXk/6asrv+QkI8sAAAAAAAA\r
+        AAAAAAAAAAAABZ+goBeQkZFimZqauLO0tPPDz9L/nnJt/40AAP+oEwD/tRwA/8EeAP/PIAD/2yYA/+YY\r
+        AP/4JAD//+LX////////7en///Dr/+7i2v/p3tb/7NvS//3m2///5dX//9zJ//u7nv/z6eT/sbq8/42L\r
+        ilAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlpaWDK62uaymnZz/kQUC/60IAP+6DQD/xgoA/9QK\r
+        AP/jCAD/7wAA//8rAv//29D//dnP///Gtf/6xLH/9MKw//jBr//0u6T/5rSh/+C6rP/jxbn/48zE//X2\r
+        9f/Exsn/nZybOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsri8bbG6vf+FAAD/oQAA/7MI\r
+        A/+4Fgv/vywa/8xIMf/WV0X/0Xxr/9WupP/Rsqz/0LWv/8i9vP/Hysr/y9DS/8rR1P/J1trpy9ngzcfX\r
+        3KLJ1tuPz9HTidHU1FEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACztblktr/E/59z\r
+        b/+tkY3/uq2r/7i7uP+4zs//vODl/8Ht8/fA5+/fxNfav8TV2qDF1NmFyNHVc8jNzlTEy8w/x8zNOcjK\r
+        zSXHycgdxsjJD8bIyQ0AAAAEAAAABgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJqZ\r
+        nAy6vL2jzubovsjh45bJ3d9ryt3hT8vX2jjK0dIuyM3MHsjJyg4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////\r
+        Af///AB///AAE//wAAD/4AAA//AAAIA4AAOADAADgAIAA4AAAAOAAAADgAAAA4AAAAGAAAABgAAAAYAA\r
+        AAGAAAABgAAAAYAAAAGAAAAAgAAAAIAAAADAAAAA8AAAAP4AAAD/AAAB/wAAB/8AP////////////ygA\r
+        AAAYAAAAMAAAAAEAIAAAAAAAYAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAACRkJD/hIKC/3x6ev+RkJD/AAAAAAAAAAAAAAAAu7y8Q7u8vPm8vb3/uru7/7e4\r
+        uP+nqKj/mZqa/5qbm/+dnp7/n6Cg/6CgoP+goKDEAAAAAAAAAAAAAAAAAAAAAAAAAAClpaW0k5KS/4SE\r
+        hP+Xl5exAAAAAAAAAAAAAAAAy8vLOMnJyerExcX/v8DA/7/Bwf+4ubn/rq+v/6eoqP+ioqL/n5+f/6Cg\r
+        oPqgoKCYAAAAAAAAAAAAAAAAAAAAAAAAAACsrKzfuLi4/7i4uP+pqangAAAAAAAAAAAAAAAAAAAACNXV\r
+        1W7T09PZzc7O+sbIyP+7vLz/r7Cw/6mqqv+jo6P9n5+f7qCgoJKgoKAXAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AACsrKz4ysrK/8rKyv+pqan5AAAAAAAAAAAAAAAAAAAAAAAAAADe3t4U3NzclsTFxfygoaH/i4uL/5SV\r
+        lf+dnZ3WoKCgRQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACurq7+0dHR/9HR0f+srKz/AAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAALq6uvChoqL/k5OT/5mZmf+fnp7HAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAACurq730dHR/9HR0f+srKz/xcbGxMTFxf/Dxsb/wcbG/77ExP+7wMD/ub6+/7m/\r
+        v/+2u7z/sre3/6+1tf+ts7T/rLKy/6qwsP+pr6//qK2u/6epqf+ko6P1oKCgtwAAAACtra33z8/P/8/P\r
+        z/+rq6v/zM7O987Pz//O1tb/ztvc/83a2v/M2dr/y9jY/8rX1//I1NX/xdLU/8LS1P/C0tT/wtLU/8DR\r
+        0//A0dP/wc7Q/8HO0P+xsbD9oKCg9QAAAACtra33z8/P/8/Pz/+rq6v/zM/P/8DJyf+lAAD/pQAA/6kD\r
+        AP+pAwD/qAAA/6oAAP+0BQD/xA8A/9IRAP/YEgD/2BIA/90SAP/XBgD/zTEO/80xDv+1v8H/oKCg/wAA\r
+        AACura331M7T/9TO0/+tq6z/yc7O/6+/v/+lAAD/pQAA/6kDAP+pAwD/qAAA/6kAAP+AKij/kxQK/9IR\r
+        AP/YEgD/2BIA/90SAP/XBgD/zTEO/80xDv+zxsr/oaGh/wAAAACwra/33s3Z/97N2f+xqq//ys7O/7C+\r
+        v/+xGxH/sRsR/7ErHf+zJBX/uBgI/41BOf/FxcX/kHNv/9I7H//aPiP/3jke/+M8If/iLAb/2Eki/9hJ\r
+        Iv+yw8f/o6Oj/wAAAACfuKf3WPKG/1jyhv+Bv5b/yc3N/6+7vP+1LyL/tS8i/7I1J/+3KBj/kTkv/+Xl\r
+        5f/Pzs7/ysrK/5JFOP/ZVDr/304y/+FTOP/jQRr/3Fc0/9xXNP+yw8b/pKSk/wAAAACXu6P5ANE3/wDR\r
+        N/9etXv/yc3N/622t/+2OCz/tjgs/7QxJP+TRD3/+vr6/7qalv+vQTD/29LQ/7qxr/+0VEH/2l5C/9ph\r
+        Sf/eUTP/2mRI/9pkSP+0w8b/pqam/wAAAACnrKn+NU04/zVNOP9zfHX/ys3N/6mztP+5OC3/uTgt/7kq\r
+        HP+xaGH/t4aA/8cTAf/XNx7/tXNo//////+YeHH/1GhT/9NrWf/XXEX/1m5X/9ZuV/+4xcj/qqqq/wAA\r
+        AAC3tLbQjneF/453hf+imJ7wys3N/6eys/+8LiL/vC4i/70iEv/IGQT/1hgA/90VAP/nOBz/5mBF/9K9\r
+        uP/n5+b/qVU9/+tqSf/tXjf/6XNO/+lzTv+3xsr/rK2t/wAAAAC+vr6Uvr6+/76+vty+vr7Ayc3N/6az\r
+        tP/BHBD/wRwQ/8UbCP/THAH/4B8A/+QWAP/2Ohz//2M9/9xjRP/e1tT/vrGt/+FiNv//Yin//HRF//x0\r
+        Rf+1xsv/rq+v/wAAAAAAAAAAAAAAAAAAAAAAAAAAyc3O/6Sztf/IDwL/yA8C/88WAf/aIQD/5CUA/+gV\r
+        AP/2QiT//3JP//9qR//Hc13/3d3d/5p0ZP/4bDb/+nVP//p1T/+2x8z/sLGx/wAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAyc7O/6O1tv/TAAD/0wAA/9wAAP/nCgD/8AwA//gAAP//PxL//35C//B2Sv/lckz/roh4/8rK\r
+        yv+qYUD/7XRJ/+10Sf+5yM7/sbKy/wAAAAAAAAAAAAAAAAAAAAAAAAAAyc3N/6Sysv/HGhv/xxob/84j\r
+        G//WKBz/3Sgc/+UlHP/vWzL/65BW/9CNaP/HjW7/x4lo/8OYf/+7d1X/1Ilm/9SJZv+9x8v/s7S0/wAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAycvM/6Slpv+iior/ooqK/6OLiv+ljYv/p46M/6mPjf+vm5b/tKih/7Kp\r
+        pP+yqqb/ta2o/7auqP+4raf/vbSv/720r//AxMT/tLW1/wAAAAAAAAAAAAAAAAAAAAAAAAAAzs7Q1b69\r
+        vv+2v8D/tsnJ/7a/wP+2v8D/tr/A/7a/wP+2v8D/tr/A/7a/wP+2v8D/tr/A/7a/wP+2v8D/tr/A/7a/\r
+        wP/Bw8L/t7i41QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAD///8ADgAfAA4AHwAPAB8AD4B/AA/g/wAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAA\r
+        AQAAAAEA8AABAPAAAQDwAAEA8AABAPAAAQD///8A////AP///wAoAAAAEAAAACAAAAABACAAAAAAAEAE\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAJGQkP97eXn/kZCQ/wAAAAAAAAAAAAAAALu8vP+7vLz/tLW1/5uc\r
+        nP+bnJz/n6Cg/6CgoP8AAAAAAAAAAAAAAAC0tLTTlJSU/56ens0AAAAAAAAAAAAAAADS0tKCyMnJ/8TG\r
+        xv+5urr/qqur/6CgoP+goKBhAAAAAAAAAAAAAAAAq6ur97+/v/+lpaX/AAAAAAAAAAAAAAAAAAAAAN7e\r
+        3ja5urr/ioqK/5eXl+ygoKA2AAAAAAAAAAAAAAAAAAAAAK6urvfR0dH/q6ur/8PExIbAwcH/vr+//7u8\r
+        vP+4ubn/tba2/6qqqv+oqKj/pqam/6SkpP+ioqL/oKCg/6CgoJWtra330dHR/6urq//Nz8//zc/P/83O\r
+        z//Mzs7/y83N/8rMzP/Hycn/xsnJ/8bJyf/FyMj/xcjI/8THx/+goKD/ra2t99HR0f+rq6v/ztDQ/62u\r
+        rv+nDw//qxMN/6gODv+pICD/tD8v/9QbAf/UHQH/2B0A/8slA//FyMj/oaGh/66urvfR0dH/rKys/8/R\r
+        0f+rrKz/siwj/7MxIv+5HQz/ycXE/8xxY//XRyz/3kAl/+NEJ//dOxD/xMfH/6Ojo/+WvaP3APJI/2LC\r
+        gv/P0dH/qamp/7RANf+0LyL/19bV/+7u7v/4+Pj/s42H/9tYO//dXEH/3k8t/8XIyP+lpaX/q6ur90hE\r
+        Q/97eXn/0dLS/6Ojo/+4Qzr/wEE0/9zKyf/YGgD/1IJ1///////WalP/1WxZ/9piSP/Hysr/q6ur/76+\r
+        vpS+vr7/vr6+wNDS0v+ioqL/vC8k/8UcCf/aHgD/5hsA//9ZNv/zpJD/2dnZ//9qPP//ZTH/x8rK/62u\r
+        rv8AAAAAAAAAAAAAAADR0tP/oKCg/8UYB//UGAH/4yYA/+0aAP//cEv//2tI/+Hh4f/Aurj//2s//8jK\r
+        y/+wsbH/AAAAAAAAAAAAAAAA0dLT/6CgoP/KBAT/3A8A/+gSAP/3FgD//388/9aCXP/Xg1n/2oFR/99z\r
+        Q//Jy8v/srOz/wAAAAAAAAAAAAAAANHS0/+goKD/oKCg/6CgoP+ioqL/pKSk/62urv+wsLD/srOz/7W2\r
+        tv+4ubn/ycvM/7W2tv8AAAAAAAAAAAAAAADR0tN40dLT/9HS0//R0tP/0NLS/9DR0v/O0ND/zc/P/83P\r
+        z//Mzs7/y83N/8rMzP+4ubmVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAcBwAAHAcAAB4PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\r
+        AAAAAAAA4AAAAOAAAADgAAAA4AAAAP//AAA=\r
+</value>\r
+  </data>\r
+  <metadata name="packageListFilterToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>127, 17</value>\r
+  </metadata>\r
+  <metadata name="packageCommandsToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>314, 17</value>\r
+  </metadata>\r
+  <metadata name="packageListContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>511, 17</value>\r
+  </metadata>\r
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
+    <value>53</value>\r
+  </metadata>\r
+</root>\r
diff --git a/AppliStation/PackageUninstallConfirmForm.Designer.cs b/AppliStation/PackageUninstallConfirmForm.Designer.cs
new file mode 100644 (file)
index 0000000..bd1d03d
--- /dev/null
@@ -0,0 +1,180 @@
+\r
+namespace AppliStation\r
+{\r
+       partial class PackageUninstallConfirmForm\r
+       {\r
+               /// <summary>\r
+               /// Designer variable used to keep track of non-visual components.\r
+               /// </summary>\r
+               private System.ComponentModel.IContainer components = null;\r
+               \r
+               /// <summary>\r
+               /// Disposes resources used by the form.\r
+               /// </summary>\r
+               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+               protected override void Dispose(bool disposing)\r
+               {\r
+                       if (disposing) {\r
+                               if (components != null) {\r
+                                       components.Dispose();\r
+                               }\r
+                       }\r
+                       base.Dispose(disposing);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This method is required for Windows Forms designer support.\r
+               /// Do not change the method contents inside the source code editor. The Forms designer might\r
+               /// not be able to load this method if it was changed manually.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackageUninstallConfirmForm));\r
+                       this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.label = new System.Windows.Forms.Label();\r
+                       this.btnPanel = new System.Windows.Forms.FlowLayoutPanel();\r
+                       this.runasCheckBox = new System.Windows.Forms.CheckBox();\r
+                       this.okButton = new System.Windows.Forms.Button();\r
+                       this.cancelButton = new System.Windows.Forms.Button();\r
+                       this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
+                       this.iconLabel = new System.Windows.Forms.Label();\r
+                       this.label2 = new System.Windows.Forms.Label();\r
+                       this.tableLayoutPanel1.SuspendLayout();\r
+                       this.btnPanel.SuspendLayout();\r
+                       this.flowLayoutPanel1.SuspendLayout();\r
+                       this.SuspendLayout();\r
+                       // \r
+                       // tableLayoutPanel1\r
+                       // \r
+                       this.tableLayoutPanel1.ColumnCount = 1;\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));\r
+                       this.tableLayoutPanel1.Controls.Add(this.label, 0, 0);\r
+                       this.tableLayoutPanel1.Controls.Add(this.btnPanel, 0, 2);\r
+                       this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);\r
+                       this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+                       this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
+                       this.tableLayoutPanel1.RowCount = 3;\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.Size = new System.Drawing.Size(392, 216);\r
+                       this.tableLayoutPanel1.TabIndex = 1;\r
+                       // \r
+                       // label\r
+                       // \r
+                       this.label.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.label.Location = new System.Drawing.Point(10, 10);\r
+                       this.label.Margin = new System.Windows.Forms.Padding(10, 10, 10, 0);\r
+                       this.label.Name = "label";\r
+                       this.label.Size = new System.Drawing.Size(372, 23);\r
+                       this.label.TabIndex = 1;\r
+                       this.label.Text = "以下のソフトをアンインストールしようとしています。よろしいですか?";\r
+                       // \r
+                       // btnPanel\r
+                       // \r
+                       this.btnPanel.AutoSize = true;\r
+                       this.btnPanel.Controls.Add(this.runasCheckBox);\r
+                       this.btnPanel.Controls.Add(this.okButton);\r
+                       this.btnPanel.Controls.Add(this.cancelButton);\r
+                       this.btnPanel.Dock = System.Windows.Forms.DockStyle.Right;\r
+                       this.btnPanel.Location = new System.Drawing.Point(66, 184);\r
+                       this.btnPanel.Name = "btnPanel";\r
+                       this.btnPanel.Size = new System.Drawing.Size(323, 29);\r
+                       this.btnPanel.TabIndex = 0;\r
+                       // \r
+                       // runasCheckBox\r
+                       // \r
+                       this.runasCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\r
+                       this.runasCheckBox.AutoSize = true;\r
+                       this.runasCheckBox.Checked = true;\r
+                       this.runasCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;\r
+                       this.runasCheckBox.Location = new System.Drawing.Point(3, 6);\r
+                       this.runasCheckBox.Name = "runasCheckBox";\r
+                       this.runasCheckBox.Size = new System.Drawing.Size(126, 16);\r
+                       this.runasCheckBox.TabIndex = 2;\r
+                       this.runasCheckBox.Text = "管理者として実行(&A)";\r
+                       this.runasCheckBox.UseVisualStyleBackColor = true;\r
+                       this.runasCheckBox.CheckedChanged += new System.EventHandler(this.RunasCheckBoxCheckedChanged);\r
+                       // \r
+                       // okButton\r
+                       // \r
+                       this.okButton.AutoSize = true;\r
+                       this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;\r
+                       this.okButton.Image = ((System.Drawing.Image)(resources.GetObject("okButton.Image")));\r
+                       this.okButton.Location = new System.Drawing.Point(135, 3);\r
+                       this.okButton.Name = "okButton";\r
+                       this.okButton.Size = new System.Drawing.Size(104, 23);\r
+                       this.okButton.TabIndex = 0;\r
+                       this.okButton.Text = "アンインストール";\r
+                       this.okButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
+                       // \r
+                       // cancelButton\r
+                       // \r
+                       this.cancelButton.AutoSize = true;\r
+                       this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+                       this.cancelButton.Location = new System.Drawing.Point(245, 3);\r
+                       this.cancelButton.Name = "cancelButton";\r
+                       this.cancelButton.Size = new System.Drawing.Size(75, 23);\r
+                       this.cancelButton.TabIndex = 1;\r
+                       this.cancelButton.Text = "キャンセル";\r
+                       // \r
+                       // flowLayoutPanel1\r
+                       // \r
+                       this.flowLayoutPanel1.Controls.Add(this.iconLabel);\r
+                       this.flowLayoutPanel1.Controls.Add(this.label2);\r
+                       this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 43);\r
+                       this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(10);\r
+                       this.flowLayoutPanel1.Name = "flowLayoutPanel1";\r
+                       this.flowLayoutPanel1.Size = new System.Drawing.Size(372, 128);\r
+                       this.flowLayoutPanel1.TabIndex = 2;\r
+                       // \r
+                       // iconLabel\r
+                       // \r
+                       this.iconLabel.Location = new System.Drawing.Point(3, 0);\r
+                       this.iconLabel.Name = "iconLabel";\r
+                       this.iconLabel.Size = new System.Drawing.Size(1, 1);\r
+                       this.iconLabel.TabIndex = 0;\r
+                       // \r
+                       // label2\r
+                       // \r
+                       this.label2.AutoSize = true;\r
+                       this.label2.Location = new System.Drawing.Point(10, 0);\r
+                       this.label2.Name = "label2";\r
+                       this.label2.Size = new System.Drawing.Size(0, 12);\r
+                       this.label2.TabIndex = 1;\r
+                       // \r
+                       // PackageUninstallConfirmForm\r
+                       // \r
+                       this.AcceptButton = this.okButton;\r
+                       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+                       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+                       this.CancelButton = this.cancelButton;\r
+                       this.ClientSize = new System.Drawing.Size(392, 216);\r
+                       this.Controls.Add(this.tableLayoutPanel1);\r
+                       this.MaximizeBox = false;\r
+                       this.Name = "PackageUninstallConfirmForm";\r
+                       this.ShowIcon = false;\r
+                       this.ShowInTaskbar = false;\r
+                       this.Text = "ソフトのアンインストール";\r
+                       this.tableLayoutPanel1.ResumeLayout(false);\r
+                       this.tableLayoutPanel1.PerformLayout();\r
+                       this.btnPanel.ResumeLayout(false);\r
+                       this.btnPanel.PerformLayout();\r
+                       this.flowLayoutPanel1.ResumeLayout(false);\r
+                       this.flowLayoutPanel1.PerformLayout();\r
+                       this.ResumeLayout(false);\r
+               }\r
+               private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;\r
+               private System.Windows.Forms.Label iconLabel;\r
+               private System.Windows.Forms.Label label2;\r
+               private System.Windows.Forms.Label label;\r
+               private System.Windows.Forms.Button cancelButton;\r
+               private System.Windows.Forms.Button okButton;\r
+               private System.Windows.Forms.CheckBox runasCheckBox;\r
+               private System.Windows.Forms.FlowLayoutPanel btnPanel;\r
+               private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+       }\r
+}\r
diff --git a/AppliStation/PackageUninstallConfirmForm.cs b/AppliStation/PackageUninstallConfirmForm.cs
new file mode 100644 (file)
index 0000000..b922f24
--- /dev/null
@@ -0,0 +1,98 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using NaGet.Packages;\r
+using NaGet.Packages.Install;\r
+\r
+namespace AppliStation\r
+{\r
+       /// <summary>\r
+       /// Description of PackageUninstallConfirmForm.\r
+       /// </summary>\r
+       public partial class PackageUninstallConfirmForm : Form\r
+       {\r
+               private InstalledPackage uninstallPackage;\r
+               \r
+               public InstalledPackage UninstallPackage {\r
+                       get { return uninstallPackage; }\r
+                       set {\r
+                               uninstallPackage = value;\r
+                               \r
+                               label2.Text = string.Format("{0}({1})", uninstallPackage.Name, uninstallPackage.Version);\r
+                               label2.Font = new Font(SystemFonts.DefaultFont.FontFamily, SystemFonts.DefaultFont.Size*1.5f);\r
+                               \r
+                               string iconPath = uninstallPackage.UninstallInfo.IconPath;\r
+                               if (!string.IsNullOrEmpty(iconPath)) {\r
+                                       if (iconPath.EndsWith(",0")) {\r
+                                               iconPath = iconPath.Substring(0, iconPath.Length-2);\r
+                                       }\r
+                                       if (System.IO.File.Exists(iconPath)) {\r
+                                               iconLabel.Image = Icon.ExtractAssociatedIcon(iconPath).ToBitmap();\r
+                                               iconLabel.Size = iconLabel.Image.Size;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public PackageUninstallConfirmForm()\r
+               {\r
+                       //\r
+                       // The InitializeComponent() call is required for Windows Forms designer support.\r
+                       //\r
+                       InitializeComponent();\r
+                       \r
+                       // \8aÇ\97\9d\8eÒ\8c \8cÀ\82Å\93®\82¢\82Ä\82¢\82é\82È\82ç\82Îrunas\82ª\95K\97v\82É\82Í\82È\82ç\82È\82¢\82Ì\82Å\95\\8e¦\82µ\82È\82¢\r
+                       if (NaGet.Utils.IsAdministrators()) {\r
+                               runasCheckBox.Checked = false;\r
+                               runasCheckBox.Visible = false;\r
+                       }\r
+               }\r
+               \r
+               #region runas\8aÖ\98A\r
+               \r
+               /// <summary>\r
+               /// runas\82Å\8eÀ\8ds\82·\82é\82©\94Û\82©\r
+               /// </summary>\r
+               public bool UseRunas {\r
+                       set {\r
+                               runasCheckBox.Checked = (! NaGet.Utils.IsAdministrators()) && value;\r
+                               \r
+                               updateUseRunas();\r
+                       }\r
+                       get {\r
+                               return runasCheckBox.Checked;\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \91I\91ð\82³\82ê\82½\83p\83b\83P\81[\83W\82ð\92²\8d¸\82µ\82Ä\81ARunas\82ð\8eg\82¤\82×\82«\82©\82¢\82È\82©\82ð\95Ô\82·\r
+               /// </summary>\r
+               public bool GetShouldUseRunas()\r
+               {\r
+                       if (NaGet.Utils.IsAdministrators()) {\r
+                               // \8aÇ\97\9d\8eÒ\8c \8cÀ\82Å\93®\82¢\82Ä\82¢\82é\8fê\8d\87\82Í\95s\97v\r
+                               return false;   \r
+                       }\r
+                       \r
+                       return (uninstallPackage.Type != InstallerType.ARCHIVE);\r
+               }\r
+               \r
+               void RunasCheckBoxCheckedChanged(object sender, EventArgs e)\r
+               {\r
+                       updateUseRunas();\r
+               }\r
+               \r
+               private void updateUseRunas()\r
+               {\r
+                       if (UseRunas) {\r
+                               System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackagesInstallConfirmForm));\r
+                               okButton.Image = ((System.Drawing.Bitmap)(resources.GetObject("okButton.Image")));\r
+                       } else {\r
+                               okButton.Image = null;\r
+                       }\r
+               }\r
+               \r
+               #endregion\r
+\r
+       }\r
+}\r
diff --git a/AppliStation/PackageUninstallConfirmForm.resx b/AppliStation/PackageUninstallConfirmForm.resx
new file mode 100644 (file)
index 0000000..6c99de1
--- /dev/null
@@ -0,0 +1,139 @@
+<?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=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
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="okButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAApdJREFUOE+Fk21I\r
+        k1EUx61vgRX0wYqc4mi+JOqoD4WV9oJKpC5fM6m1QKdJEpVCTZFCmpl92FaNEicJlWUffGtEy2eS5sbQ\r
+        9mIlFRWIIk60TZuYpPt37mgy6QEf+MPl3P/53XPPc+66IJ5PqVRGBwcHv/B6vSLaXk/fiMfjSVMoFE4+\r
+        /0qMEqNaWlpadTrdvNFohM1m84mtGxsbPbTXRp7I/yAULFSr1d9UKpXHZDKBafnDEJaeNaPpkQzlHfmw\r
+        WCy+OHnmNRqNneUEnjxhtVq97DT342YsDvRg8XU7FjQ3Uf8wAyVdWSh6KkGe5qivIvKCAO5AwIzdbseP\r
+        qmuYuV2Dn1olZq9XwC3Nw+VbeyF5nozM5v1IvbMb+xRRPggB5lYBWHD0ghyTFcWYKMrBZOIeOAUCyKp3\r
+        IuZBBBJUYRDf2AFh+WZewDSrYKr0NGZl6ZiKDYUrKAi/SKcUEdhyPxzRd0VIaBAhrHIbL2DM4XDgo7QQ\r
+        X9KOwBqyHcMbt+JzaCTOV+3CwdZ4HH8ihkSXgCRlmB8wFniFDqrAmyVrQsGZe8jMrcehjAak5KvRbZDD\r
+        8TURw58OY3goGe9fRsFsNi9TD14FAmoMBsOfpKscQuRGhF7isKGkB5vK3qCvrxxwpwLOE8BoOtAXC71e\r
+        P0OA2hVAXV1djFarHWeNFEk7ESfvRPi5TgiLu2B5R4CpY8B4LjBC16NfSN7vBBCuGigK2FgjcyrbIDrb\r
+        jQhpF4RFepj6CeDMBsYkcA0c8M+AgW8aBQRxsSqyq/SIL+MgvshhoP8K4CrF3EiBv3nT5BPwvgnaOEn6\r
+        zSBsbFNqzRgcrPat/w3PIvOs9aAYZKG3t3flMXEcxyZvYc1kP5mMcSQzaYnEkt+SYvhO/gusfu3mrz6d\r
+        pwAAAABJRU5ErkJggg==\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/AppliStation/PackagesInstallConfirmForm.Designer.cs b/AppliStation/PackagesInstallConfirmForm.Designer.cs
new file mode 100644 (file)
index 0000000..9a7ac7c
--- /dev/null
@@ -0,0 +1,221 @@
+\r
+namespace AppliStation\r
+{\r
+       partial class PackagesInstallConfirmForm\r
+       {\r
+               /// <summary>\r
+               /// Designer variable used to keep track of non-visual components.\r
+               /// </summary>\r
+               private System.ComponentModel.IContainer components = null;\r
+               \r
+               /// <summary>\r
+               /// Disposes resources used by the form.\r
+               /// </summary>\r
+               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+               protected override void Dispose(bool disposing)\r
+               {\r
+                       if (disposing) {\r
+                               if (components != null) {\r
+                                       components.Dispose();\r
+                               }\r
+                       }\r
+                       base.Dispose(disposing);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// This method is required for Windows Forms designer support.\r
+               /// Do not change the method contents inside the source code editor. The Forms designer might\r
+               /// not be able to load this method if it was changed manually.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       this.components = new System.ComponentModel.Container();\r
+                       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackagesInstallConfirmForm));\r
+                       this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.btnPanel = new System.Windows.Forms.FlowLayoutPanel();\r
+                       this.runasCheckBox = new System.Windows.Forms.CheckBox();\r
+                       this.okButton = new System.Windows.Forms.Button();\r
+                       this.cancelButton = new System.Windows.Forms.Button();\r
+                       this.label = new System.Windows.Forms.Label();\r
+                       this.packageListView = new System.Windows.Forms.ListView();\r
+                       this.nameColumnHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.versionColumnHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.currentVersionColumnHeader = new System.Windows.Forms.ColumnHeader();\r
+                       this.packageListViewContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+                       this.selectAllPackagesStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.unselectAllPackagesStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+                       this.tableLayoutPanel1.SuspendLayout();\r
+                       this.btnPanel.SuspendLayout();\r
+                       this.packageListViewContextMenuStrip.SuspendLayout();\r
+                       this.SuspendLayout();\r
+                       // \r
+                       // tableLayoutPanel1\r
+                       // \r
+                       this.tableLayoutPanel1.ColumnCount = 1;\r
+                       this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());\r
+                       this.tableLayoutPanel1.Controls.Add(this.btnPanel, 0, 2);\r
+                       this.tableLayoutPanel1.Controls.Add(this.label, 0, 0);\r
+                       this.tableLayoutPanel1.Controls.Add(this.packageListView, 0, 1);\r
+                       this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);\r
+                       this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
+                       this.tableLayoutPanel1.RowCount = 3;\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+                       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel1.Size = new System.Drawing.Size(392, 266);\r
+                       this.tableLayoutPanel1.TabIndex = 0;\r
+                       // \r
+                       // btnPanel\r
+                       // \r
+                       this.btnPanel.AutoSize = true;\r
+                       this.btnPanel.Controls.Add(this.runasCheckBox);\r
+                       this.btnPanel.Controls.Add(this.okButton);\r
+                       this.btnPanel.Controls.Add(this.cancelButton);\r
+                       this.btnPanel.Dock = System.Windows.Forms.DockStyle.Right;\r
+                       this.btnPanel.Location = new System.Drawing.Point(84, 234);\r
+                       this.btnPanel.Name = "btnPanel";\r
+                       this.btnPanel.Size = new System.Drawing.Size(305, 29);\r
+                       this.btnPanel.TabIndex = 0;\r
+                       // \r
+                       // runasCheckBox\r
+                       // \r
+                       this.runasCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\r
+                       this.runasCheckBox.AutoSize = true;\r
+                       this.runasCheckBox.Checked = true;\r
+                       this.runasCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;\r
+                       this.runasCheckBox.Location = new System.Drawing.Point(3, 6);\r
+                       this.runasCheckBox.Name = "runasCheckBox";\r
+                       this.runasCheckBox.Size = new System.Drawing.Size(126, 16);\r
+                       this.runasCheckBox.TabIndex = 2;\r
+                       this.runasCheckBox.Text = "管理者として実行(&A)";\r
+                       this.runasCheckBox.UseVisualStyleBackColor = true;\r
+                       this.runasCheckBox.CheckedChanged += new System.EventHandler(this.RunasCheckBoxCheckedChanged);\r
+                       // \r
+                       // okButton\r
+                       // \r
+                       this.okButton.AutoSize = true;\r
+                       this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;\r
+                       this.okButton.Image = ((System.Drawing.Image)(resources.GetObject("okButton.Image")));\r
+                       this.okButton.Location = new System.Drawing.Point(135, 3);\r
+                       this.okButton.Name = "okButton";\r
+                       this.okButton.Size = new System.Drawing.Size(86, 23);\r
+                       this.okButton.TabIndex = 0;\r
+                       this.okButton.Text = "インストール";\r
+                       this.okButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
+                       // \r
+                       // cancelButton\r
+                       // \r
+                       this.cancelButton.AutoSize = true;\r
+                       this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+                       this.cancelButton.Location = new System.Drawing.Point(227, 3);\r
+                       this.cancelButton.Name = "cancelButton";\r
+                       this.cancelButton.Size = new System.Drawing.Size(75, 23);\r
+                       this.cancelButton.TabIndex = 1;\r
+                       this.cancelButton.Text = "キャンセル";\r
+                       // \r
+                       // label\r
+                       // \r
+                       this.label.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.label.Location = new System.Drawing.Point(10, 10);\r
+                       this.label.Margin = new System.Windows.Forms.Padding(10);\r
+                       this.label.Name = "label";\r
+                       this.label.Size = new System.Drawing.Size(372, 30);\r
+                       this.label.TabIndex = 1;\r
+                       this.label.Text = "以下のソフトをインストールしようとしています。インストールするソフトをチェックしてください";\r
+                       // \r
+                       // packageListView\r
+                       // \r
+                       this.packageListView.CheckBoxes = true;\r
+                       this.packageListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
+                                                                       this.nameColumnHeader,\r
+                                                                       this.versionColumnHeader,\r
+                                                                       this.currentVersionColumnHeader});\r
+                       this.packageListView.ContextMenuStrip = this.packageListViewContextMenuStrip;\r
+                       this.packageListView.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.packageListView.GridLines = true;\r
+                       this.packageListView.Location = new System.Drawing.Point(5, 53);\r
+                       this.packageListView.Margin = new System.Windows.Forms.Padding(5, 3, 5, 5);\r
+                       this.packageListView.Name = "packageListView";\r
+                       this.packageListView.ShowItemToolTips = true;\r
+                       this.packageListView.Size = new System.Drawing.Size(382, 173);\r
+                       this.packageListView.TabIndex = 2;\r
+                       this.packageListView.UseCompatibleStateImageBehavior = false;\r
+                       this.packageListView.View = System.Windows.Forms.View.Details;\r
+                       this.packageListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.PackageListViewItemChecked);\r
+                       this.packageListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.PackageListViewColumnClick);\r
+                       // \r
+                       // nameColumnHeader\r
+                       // \r
+                       this.nameColumnHeader.Text = "名前";\r
+                       this.nameColumnHeader.Width = 146;\r
+                       // \r
+                       // versionColumnHeader\r
+                       // \r
+                       this.versionColumnHeader.Text = "バージョン";\r
+                       this.versionColumnHeader.Width = 82;\r
+                       // \r
+                       // currentVersionColumnHeader\r
+                       // \r
+                       this.currentVersionColumnHeader.Text = "現バージョン";\r
+                       this.currentVersionColumnHeader.Width = 89;\r
+                       // \r
+                       // packageListViewContextMenuStrip\r
+                       // \r
+                       this.packageListViewContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+                                                                       this.selectAllPackagesStripMenuItem,\r
+                                                                       this.unselectAllPackagesStripMenuItem});\r
+                       this.packageListViewContextMenuStrip.Name = "packageListViewContextMenuStrip";\r
+                       this.packageListViewContextMenuStrip.Size = new System.Drawing.Size(175, 48);\r
+                       this.packageListViewContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.PackageListViewContextMenuStripOpening);\r
+                       // \r
+                       // selectAllPackagesStripMenuItem\r
+                       // \r
+                       this.selectAllPackagesStripMenuItem.Name = "selectAllPackagesStripMenuItem";\r
+                       this.selectAllPackagesStripMenuItem.Size = new System.Drawing.Size(174, 22);\r
+                       this.selectAllPackagesStripMenuItem.Text = "全て選択(&A)";\r
+                       this.selectAllPackagesStripMenuItem.Click += new System.EventHandler(this.SelectAllPackagesStripMenuItemClick);\r
+                       // \r
+                       // unselectAllPackagesStripMenuItem\r
+                       // \r
+                       this.unselectAllPackagesStripMenuItem.Name = "unselectAllPackagesStripMenuItem";\r
+                       this.unselectAllPackagesStripMenuItem.Size = new System.Drawing.Size(174, 22);\r
+                       this.unselectAllPackagesStripMenuItem.Text = "全ての選択を解除(&U)";\r
+                       this.unselectAllPackagesStripMenuItem.Click += new System.EventHandler(this.UnselectAllPackagesStripMenuItemClick);\r
+                       // \r
+                       // PackagesInstallConfirmForm\r
+                       // \r
+                       this.AcceptButton = this.okButton;\r
+                       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
+                       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+                       this.CancelButton = this.cancelButton;\r
+                       this.ClientSize = new System.Drawing.Size(392, 266);\r
+                       this.Controls.Add(this.tableLayoutPanel1);\r
+                       this.MaximizeBox = false;\r
+                       this.Name = "PackagesInstallConfirmForm";\r
+                       this.ShowIcon = false;\r
+                       this.ShowInTaskbar = false;\r
+                       this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
+                       this.Text = "ソフトのインストール";\r
+                       this.tableLayoutPanel1.ResumeLayout(false);\r
+                       this.tableLayoutPanel1.PerformLayout();\r
+                       this.btnPanel.ResumeLayout(false);\r
+                       this.btnPanel.PerformLayout();\r
+                       this.packageListViewContextMenuStrip.ResumeLayout(false);\r
+                       this.ResumeLayout(false);\r
+               }\r
+               private System.Windows.Forms.ToolStripMenuItem unselectAllPackagesStripMenuItem;\r
+               private System.Windows.Forms.ToolStripMenuItem selectAllPackagesStripMenuItem;\r
+               private System.Windows.Forms.ContextMenuStrip packageListViewContextMenuStrip;\r
+               private System.Windows.Forms.CheckBox runasCheckBox;\r
+               private System.Windows.Forms.ColumnHeader currentVersionColumnHeader;\r
+               private System.Windows.Forms.ColumnHeader versionColumnHeader;\r
+               private System.Windows.Forms.ColumnHeader nameColumnHeader;\r
+               private System.Windows.Forms.ListView packageListView;\r
+               private System.Windows.Forms.Label label;\r
+               private System.Windows.Forms.Button cancelButton;\r
+               private System.Windows.Forms.Button okButton;\r
+               private System.Windows.Forms.FlowLayoutPanel btnPanel;\r
+               private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;\r
+       }\r
+}\r
diff --git a/AppliStation/PackagesInstallConfirmForm.cs b/AppliStation/PackagesInstallConfirmForm.cs
new file mode 100644 (file)
index 0000000..351089c
--- /dev/null
@@ -0,0 +1,212 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using NaGet.Packages;\r
+\r
+namespace AppliStation\r
+{\r
+       /// <summary>\r
+       /// Description of PackagesInstallConfirmForm.\r
+       /// </summary>\r
+       public partial class PackagesInstallConfirmForm : Form\r
+       {\r
+               private Package[] packages;\r
+               \r
+               private PackageListsManager pkgListMan;\r
+               \r
+               /// <summary>\r
+               /// \83p\83b\83P\81[\83W\82Ì\8fW\8d\87\r
+               /// </summary>\r
+               public Package[] Packages {\r
+                       get { return packages; }\r
+                       set {\r
+                               packages = value;\r
+                               \r
+                               updatePackagesListView();\r
+                       }\r
+               }\r
+               \r
+               public PackageListsManager PkgListsManager {\r
+                       get { return pkgListMan; }\r
+                       set {\r
+                               pkgListMan = value;\r
+                               \r
+                               updatePackagesListView();\r
+                       }\r
+               }\r
+               \r
+               public PackagesInstallConfirmForm()\r
+               {\r
+                       //\r
+                       // The InitializeComponent() call is required for Windows Forms designer support.\r
+                       //\r
+                       InitializeComponent();\r
+                       \r
+                       // \8aÇ\97\9d\8eÒ\8c \8cÀ\82Å\93®\82¢\82Ä\82¢\82é\82È\82ç\82Îrunas\82ª\95K\97v\82É\82Í\82È\82ç\82È\82¢\82Ì\82Å\95\\8e¦\82µ\82È\82¢\r
+                       if (NaGet.Utils.IsAdministrators()) {\r
+                               runasCheckBox.Checked = false;\r
+                               runasCheckBox.Visible = false;\r
+                       }\r
+               }\r
+               \r
+               private void updatePackagesListView()\r
+               {\r
+                       packageListView.Items.Clear();\r
+                       \r
+                       if (packages != null && packages.Length > 0) {\r
+                               foreach (Package pkg in packages) {\r
+                                       Package curPkg = null;\r
+                                       if (pkgListMan != null) {       \r
+                                               curPkg = pkgListMan.InstalledPkgList.GetPackageForName(pkg.Name);\r
+                                               if (curPkg == null) curPkg = pkgListMan.SystemInstalledPkgList.GetPackageForName(pkg.Name);\r
+                                       }\r
+                                       string curVersion = (curPkg == null)? "-" : curPkg.Version;\r
+                                       \r
+                                       ListViewItem item = new ListViewItem(new string[]{pkg.Name, pkg.Version, curVersion});\r
+                                       item.Tag = pkg;\r
+                                       item.ToolTipText = pkg.Summary;\r
+                                       item.Checked = true;\r
+                                       \r
+                                       packageListView.Items.Add(item);\r
+                               }\r
+                       }\r
+                       \r
+                       PackageListViewItemChecked(packageListView, null);\r
+                       packageListView.Refresh();\r
+               }\r
+               \r
+               void PackageListViewItemChecked(object sender, ItemCheckedEventArgs e)\r
+               {\r
+                       System.Windows.Forms.ListView.CheckedListViewItemCollection checkeds = packageListView.CheckedItems;\r
+                       \r
+                       okButton.Enabled = checkeds != null && checkeds.Count > 0;\r
+               }\r
+               \r
+               AppliStation.Util.ListViewItemSortComparer packageListViewSortComparer;\r
+\r
+               void PackageListViewColumnClick(object sender, ColumnClickEventArgs e)\r
+               {\r
+                       SortOrder order = SortOrder.None;\r
+                       \r
+                       if (packageListViewSortComparer == null) {\r
+                               order = SortOrder.Ascending;\r
+                               packageListViewSortComparer = new AppliStation.Util.ListViewItemSortComparer(e.Column, order);\r
+                               packageListView.ListViewItemSorter = packageListViewSortComparer;\r
+                       } else {\r
+                               if (packageListViewSortComparer.Column == e.Column) {\r
+                                       order = (packageListViewSortComparer.Order == SortOrder.Ascending)? SortOrder.Descending : SortOrder.Ascending;\r
+                                       \r
+                                       packageListViewSortComparer.Order = order;\r
+                               } else {\r
+                                       order = packageListViewSortComparer.Order;\r
+                                       packageListViewSortComparer.Column = e.Column;\r
+                               }\r
+                               \r
+                               packageListView.Sort();\r
+                       }\r
+                       AppliStation.Util.NativeMethods.ColumnHeader_SetSortState(packageListView, e.Column, order);\r
+                       \r
+                       // \83\\81[\83g\91Î\8fÛ\97ñ\82Ì\90F\95t\82¯\r
+                       try {\r
+                               // SendMessage(hWnd, LVM_SETSELECTEDCOLUMN, column, NULL);\r
+                               AppliStation.Util.NativeMethods.SendMessage(packageListView.Handle, 0x1000+140, (uint) e.Column, 0);\r
+                       } catch (Exception) {   \r
+                       }\r
+               }\r
+               \r
+                               \r
+               void PackageListViewContextMenuStripOpening(object sender, System.ComponentModel.CancelEventArgs e)\r
+               {\r
+                       System.Windows.Forms.ListView.CheckedIndexCollection coll = packageListView.CheckedIndices;\r
+                       selectAllPackagesStripMenuItem.Enabled = coll.Count < packages.Length;\r
+                       unselectAllPackagesStripMenuItem.Enabled = coll.Count > 0;\r
+               }\r
+                               \r
+               void SelectAllPackagesStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       foreach (ListViewItem item in packageListView.Items) {\r
+                               item.Checked = true;\r
+                       }\r
+                       packageListView.Refresh();\r
+               }\r
+               \r
+               void UnselectAllPackagesStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       foreach (ListViewItem item in packageListView.CheckedItems) {\r
+                               item.Checked = false;\r
+                       }\r
+                       packageListView.Refresh();\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \83C\83\93\83X\83g\81[\83\8b\82·\82é\82æ\82¤\91I\91ð\82³\82ê\82½\83p\83b\83P\81[\83W\82Ì\94z\97ñ\r
+               /// </summary>\r
+               public Package[] CheckedPackages {\r
+                       get {\r
+                               System.Collections.Generic.List<Package> pkgs = new System.Collections.Generic.List<Package>();\r
+                               foreach (ListViewItem item in packageListView.CheckedItems) {\r
+                                       pkgs.Add((Package) item.Tag);\r
+                               }\r
+                               return pkgs.ToArray();\r
+                       }\r
+               }\r
+               \r
+               #region runas\8aÖ\98A\r
+               \r
+               /// <summary>\r
+               /// runas\82Å\8eÀ\8ds\82·\82é\82©\94Û\82©\r
+               /// </summary>\r
+               public bool UseRunas {\r
+                       set {\r
+                               runasCheckBox.Checked = (! NaGet.Utils.IsAdministrators()) && value;\r
+                               \r
+                               updateUseRunas();\r
+                       }\r
+                       get {\r
+                               return runasCheckBox.Checked;\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// \91I\91ð\82³\82ê\82½\83p\83b\83P\81[\83W\82ð\92²\8d¸\82µ\82Ä\81ARunas\82ð\8eg\82¤\82×\82«\82©\82¢\82È\82©\82ð\95Ô\82·\r
+               /// </summary>\r
+               public bool GetShouldUseRunas()\r
+               {\r
+                       if (NaGet.Utils.IsAdministrators()) {\r
+                               // \8aÇ\97\9d\8eÒ\8c \8cÀ\82Å\93®\82¢\82Ä\82¢\82é\8fê\8d\87\82Í\95s\97v\r
+                               return false;   \r
+                       } else if (NaGet.Utils.IsUACEnabled()) {\r
+                               // UAC\82ª\93K\97p\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82Í\95W\8f\80\82Å\82Í\95s\97v\82Æ\82·\82é\r
+                               return false;   \r
+                       }\r
+                       \r
+                       bool useRunas = false;\r
+                       foreach (Package pkg in CheckedPackages) {\r
+                               if (pkg.Type != InstallerType.ARCHIVE) {\r
+                                       useRunas = true;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       return useRunas;\r
+               }\r
+               \r
+               void RunasCheckBoxCheckedChanged(object sender, EventArgs e)\r
+               {\r
+                       updateUseRunas();\r
+               }\r
+               \r
+               private void updateUseRunas()\r
+               {\r
+                       if (UseRunas) {\r
+                               System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackagesInstallConfirmForm));\r
+                               okButton.Image = ((System.Drawing.Bitmap)(resources.GetObject("okButton.Image")));\r
+                       } else {\r
+                               okButton.Image = null;\r
+                       }\r
+               }\r
+               \r
+               #endregion\r
+\r
+\r
+       }\r
+}\r
diff --git a/AppliStation/PackagesInstallConfirmForm.resx b/AppliStation/PackagesInstallConfirmForm.resx
new file mode 100644 (file)
index 0000000..00b8979
--- /dev/null
@@ -0,0 +1,142 @@
+<?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=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
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="okButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAApdJREFUOE+Fk21I\r
+        k1EUx61vgRX0wYqc4mi+JOqoD4WV9oJKpC5fM6m1QKdJEpVCTZFCmpl92FaNEicJlWUffGtEy2eS5sbQ\r
+        9mIlFRWIIk60TZuYpPt37mgy6QEf+MPl3P/53XPPc+66IJ5PqVRGBwcHv/B6vSLaXk/fiMfjSVMoFE4+\r
+        /0qMEqNaWlpadTrdvNFohM1m84mtGxsbPbTXRp7I/yAULFSr1d9UKpXHZDKBafnDEJaeNaPpkQzlHfmw\r
+        WCy+OHnmNRqNneUEnjxhtVq97DT342YsDvRg8XU7FjQ3Uf8wAyVdWSh6KkGe5qivIvKCAO5AwIzdbseP\r
+        qmuYuV2Dn1olZq9XwC3Nw+VbeyF5nozM5v1IvbMb+xRRPggB5lYBWHD0ghyTFcWYKMrBZOIeOAUCyKp3\r
+        IuZBBBJUYRDf2AFh+WZewDSrYKr0NGZl6ZiKDYUrKAi/SKcUEdhyPxzRd0VIaBAhrHIbL2DM4XDgo7QQ\r
+        X9KOwBqyHcMbt+JzaCTOV+3CwdZ4HH8ihkSXgCRlmB8wFniFDqrAmyVrQsGZe8jMrcehjAak5KvRbZDD\r
+        8TURw58OY3goGe9fRsFsNi9TD14FAmoMBsOfpKscQuRGhF7isKGkB5vK3qCvrxxwpwLOE8BoOtAXC71e\r
+        P0OA2hVAXV1djFarHWeNFEk7ESfvRPi5TgiLu2B5R4CpY8B4LjBC16NfSN7vBBCuGigK2FgjcyrbIDrb\r
+        jQhpF4RFepj6CeDMBsYkcA0c8M+AgW8aBQRxsSqyq/SIL+MgvshhoP8K4CrF3EiBv3nT5BPwvgnaOEn6\r
+        zSBsbFNqzRgcrPat/w3PIvOs9aAYZKG3t3flMXEcxyZvYc1kP5mMcSQzaYnEkt+SYvhO/gusfu3mrz6d\r
+        pwAAAABJRU5ErkJggg==\r
+</value>\r
+  </data>\r
+  <metadata name="packageListViewContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+</root>
\ No newline at end of file
diff --git a/AppliStation/Program.cs b/AppliStation/Program.cs
new file mode 100644 (file)
index 0000000..9b16164
--- /dev/null
@@ -0,0 +1,140 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Windows.Forms;\r
+using System.IO;\r
+\r
+namespace AppliStation\r
+{\r
+       class Program\r
+       {\r
+               Form splashScreen;\r
+               \r
+               PackageListViewForm form;\r
+               \r
+               /// <summary>\r
+               /// \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì\83I\83v\83V\83\87\83\93\r
+               /// </summary>\r
+               Dictionary<string, object> appArgs;\r
+               \r
+               string[] restAppArgs;\r
+               \r
+               public Program()\r
+               {\r
+                       appArgs = new Dictionary<string, object>();\r
+                       appArgs["noupdate"] = false;\r
+                       appArgs["cmd"] = string.Empty;\r
+                       appArgs["pkgsref"] = string.Empty;\r
+                       \r
+                       form = new PackageListViewForm();\r
+               }\r
+               \r
+               void RunNormal()\r
+               {\r
+                       form.Load += delegate(object sender, EventArgs e) {\r
+                               hideSplashScreen();\r
+                               form.updateActionInvoke(((bool)appArgs["noupdate"]) != true);\r
+                               \r
+                               form.UpdatePackageList();\r
+                       };\r
+                       Application.Run(form);\r
+               }\r
+               \r
+               void RunInstall()\r
+               {\r
+                       try {\r
+                               NaGet.Packages.Package[] pkgs = NaGet.Utils.GetDeserializedObject<NaGet.Packages.Package[]>((string) appArgs["pkgsref"]);\r
+                               \r
+                               hideSplashScreen();\r
+                               form.installActionInvoke(pkgs);\r
+                       } catch (UnauthorizedAccessException e) {\r
+                               MessageBox.Show(string.Format("\8aÇ\97\9d\8eÒ\8c \8cÀ\82É\8f¸\8ai\82µ\82Ä\82¢\82È\82¢\82©\81A\8eÀ\8ds\8c \8cÀ\82É\96â\91è\82ª\82 \82è\82Ü\82·\81B\n(\8fÚ\8d×:{0})", e.Message),\r
+                                               Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       } catch (FileNotFoundException e) {\r
+                               MessageBox.Show(string.Format("\83\\83t\83g\8ew\92è\83t\83@\83C\83\8b{0}\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ", e.FileName),\r
+                                               Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       }\r
+               }\r
+               \r
+               void RunUninstall()\r
+               {\r
+                       try {\r
+                               NaGet.Packages.Install.InstalledPackage[] pkgs = NaGet.Utils.GetDeserializedObject<NaGet.Packages.Install.InstalledPackage[]>((string) appArgs["pkgsref"]);\r
+                               \r
+                               hideSplashScreen();\r
+                               form.uninstallActionInvoke(pkgs);\r
+                       } catch (UnauthorizedAccessException e) {\r
+                               MessageBox.Show(string.Format("\8aÇ\97\9d\8eÒ\8c \8cÀ\82É\8f¸\8ai\82µ\82Ä\82¢\82È\82¢\82©\81A\8eÀ\8ds\8c \8cÀ\82É\96â\91è\82ª\82 \82è\82Ü\82·\81B\n(\8fÚ\8d×:{0})", e.Message),\r
+                                               Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       } catch (FileNotFoundException e) {\r
+                               MessageBox.Show(string.Format("\83\\83t\83g\8ew\92è\83t\83@\83C\83\8b{0}\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ", e.FileName),\r
+                                               Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       }\r
+               }\r
+               \r
+               private void hideSplashScreen()\r
+               {\r
+                       if (splashScreen != null && splashScreen.Visible) {\r
+                               splashScreen.Hide();\r
+                               splashScreen.Dispose();\r
+                       }\r
+               }\r
+               \r
+               public void Run(string[] args)\r
+               {\r
+                       parseArgs(args);\r
+                       \r
+                       switch ((string) appArgs["cmd"]) {\r
+                               case "install":\r
+                                       RunInstall();\r
+                                       break;\r
+                               case "uninstall":\r
+                                       RunUninstall();\r
+                                       break;\r
+                               default:\r
+                                       RunNormal();\r
+                                       break;\r
+                       }\r
+               }\r
+               \r
+               private void parseArgs(string[] args)\r
+               {\r
+                       ArgParse parser = new ArgParse(appArgs);\r
+                       restAppArgs = parser.Parse(args);\r
+               }\r
+               \r
+               [STAThread]\r
+               public static void Main(string[] args)\r
+               {\r
+                       Form splashScreen = null;\r
+                       \r
+                       try {\r
+                               if (args.Length <= 0) { // HACK \88ø\90\94\83p\81[\83X\82Ì\8e\9e\8aÔ\82³\82¦\91Ò\82Ä\82È\82¢\82Ì\82Å\88ø\90\94\82Ì\97L\96³\82Å\95\\8e¦\82ð\94»\92f\r
+                                       splashScreen = new Form();\r
+                                       splashScreen.FormBorderStyle = FormBorderStyle.None;\r
+                                       splashScreen.BackgroundImage = System.Drawing.Bitmap.FromFile(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "SplashScreen.png"));\r
+                                       splashScreen.Size = splashScreen.BackgroundImage.Size;\r
+                                       splashScreen.ShowIcon = false;\r
+                                       splashScreen.ShowInTaskbar = false;\r
+                                       splashScreen.StartPosition = FormStartPosition.CenterScreen;\r
+                                       splashScreen.Show();\r
+                               }\r
+                               \r
+                               ToolStripManager.VisualStylesEnabled = false; // ToolStrip\82ªLuna\82Å\90Â\82­\82È\82ç\82È\82¢\82æ\82¤\82É\r
+                               Application.EnableVisualStyles(); // Luna\82âVista\82Ì\83f\83U\83C\83\93\82ð\97L\8cø\82É\r
+                               \r
+                               Application.ThreadException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
+                               System.Threading.Thread.GetDomain().UnhandledException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
+                               \r
+                               Program prog = new Program();\r
+                               prog.splashScreen = splashScreen;\r
+                               prog.Run(args);\r
+                       } catch (Exception e) {\r
+                               AppliStation.Util.ExceptionDialogForm.Application_ThrowException(null, new System.Threading.ThreadExceptionEventArgs(e));\r
+                       } finally {\r
+                               if (splashScreen != null) {\r
+                                       splashScreen.Dispose();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/AppliStation/SplashScreen.png b/AppliStation/SplashScreen.png
new file mode 100644 (file)
index 0000000..95283d7
Binary files /dev/null and b/AppliStation/SplashScreen.png differ
diff --git a/all-get/AssemblyInfo.cs b/all-get/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..25fad42
--- /dev/null
@@ -0,0 +1,31 @@
+#region Using directives\r
+\r
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+#endregion\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("all-get")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("all-get")]\r
+[assembly: AssemblyCopyright("")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// This sets the default COM visibility of types in the assembly to invisible.\r
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The assembly version has following format :\r
+//\r
+// Major.Minor.Build.Revision\r
+//\r
+// You can specify all the values or you can use the default the Revision and \r
+// Build Numbers by using the '*' as shown below:\r
+[assembly: AssemblyVersion("0.9.*")]\r
diff --git a/all-get/Main.cs b/all-get/Main.cs
new file mode 100644 (file)
index 0000000..6afb569
--- /dev/null
@@ -0,0 +1,527 @@
+// project created on 2007/09/08 at 20:20\r
+using System;\r
+using System.IO;\r
+using System.Collections.Generic;\r
+using NaGet.Net;\r
+using NaGet.Packages;\r
+using NaGet.Packages.Install;\r
+using NaGet.SubCommands;\r
+\r
+namespace AllGet\r
+{\r
+\r
+       class DownloadListener\r
+       {\r
+               private string line = null;\r
+               \r
+               /// <summary>\r
+               /// lineのコンソール上における長さ\r
+               /// </summary>\r
+               private int lineWidth = 0;\r
+       \r
+               public void OnDownload(object sender, DownloadEventArgs a) {\r
+                       if (line != null) {\r
+                               lock (line) {\r
+                                       int newpos = (lineWidth <= 0)? 0 : Console.CursorLeft - lineWidth;\r
+                                       if (newpos < 0) newpos = 0;\r
+                                       \r
+                                       // 空白で埋める\r
+                                       Console.CursorLeft = newpos;\r
+                                       for (int i = 0; i < lineWidth && Console.CursorLeft < Console.BufferWidth; i++) {\r
+                                               Console.Write(' ');\r
+                                       }\r
+                                       Console.CursorLeft = newpos;\r
+                                       \r
+                                       line = null; lineWidth = 0;\r
+                               }\r
+                       }\r
+                       \r
+                       switch (a.Type) {\r
+                       case DownloadEventType.INITED:\r
+                               line = "starting...";\r
+                               break;\r
+                       case DownloadEventType.CONNECTED:\r
+                       case DownloadEventType.DOWNLOADING:\r
+                               line = a.TaskMessage;\r
+                               break;\r
+                       case DownloadEventType.COMPLETED:\r
+                               //\r
+                               line = null;\r
+                               break;\r
+                       case DownloadEventType.ERROR:\r
+                               Console.Write("interrupted! ERROR!");\r
+                               line = null;\r
+                               break;\r
+                       }\r
+                       \r
+                       if (line != null) {\r
+                               int posOld = Console.CursorLeft;\r
+                               Console.Write(line);\r
+                               lineWidth = Console.CursorLeft - posOld;\r
+                       }\r
+               }\r
+       }\r
+\r
+       class MainClass\r
+       {\r
+               private Downloader downloader;\r
+               \r
+               private PackageListsManager pkgListMan;\r
+               \r
+               public MainClass()\r
+               {\r
+                       downloader = new Downloader();\r
+                       DownloadListener dl = new DownloadListener();\r
+                       downloader.DownloadEventRaised += new EventHandler<DownloadEventArgs>(dl.OnDownload);\r
+                       \r
+                       pkgListMan = new PackageListsManager();\r
+               }\r
+               \r
+               public void Update()\r
+               {\r
+                       update(true);\r
+               }\r
+               \r
+               public void LocalUpdate()\r
+               {\r
+                       update(false);\r
+               }\r
+               \r
+               public void update(bool downloadPackageListFlag)\r
+               {\r
+                       NaGet.SubCommands.NaGetUpdate tasks = new NaGet.SubCommands.NaGetUpdate(pkgListMan, downloadPackageListFlag);\r
+                       tasks.Downloader = this.downloader;\r
+                       tasks.TaskSetRaised += delegate(object sender, NaGetTaskSetEventArgs e) { \r
+                               switch (e.Type) {\r
+//                                     case NaGetTaskSetEventType.COMPLETED_TASKSET\r
+//                                             break;\r
+                                       case NaGetTaskSetEventType.COMPLETED:\r
+                                               Console.WriteLine("Done.");\r
+                                               break;\r
+                                       case NaGetTaskSetEventType.STARTED_TASKSET:\r
+                                               Console.Write("  " + e.TaskMessage);\r
+                                               break;\r
+                                       case NaGetTaskSetEventType.COMPLETED_TASKSET:\r
+                                               Console.WriteLine(" ... Done. [{0}%]", (int) e.TaskProgressPercent);\r
+                                               break;\r
+                                       case NaGetTaskSetEventType.INFO:\r
+                                               Console.WriteLine("  " + e.TaskMessage);\r
+                                               break;\r
+                                       case NaGetTaskSetEventType.ERROR:\r
+                                       case NaGetTaskSetEventType.WARNING:\r
+                                               Console.WriteLine("  [Error]" + e.TaskMessage);\r
+                                               break;\r
+                               }\r
+                       };\r
+                       \r
+                       tasks.Run();\r
+               }\r
+               \r
+               public void Upgrade()\r
+               {\r
+                       PackageList<Package> packageList = pkgListMan.AvailablePkgList;\r
+                       \r
+                       VersionComparetor verComp = new VersionComparetor();\r
+                       \r
+                       foreach (InstalledPackage pkg in pkgListMan.InstalledPkgList.Packages) {\r
+                               Package avaiablePkg = packageList.GetPackageForName(pkg.Name);\r
+                               \r
+                               if (avaiablePkg != null) {\r
+                                       if (verComp.Compare(pkg.Version, avaiablePkg.Version) < 0 &&\r
+                                           pkgListMan.InstalledPkgList.GetPackageForPackage(pkg.Name, avaiablePkg.Version) == null) {\r
+                                               Console.ForegroundColor = ConsoleColor.Green;\r
+                                       }\r
+                                       \r
+                                       Console.WriteLine("{0} ({1}) => ({2})", pkg.Name, pkg.Version, avaiablePkg.Version);\r
+                                       Console.ResetColor();\r
+                               }\r
+                       }\r
+                       foreach (InstalledPackage pkg in pkgListMan.SystemInstalledPkgList.Packages) {\r
+                               Package avaiablePkg = packageList.GetPackageForName(pkg.Name);\r
+                               \r
+                               if (avaiablePkg != null) {\r
+                                       if (verComp.Compare(pkg.Version, avaiablePkg.Version) < 0 &&\r
+                                           pkgListMan.SystemInstalledPkgList.GetPackageForPackage(pkg.Name, avaiablePkg.Version) == null) {\r
+                                               Console.ForegroundColor = ConsoleColor.Green;\r
+                                       }\r
+                                       \r
+                                       Console.WriteLine("{0} ({1})@sys => ({2})", pkg.Name, pkg.Version, avaiablePkg.Version);\r
+                                       Console.ResetColor();\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public void Search(string keys)\r
+               {\r
+                       foreach(Package package in pkgListMan.AvailablePkgList.Search(keys)) {\r
+                               Console.WriteLine("{0} ({1}) - {2}", package.Name, package.Version, package.Summary);\r
+                       }\r
+                       \r
+                       foreach(InstalledPackage package in pkgListMan.InstalledPkgList.Search(keys)) {\r
+                               Console.WriteLine("{0} ({1})[@install] - {2}", package.Name, package.Version, package.Summary);\r
+                       }\r
+                       \r
+                       foreach(InstalledPackage package in pkgListMan.SystemInstalledPkgList.Search(keys)) {\r
+                               Console.WriteLine("{0} ({1})[@sys] - {2}", package.Name, package.Version, package.Summary);\r
+                       }\r
+               }\r
+               \r
+               public void Show(string packagename)\r
+               {\r
+                       PackageList<Package> allPkgs = new PackageList<Package>();\r
+                       allPkgs.AddPackages(pkgListMan.GetAllPackages());\r
+                       \r
+                       foreach (Package pkg in allPkgs.GetPackagesForName(packagename)) {\r
+                               Console.WriteLine("Package: {0}", pkg.Name);\r
+                               Console.WriteLine("Version: {0}", pkg.Version);\r
+                               if (pkg.Url != null) Console.WriteLine("Website: {0}", pkg.Url.Href);\r
+                               if (pkg.Tags != null) Console.WriteLine("Tag: {0}", pkg.Tags.ToLower());\r
+                               Console.WriteLine("Type: {0}", pkg.Type);\r
+                               if (pkg.License != null) Console.WriteLine("License: {0}", pkg.License);\r
+                               if (pkg is InstalledPackage) Console.WriteLine("State: Installed");\r
+                               \r
+                               if (pkg.Description != null) {\r
+                                       Console.WriteLine("Description:");\r
+                                       Console.WriteLine(pkg.Description);\r
+                               }\r
+                               Console.WriteLine();\r
+                       }\r
+               }\r
+               \r
+               public void Download(string[] packagenames)\r
+               {\r
+                       Installation[] installations = null;\r
+                       {\r
+                               List<Package> downloadList = new List<Package>();\r
+                       \r
+                               foreach(string packagename in packagenames) {\r
+                                       Package foundPackage = pkgListMan.AvailablePkgList.GetPackageForName(packagename);\r
+                                       if (foundPackage == null) {\r
+                                               Console.WriteLine("E: Couldn't find package "+packagename);\r
+                                               Environment.Exit(1);\r
+                                       }\r
+                                       if (! downloadList.Contains(foundPackage)) {\r
+                                               downloadList.Add(foundPackage);\r
+                                       }\r
+                               }\r
+                               \r
+                               installations = new Installation[downloadList.Count];\r
+                               for (int i = 0; i < installations.Length; i++) {\r
+                                       installations[i] = new Installation((Package) downloadList[i]);\r
+                               }\r
+                       }\r
+                       \r
+                       Console.WriteLine("The following packages will be downloaded:");\r
+                       Console.WriteLine("  {0}", Installation.ToString(installations));\r
+                       if (AllGet.Util.Confirm("Do you want to continue [Y/n]?", true) == false) {\r
+                               Console.WriteLine("Abort.");\r
+                               Environment.Exit(0);\r
+                       }\r
+                       \r
+                       {\r
+                               int i = 0;\r
+                               foreach (Installation inst in installations) {\r
+                                       i++;\r
+                                       \r
+                                       if (! inst.IsInstallablePackage()) {\r
+                                               Console.WriteLine("E:{0} {1} can not be installed.", i, inst.ToString());\r
+                                               continue;\r
+                                       }\r
+                                       \r
+                                       try {\r
+                                               Console.Write("Get:{0} {1}", i, inst.ToString());\r
+                                               inst.Download(downloader);\r
+                                               Console.WriteLine(" ...Done");\r
+                                       } catch (Exception e) {\r
+                                               Console.WriteLine("E: "+e.Message);\r
+                                               throw new ApplicationException(string.Format("Failed to download {0}", inst.ToString()), e);\r
+                                       }\r
+                               }\r
+                               \r
+                               i = 0;\r
+                               foreach (Installation inst in installations) {\r
+                                       i++;\r
+                                       \r
+                                       if (inst.IsInstallablePackage() && inst.VerifyHashValues() == false) {\r
+                                               Console.WriteLine("Verify:{0} {1} does not match hash value!", i, inst.ToString());\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               public void Install(string[] packagenames)\r
+               {\r
+                       if (! NaGet.Utils.IsAdministrators()) {\r
+                               Console.WriteLine("W: you are not administrators!");\r
+                       }\r
+                       \r
+