2 using System.ComponentModel;
\r
3 using System.Drawing;
\r
4 using System.Windows.Forms;
\r
6 using NaGet.Packages;
\r
7 using NaGet.Packages.Install;
\r
8 using System.Reflection;
\r
10 namespace AppliStation
\r
13 /// Description of InstallerInfoForm.
\r
15 public partial class InstallerInfoForm : UserControl
\r
17 private Installer inst;
\r
19 public InstallerInfoForm()
\r
22 // The InitializeComponent() call is required for Windows Forms designer support.
\r
24 InitializeComponent();
\r
27 public Installer SelectedObject {
\r
28 get { return inst; }
\r
35 private void updateInst()
\r
37 installerUrlTextBox.Text = (inst == null || inst.Url == null)?
\r
38 string.Empty : inst.Url.Href;
\r
40 if (inst.Platform == null || string.IsNullOrEmpty(inst.Platform.Os)) {
\r
41 osValueLabel.Text = "
\94C
\88Ó
\82ÌWindows";
\r
43 osValueLabel.Text = inst.Platform.Os.Replace("WIN", string.Empty);
\r
46 switch ((inst.Platform != null)? inst.Platform.Arch : System.Reflection.ProcessorArchitecture.X86) {
\r
47 case System.Reflection.ProcessorArchitecture.Amd64:
\r
48 archValueLabel.Text = "x64 (64
\83r
\83b
\83g
\8aÂ
\8b«)";
\r
50 case System.Reflection.ProcessorArchitecture.IA64:
\r
51 archValueLabel.Text = "Itanium";
\r
53 case System.Reflection.ProcessorArchitecture.None:
\r
54 case System.Reflection.ProcessorArchitecture.MSIL:
\r
55 archValueLabel.Text = "
\83A
\81[
\83L
\83e
\83N
\83`
\83\83\88Ë
\91¶
\82È
\82µ";
\r
57 case System.Reflection.ProcessorArchitecture.X86:
\r
58 archValueLabel.Text = "x86 (32
\83r
\83b
\83g
\8aÂ
\8b«)";
\r
62 cannotRunLabel.Visible = ! ((inst.Platform == null) || inst.Platform.IsRunnable());
\r