void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\Busy.xaml" ((PS4_PS2_Classics_Gui__WPF_.Busy)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.lblTitle = ((System.Windows.Controls.Label)(target)); return; case 3: this.lblTask = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.txtExtraInfo = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.btnPositive = ((NMT.Wpf.Controls.PulseButton)(target)); return; case 6: this.btnNutral = ((System.Windows.Controls.Button)(target)); return; case 7: this.btnNegative = ((System.Windows.Controls.Button)(target)); return; case 8: this.Username = ((System.Windows.Controls.Label)(target)); return; case 9: this.OptionsView = ((System.Windows.Controls.StackPanel)(target)); return; case 10: this.LabelOn = ((System.Windows.Controls.Label)(target)); return; case 11: this.labelOff = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MultipleISO_s.xaml" ((PS4_PS2_Classics_Gui__WPF_.MultipleISO_s)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.listBox = ((System.Windows.Controls.ListBox)(target)); #line 18 "..\..\MultipleISO_s.xaml" this.listBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox_SelectionChanged); #line default #line hidden #line 18 "..\..\MultipleISO_s.xaml" this.listBox.KeyDown += new System.Windows.Input.KeyEventHandler(this.listBox_KeyDown); #line default #line hidden return; case 3: this.btnRemove = ((NMT.Wpf.Controls.PulseButton)(target)); #line 36 "..\..\MultipleISO_s.xaml" this.btnRemove.Click += new System.Windows.RoutedEventHandler(this.btnRemove_Click); #line default #line hidden return; case 4: this.lblTitleId = ((System.Windows.Controls.Label)(target)); return; case 5: this.lblSize = ((System.Windows.Controls.Label)(target)); return; case 6: this.lblTitleId_Copy = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainWindow.xaml" ((PS4_PS2_Classics_Gui__WPF_.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 9 "..\..\MainWindow.xaml" ((PS4_PS2_Classics_Gui__WPF_.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: this.Main_Grid = ((System.Windows.Controls.Grid)(target)); #line 10 "..\..\MainWindow.xaml" this.Main_Grid.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.Page_PreviewKeyDown); #line default #line hidden return; case 3: this.BackgroundImage = ((System.Windows.Controls.DockPanel)(target)); return; case 4: #line 20 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_5); #line default #line hidden return; case 5: #line 21 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click); #line default #line hidden return; case 6: #line 22 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_1); #line default #line hidden return; case 7: #line 24 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_2); #line default #line hidden return; case 8: #line 27 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_4); #line default #line hidden return; case 9: #line 29 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_8); #line default #line hidden return; case 10: this.homescreen = ((System.Windows.Controls.Grid)(target)); #line 34 "..\..\MainWindow.xaml" this.homescreen.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Grid_MouseDown); #line default #line hidden return; case 11: this.iconbox0 = ((System.Windows.Controls.Image)(target)); #line 35 "..\..\MainWindow.xaml" this.iconbox0.Drop += new System.Windows.DragEventHandler(this.Icon_Drop); #line default #line hidden return; case 12: this.Icon0 = ((System.Windows.Controls.Image)(target)); #line 36 "..\..\MainWindow.xaml" this.Icon0.Drop += new System.Windows.DragEventHandler(this.Icon_Drop); #line default #line hidden return; case 13: #line 39 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_6); #line default #line hidden return; case 14: #line 45 "..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_7); #line default #line hidden return; case 15: this.iconbox2 = ((System.Windows.Controls.Image)(target)); #line 54 "..\..\MainWindow.xaml" this.iconbox2.Drop += new System.Windows.DragEventHandler(this.Icon_Drop); #line default #line hidden return; case 16: this.iconbox3 = ((System.Windows.Controls.Image)(target)); #line 55 "..\..\MainWindow.xaml" this.iconbox3.Drop += new System.Windows.DragEventHandler(this.Icon_Drop); #line default #line hidden return; case 17: this.homescreen_dimmer = ((System.Windows.Shapes.Rectangle)(target)); #line 56 "..\..\MainWindow.xaml" this.homescreen_dimmer.Drop += new System.Windows.DragEventHandler(this.Home_background_Drop); #line default #line hidden return; case 18: this.titlename_dimmer = ((System.Windows.Shapes.Rectangle)(target)); #line 65 "..\..\MainWindow.xaml" this.titlename_dimmer.Drop += new System.Windows.DragEventHandler(this.Home_background_Drop); #line default #line hidden return; case 19: this.selecttitle = ((System.Windows.Controls.Label)(target)); return; case 20: this.focuscolor = ((System.Windows.Controls.Border)(target)); return; case 21: this.btnStart = ((System.Windows.Controls.Button)(target)); #line 76 "..\..\MainWindow.xaml" this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click); #line default #line hidden return; case 22: this.Username = ((System.Windows.Controls.Label)(target)); return; case 23: this.OptionS = ((System.Windows.Controls.Grid)(target)); #line 84 "..\..\MainWindow.xaml" this.OptionS.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Grid_MouseDown); #line default #line hidden return; case 24: this.PS2Titlelbl = ((System.Windows.Controls.Label)(target)); return; case 25: this.txtPath = ((System.Windows.Controls.TextBox)(target)); return; case 26: this.btnSelectISO = ((System.Windows.Controls.Button)(target)); #line 88 "..\..\MainWindow.xaml" this.btnSelectISO.Click += new System.Windows.RoutedEventHandler(this.btnSelectISO_Click); #line default #line hidden return; case 27: this.lblPS2ID = ((System.Windows.Controls.Label)(target)); return; case 28: this.txtContentID = ((System.Windows.Controls.TextBox)(target)); return; case 29: this.txtTitle = ((System.Windows.Controls.TextBox)(target)); #line 96 "..\..\MainWindow.xaml" this.txtTitle.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtContentID_Copy_TextChanged); #line default #line hidden return; case 30: this.lblNpTitle = ((System.Windows.Controls.Label)(target)); return; case 31: this.lblTitle = ((System.Windows.Controls.Label)(target)); return; case 32: this.btnConvert = ((NMT.Wpf.Controls.PulseButton)(target)); #line 119 "..\..\MainWindow.xaml" this.btnConvert.Click += new System.Windows.RoutedEventHandler(this.btnConvert_Click); #line default #line hidden return; case 33: this.btnMutePlaySound = ((System.Windows.Controls.Button)(target)); #line 125 "..\..\MainWindow.xaml" this.btnMutePlaySound.Click += new System.Windows.RoutedEventHandler(this.btnMutePlaySound_Click); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Sets the story board for the pulses /// </summary> /// <param name="pb">The pb.</param> private void SetStoryBoard(PulseButton pb) { double delay = 0; // Correct PulseScale according to control dimensions double correctedFactorX = pb.PulseScale, correctedFactorY = pb.PulseScale; if (pb.IsMeasureValid) { if (pb.ActualHeight < pb.ActualWidth) { correctedFactorY = (pb.PulseScale - 1) * ((pb.ActualWidth - pb.ActualHeight) / (1 + pb.ActualHeight)) + pb.PulseScale; } else { correctedFactorX = (pb.PulseScale - 1) * ((pb.ActualHeight - pb.ActualWidth) / (1 + pb.ActualWidth)) + pb.PulseScale; } } // Add pulses foreach (Shape shape in pb.partPulseContainer.Children) { shape.RenderTransform = new ScaleTransform(); // X-axis animation var animation = new DoubleAnimation(1, correctedFactorX, pb.PulseSpeed) { RepeatBehavior = RepeatBehavior.Forever, AutoReverse = false, BeginTime = TimeSpan.FromMilliseconds(delay), EasingFunction = pb.PulseEasing }; // Y-axis animation var animation2 = new DoubleAnimation(1, correctedFactorY, pb.PulseSpeed) { RepeatBehavior = RepeatBehavior.Forever, AutoReverse = false, BeginTime = TimeSpan.FromMilliseconds(delay), EasingFunction = pb.PulseEasing }; // Opacity animation var animation3 = new DoubleAnimation(1, 0, pb.PulseSpeed) { RepeatBehavior = RepeatBehavior.Forever, AutoReverse = false, BeginTime = TimeSpan.FromMilliseconds(delay) }; // Set delay between pulses delay += pb.PulseSpeed.TimeSpan.TotalMilliseconds / pb.Pulses; // Create storyboard var storyboard = new Storyboard(); storyboard.Children.Add(animation); storyboard.Children.Add(animation2); storyboard.Children.Add(animation3); Storyboard.SetTarget(animation, shape); Storyboard.SetTarget(animation2, shape); Storyboard.SetTarget(animation3, shape); if (pb.IsEllipsis) { Storyboard.SetTargetProperty(animation, new PropertyPath("(Ellipse.RenderTransform).(ScaleTransform.ScaleX)")); Storyboard.SetTargetProperty(animation2, new PropertyPath("(Ellipse.RenderTransform).(ScaleTransform.ScaleY)")); Storyboard.SetTargetProperty(animation3, new PropertyPath("(Ellipse.Opacity)")); } else { Storyboard.SetTargetProperty(animation, new PropertyPath("(Rectangle.RenderTransform).(ScaleTransform.ScaleX)")); Storyboard.SetTargetProperty(animation2, new PropertyPath("(Rectangle.RenderTransform).(ScaleTransform.ScaleY)")); Storyboard.SetTargetProperty(animation3, new PropertyPath("(Rectangle.Opacity)")); } // Start storyboard storyboard.Begin(); } #endregion }