Example #1
0
        public VariableLink SelectVar()
        {
            var window   = new SelectVariableWindow();
            var vmWindow = new VMselectVariable(window, this.VariableList, this.Parent.Parent.Parent.Model);

            window.DataContext = vmWindow;

            if (window.ShowDialog() == true)
            {
                return(vmWindow.Output.Root);
            }
            return(null);
        }
Example #2
0
        public VMselectVariable(SelectVariableWindow parent, VMvariableList variables, VMdataModel model) : base()
        {
            this.parent     = parent;
            this.list       = variables;
            this.model      = model;
            this.output     = new VMvariableLink(new VariableLink(new MyVariable(typeof(Nullable))));
            this.properties = new ObservableCollection <Contract.Block.VMvariable>();

            this.CommandTreeSelectionChanged = new DelegateCommand <object>(this.TreeSelectionChanged);
            this.CommandListSelectionChanged = new DelegateCommand <object>(this.ListSelectionChanged);
            this.CommandRemoveProperty       = new DelegateCommand(this.RemoveProperty, this.CanRemoveProperty);
            this.CommandConfirm = new DelegateCommand(this.Confirm, this.CanConfirm);
        }