private static void OnScaleValueChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            ChannelConfigWindow channelConfigWindow = o as ChannelConfigWindow;

            if (channelConfigWindow != null)
            {
                channelConfigWindow.OnScaleValueChanged((double)e.OldValue, (double)e.NewValue);
            }
        }
        private static object OnCoerceScaleValue(DependencyObject o, object value)
        {
            ChannelConfigWindow channelConfigWindow = o as ChannelConfigWindow;

            if (channelConfigWindow != null)
            {
                return(channelConfigWindow.OnCoerceScaleValue((double)value));
            }
            else
            {
                return(value);
            }
        }
        private void editChannelsButton_Click(object sender, RoutedEventArgs e)
        {
            ChannelConfigWindow channelConfigWindow = new ChannelConfigWindow();

            channelConfigWindow.Owner         = this;
            channelConfigWindow.DataContext   = this.DataContext;
            channelConfigWindow.channelConfig = MainWindow.instance.channelConfig;
            if (WindowState == WindowState.Maximized)
            {
                channelConfigWindow.WindowState = WindowState.Maximized;
            }
            channelConfigWindow.ShowDialog();
            //Close();
        }
Exemplo n.º 4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.channelConfigWindow = ((TouchFaders_MIDI.ChannelConfigWindow)(target));

            #line 8 "..\..\ChannelConfigWindow.xaml"
                this.channelConfigWindow.Loaded += new System.Windows.RoutedEventHandler(this.channelConfigWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.channelConfigWindowGrid = ((System.Windows.Controls.Grid)(target));

            #line 9 "..\..\ChannelConfigWindow.xaml"
                this.channelConfigWindowGrid.SizeChanged += new System.Windows.SizeChangedEventHandler(this.channelConfigWindowGrid_SizeChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.ApplicationScaleTransform = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 4:
                this.channelDataGrid = ((System.Windows.Controls.DataGrid)(target));

            #line 18 "..\..\ChannelConfigWindow.xaml"
                this.channelDataGrid.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.channelDataGrid_MouseDown);

            #line default
            #line hidden

            #line 18 "..\..\ChannelConfigWindow.xaml"
                this.channelDataGrid.LoadingRow += new System.EventHandler <System.Windows.Controls.DataGridRowEventArgs>(this.channelDataGrid_LoadingRow);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }