Ejemplo n.º 1
0
 private void ClickAddMemory(object sender, RoutedEventArgs e)
 {
     Models.Application app     = AppList.SelectedItem as Models.Application;
     Models.AppVersion  version = (sender as Button).DataContext as Models.AppVersion;
     version.Memories.Add(new Models.Memory()
     {
         Type = app.Mask.Memory
     });
 }
Ejemplo n.º 2
0
        private void ClickRemoveApp(object sender, RoutedEventArgs e)
        {
            if (AppList.SelectedItem == null)
            {
                return;
            }

            Models.Application app = AppList.SelectedItem as Models.Application;
            General.Applications.Remove(app);
        }
Ejemplo n.º 3
0
        private void ClickRemoveVersion(object sender, RoutedEventArgs e)
        {
            if (AppList.SelectedItem == null || VersionList.SelectedItem == null)
            {
                return;
            }

            Models.Application app = AppList.SelectedItem as Models.Application;
            Models.AppVersion  ver = VersionList.SelectedItem as Models.AppVersion;

            app.Versions.Remove(ver);
        }
Ejemplo n.º 4
0
        private void ClickCopyVersion(object sender, RoutedEventArgs e)
        {
            if (AppList.SelectedItem == null || VersionList.SelectedItem == null)
            {
                return;
            }

            Models.Application app = AppList.SelectedItem as Models.Application;
            Models.AppVersion  ver = VersionList.SelectedItem as Models.AppVersion;

            Models.AppVersion copy = new Models.AppVersion(ver);
            app.Versions.Add(copy);
        }
Ejemplo n.º 5
0
        private void ClickAddVersion(object sender, RoutedEventArgs e)
        {
            Models.Application app    = AppList.SelectedItem as Models.Application;
            Models.AppVersion  newVer = new Models.AppVersion()
            {
                Name = app.Name
            };

            if (app.Versions.Count > 0)
            {
                Models.AppVersion ver = app.Versions.OrderByDescending(v => v.Number).ElementAt(0);
                newVer.Number = ver.Number + 1;
            }

            newVer.Dynamics.Add(new Models.Dynamic.DynamicMain());
            app.Versions.Add(newVer);
        }