public DialogDetails(SoftInfo softInfo)
        {
            InitializeComponent();

            _softInfo = softInfo;
            Title = softInfo.Name;
        }
 private void ButtonDone_Click(object sender, RoutedEventArgs e)
 {
     SoftInfo = new SoftInfo
     {
         Name = TextBoxName.Text,
         Path = TextBoxPath.Text,
         LastUpdateDate = DateTime.Now
     };
     Close();
 }
Пример #3
0
        private void ViewSoftInfo(SoftInfo softInfo)
        {
            var itemDetails = new MenuItem
            {
                Header = "Details"
            };
            itemDetails.Click += (sender, args) =>
            {
                new DialogDetails(softInfo).ShowDialog();
            };

            ListBoxSoft.Items.Add(new CheckBox
            {
                Content = softInfo,
                ContextMenu = new ContextMenu
                {
                    ItemsSource = new[] { itemDetails}
                },
                Width = ListBoxSoft.Width
            });
        }
 public Process StartInstallation(SoftInfo softInfo)
 {
     return(Process.Start(softInfo.Path));
 }
Пример #5
0
 private void AddSoftInfo(SoftInfo softInfo)
 {
     _storage.Add(softInfo);
     ViewSoftInfo(softInfo);
 }
 public Process StartInstallation(SoftInfo softInfo)
 {
     return Process.Start(softInfo.Path);
 }