Ejemplo n.º 1
0
        private void MachineProfiles_ProfileRemoved(object sender, MachineProfiles.IProfile profile)
        {
            MachineProfileViewModel vm = profileToViewModels[profile];

            profileViewModels.Remove(vm);
            profileToViewModels.Remove(profile);
        }
Ejemplo n.º 2
0
        private void addProfile(MachineProfiles.IProfile profile)
        {
            MachineProfileViewModel vm = new MachineProfileViewModel(profile);

            profileViewModels.Add(vm);
            profileToViewModels.Add(profile, vm);
        }
Ejemplo n.º 3
0
        private void _activateCommand_Execute(object parameter)
        {
            MachineProfileViewModel vm = parameter as MachineProfileViewModel;

            if (vm == null)
            {
                return;
            }
            Active = vm;
        }
Ejemplo n.º 4
0
        private void _deleteCommand_Execute(object parameter)
        {
            MachineProfileViewModel vm = parameter as MachineProfileViewModel;

            if (vm == null || vm.Model == AppCore.MachineProfiles.Active)
            {
                return;
            }
            AppCore.MachineProfiles.RemoveProfile(vm.Model);
        }
Ejemplo n.º 5
0
        private void _duplicateCommand_Execute(object parameter)
        {
            MachineProfileViewModel vm = parameter as MachineProfileViewModel;

            if (vm == null)
            {
                return;
            }
            AppCore.MachineProfiles.CreateProfile(
                vm.Model.FriendlyName + " (Duplicate)",
                vm.Model.TableSize,
                vm.Model.Origin,
                vm.Model.MaxFeedRate);
        }