コード例 #1
0
        private void SelectPhotoshopFolderButton_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Forms.FolderBrowserDialog dlg = new System.Windows.Forms.FolderBrowserDialog();
            if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            if (CheckIfIncluded(dlg.SelectedPath))
            {
                MessageBox.Show("Selected folder already inlcuded!");
                return;
            }
            PhotoshopInstallationInstance p = MainRoutines.IsPhotoshopFolder(dlg.SelectedPath);

            if (p == null)
            {
                MessageBox.Show("Not correct Photoshop folder!");
                return;
            }
            if (noInstanceFlag)
            {
                InstanceList.Children.Clear();
                noInstanceFlag = false;
            }
            _PhotoshopInstanceList.Add(p);
            AddInstalationInstance(p);
        }
 public InstanceControl(PhotoshopInstallationInstance p)
 {
     InitializeComponent();
     InstanceVersion         = p.GetFullName();
     InstancePath            = p.Path;
     VersionChckBx.IsChecked = p.IncludeInInstall;
     Instance = p;
 }
コード例 #3
0
        private void AddInstalationInstance(PhotoshopInstallationInstance p)
        {
            InstanceControl ic = new InstanceControl(p);

            ic.Width  = 400;
            ic.Height = 55;
            ic.HorizontalAlignment = HorizontalAlignment.Left;
            InstanceList.Children.Add(ic);
        }