Exemplo n.º 1
0
        public void BindOptions(WizardConfig options, ViewType mode)
        {
            this.options = options;
            this.mode    = mode;

            cbxProfile.DisplayMemberPath = "Name";
            cbxProfile.SelectedValuePath = "Id";
            cbxProfile.ItemsSource       = options.Profiles;
            cbxProfile.SelectedValue     = options.Profiles.First().Id;
        }
Exemplo n.º 2
0
        public BaseViewModel(string profileName)
        {
            //         Error = new ErrorProperties();
            gCode       = new ObservableCollection <string>();
            GCodeFormat = Thread.Format.LinuxCNC;
            ZLength     = 10;
            ZStart      = 0;

            wz       = new WizardConfig(profileName);
            Profiles = wz.profile.profiles;
        }
Exemplo n.º 3
0
        public BaseViewModel(string profileName)
        {
            gCode       = new ObservableCollection <string>();
            PassData    = new ObservableCollection <string>();
            GCodeFormat = Thread.Format.LinuxCNC;
            ZLength     = 10;
            ZStart      = 0;

            wz       = new WizardConfig(profileName);
            Profiles = wz.profile.profiles;

            PropertyChanged += BaseViewModel_PropertyChanged;
        }
Exemplo n.º 4
0
        public ProfileDialog(WizardConfig options)
        {
            InitializeComponent();
            this.options = options;
            this.parent  = Application.Current.MainWindow;
            this.Title  += " - " + options.ProfileName;

            profile.xmode            = options.ActiveProfile.xmode;
            profile.xmodeenabled     = !options.ActiveProfile.xmodelock;
            profile.threadVisibility = options.ProfileName == "Threading" ? Visibility.Hidden : Visibility.Visible;
            profile.rpmVisibility    = options.ProfileName != "Threading" ? Visibility.Hidden : Visibility.Visible;
            profile.Profiles         = options.Profiles;

            DataContext = profile;

            CopyAll(options.ActiveProfile.Profile, profile);

            profile.Profile = options.ActiveProfile.Profile;
        }