Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var controls = OscAddress.GetChildrenWithValue(this);

            this.Vm          = new SynthViewModel(controls);
            this.DataContext = Vm;
            Vm.Parent        = this.Parent as Window;
            Vm.Initialize();
        }
Ejemplo n.º 2
0
        private void SetModuleAddress()
        {
            var children = OscAddress.GetChildrenWithValue(this);

            foreach (var child in children)
            {
                var currentVal = OscAddress.GetAddress(child.Key);
                var newVal     = currentVal.Replace("*", moduleAddress);
                OscAddress.SetAddress(child.Key, newVal);
            }
        }
Ejemplo n.º 3
0
        private void SetIndex()
        {
            int index = StartIndex;

            foreach (var childP in RoutesStackPanel.Children)
            {
                var childPanel = childP as StackPanel;
                if (childPanel == null)
                {
                    continue;
                }

                var children = OscAddress.GetChildrenWithValue(childPanel);
                foreach (var child in children)
                {
                    var currentVal = OscAddress.GetAddress(child.Key);
                    var newVal     = currentVal.Replace("*", index.ToString());
                    OscAddress.SetAddress(child.Key, newVal);
                }

                index++;
            }
        }