/// <summary> /// Initializes the new instance of <see cref="MainWindow"/> class. /// </summary> public MainWindow() { this.InitializeComponent(); App.AttachDevTools(this); btnGetWavHeader = this.FindControl<Button>("btnGetWavHeader"); progress = this.FindControl<ProgressBar>("progress"); btnCancel = this.FindControl<Button>("btnCancel"); btnSplitWavFiles = this.FindControl<Button>("btnSplitWavFiles"); textOutputPath = this.FindControl<TextBox>("textOutputPath"); btnBrowseOutputPath = this.FindControl<Button>("btnBrowseOutputPath"); textOutput = this.FindControl<TextBox>("textOutput"); var v = Assembly.GetExecutingAssembly().GetName().Version; Title = string.Format("SimpleWavSplitter v{0}.{1}.{2}", v.Major, v.Minor, v.Build); btnBrowseOutputPath.Click += async (sender, e) => await GetOutputPath(); btnGetWavHeader.Click += async (sender, e) => await GetWavHeader(); btnSplitWavFiles.Click += async (sender, e) => await SplitWavFiles(); btnCancel.Click += async (sender, e) => await CancelSplitWavFiles(); }
public void Should_Return_FallbackValue_When_Invalid_Source_Type() { var target = new ProgressBar(); var source = new Source { Foo = "foo" }; var binding = new Binding { Source = source, Path = "Foo", FallbackValue = 42, }; target.Bind(ProgressBar.ValueProperty, binding); Assert.Equal(42, target.Value); }