void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.signUpWindow = ((SoBasicEnglish.Views.SignUpWindow)(target)); return; case 2: this.btnAVT = ((System.Windows.Controls.Button)(target)); return; case 3: this.stpSignUp = ((System.Windows.Controls.StackPanel)(target)); return; case 4: this.txtUserLoginName = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.txtUserLoginpPassword = ((System.Windows.Controls.PasswordBox)(target)); return; case 6: this.tbRetypePassWord = ((System.Windows.Controls.TextBlock)(target)); return; case 7: this.txtUserLoginpPasswordRetype = ((System.Windows.Controls.PasswordBox)(target)); return; case 8: this.txtEmail = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.txtUserFullName = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.txtBasicInfo = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.flChampions = ((MahApps.Metro.Controls.Flyout)(target)); return; case 12: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.flSidebar = ((MahApps.Metro.Controls.Flyout)(target)); return; case 2: this.queueWindow = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btnChangeRole = ((MahApps.Metro.Controls.Tile)(target)); return; case 2: this.gvUserList = ((System.Windows.Controls.DataGrid)(target)); return; case 3: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.stpLoginInfo = ((System.Windows.Controls.StackPanel)(target)); return; case 2: this.txtUserLoginName = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.txtUserLoginpassWord = ((System.Windows.Controls.PasswordBox)(target)); return; case 4: this.gForgetPass = ((System.Windows.Controls.Grid)(target)); return; case 5: this.txtLoginNameToReSetPassWord = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.txtEmailToResetPassword = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.btnForgotPass = ((System.Windows.Controls.Button)(target)); return; case 8: this.btnSignUp = ((System.Windows.Controls.Button)(target)); return; case 9: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.signInWindow = ((SoBasicEnglish.Views.SignInWindow)(target)); return; case 2: this.stpLoginInfo = ((System.Windows.Controls.Grid)(target)); return; case 3: this.txtUserLoginName = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.txtUserLoginpassWord = ((System.Windows.Controls.PasswordBox)(target)); return; case 5: this.ExpanderControl = ((System.Windows.Controls.Expander)(target)); return; case 6: this.gForgetPass = ((System.Windows.Controls.Grid)(target)); return; case 7: this.txtEmailToResetPassword = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.txtLoginNameToReSetPassWord = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Shows the given child window on the MetroWindow dialog container in an asynchronous way. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="overlayFillBehavior">The overlay fill behavior.</param> /// <returns> /// A task representing the operation. /// </returns> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, the container can not be found. /// or /// The provided child window is already visible in the specified window. /// </exception> public static Task ShowChildWindowAsync(this Window window, ChildWindow dialog, OverlayFillBehavior overlayFillBehavior = OverlayFillBehavior.WindowContent) { window.Dispatcher.VerifyAccess(); var metroDialogContainer = window.Template.FindName("PART_MetroDialogContainer", window) as Grid; metroDialogContainer = metroDialogContainer ?? window.Template.FindName("PART_MetroInactiveDialogsContainer", window) as Grid; if (metroDialogContainer == null) { throw new InvalidOperationException("The provided child window can not add, there is no container defined."); } if (metroDialogContainer.Children.Contains(dialog)) { throw new InvalidOperationException("The provided child window is already visible in the specified window."); } if (overlayFillBehavior == OverlayFillBehavior.WindowContent) { metroDialogContainer.SetValue(Grid.RowProperty, 1); metroDialogContainer.SetValue(Grid.RowSpanProperty, 1); } return(ShowChildWindowInternalAsync(dialog, metroDialogContainer)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.flSidebar = ((MahApps.Metro.Controls.Flyout)(target)); return; case 2: this.content = ((SoundOryc.Desktop.View.ContentView)(target)); return; case 3: this.pbRing = ((MahApps.Metro.Controls.ProgressRing)(target)); return; case 4: this.queueWindow = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Shows the given child window on the MetroWindow dialog container in an asynchronous way. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="overlayFillBehavior">The overlay fill behavior.</param> /// <returns> /// A task representing the operation. /// </returns> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, the container can not be found. /// or /// The provided child window is already visible in the specified window. /// </exception> public static Task ShowChildWindowAsync(this Window window, ChildWindow dialog, OverlayFillBehavior overlayFillBehavior = OverlayFillBehavior.WindowContent) { return(window.ShowChildWindowAsync <object>(dialog, overlayFillBehavior)); }
/// <summary> /// Shows the given child window on the given container in an asynchronous way. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="container">The container.</param> /// <returns /> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, there is no container defined. /// or /// The provided child window is already visible in the specified window. /// </exception> public static async Task <TResult> ShowChildWindowAsync <TResult>(this Window window, ChildWindow dialog, Panel container) { var tcs = new TaskCompletionSource <TResult>(); window.Dispatcher.VerifyAccess(); if (container == null) { throw new InvalidOperationException("The provided child window can not add, there is no container defined."); } if (container.Children.Contains(dialog)) { throw new InvalidOperationException("The provided child window is already visible in the specified window."); } return(await OpenDialogAsync(dialog, container, tcs)); }
/// <summary> /// Shows the given child window on the given container in an asynchronous way. /// When the dialog was closed it returns a result. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="container">The container.</param> /// <returns></returns> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, there is no container defined. /// or /// The provided child window is already visible in the specified window. /// </exception> public static Task ShowChildWindowAsync(this Window window, ChildWindow dialog, Panel container) { return(window.ShowChildWindowAsync <object>(dialog, container)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ResolutionList = ((System.Windows.Controls.ComboBox)(target)); #line 43 "..\..\MainWindow.xaml" this.ResolutionList.LostFocus += new System.Windows.RoutedEventHandler(this.ResolutionList_OnSelected); #line default #line hidden return; case 2: this.redBtn = ((System.Windows.Controls.Button)(target)); #line 54 "..\..\MainWindow.xaml" this.redBtn.Click += new System.Windows.RoutedEventHandler(this.ChannelBtn_Click); #line default #line hidden return; case 3: this.greenBtn = ((System.Windows.Controls.Button)(target)); #line 65 "..\..\MainWindow.xaml" this.greenBtn.Click += new System.Windows.RoutedEventHandler(this.ChannelBtn_Click); #line default #line hidden return; case 4: this.blueBtn = ((System.Windows.Controls.Button)(target)); #line 76 "..\..\MainWindow.xaml" this.blueBtn.Click += new System.Windows.RoutedEventHandler(this.ChannelBtn_Click); #line default #line hidden return; case 5: this.alphaBtn = ((System.Windows.Controls.Button)(target)); #line 87 "..\..\MainWindow.xaml" this.alphaBtn.Click += new System.Windows.RoutedEventHandler(this.ChannelBtn_Click); #line default #line hidden return; case 6: this.outBtn = ((System.Windows.Controls.Button)(target)); #line 98 "..\..\MainWindow.xaml" this.outBtn.Click += new System.Windows.RoutedEventHandler(this.OutputBtn_Click); #line default #line hidden return; case 7: this.redPath = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.greenPath = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.bluePath = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.alphaPath = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.outputPath = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.fileName = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.RedFill = ((System.Windows.Controls.ComboBox)(target)); #line 123 "..\..\MainWindow.xaml" this.RedFill.LostFocus += new System.Windows.RoutedEventHandler(this.FillSelection_FocusLost); #line default #line hidden return; case 14: this.GreenFill = ((System.Windows.Controls.ComboBox)(target)); #line 127 "..\..\MainWindow.xaml" this.GreenFill.LostFocus += new System.Windows.RoutedEventHandler(this.FillSelection_FocusLost); #line default #line hidden return; case 15: this.BlueFill = ((System.Windows.Controls.ComboBox)(target)); #line 131 "..\..\MainWindow.xaml" this.BlueFill.LostFocus += new System.Windows.RoutedEventHandler(this.FillSelection_FocusLost); #line default #line hidden return; case 16: this.AlphaFill = ((System.Windows.Controls.ComboBox)(target)); #line 135 "..\..\MainWindow.xaml" this.AlphaFill.LostFocus += new System.Windows.RoutedEventHandler(this.FillSelection_FocusLost); #line default #line hidden return; case 17: this.RedImage = ((System.Windows.Controls.Image)(target)); #line 140 "..\..\MainWindow.xaml" this.RedImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Preview_Click); #line default #line hidden return; case 18: this.GreenImage = ((System.Windows.Controls.Image)(target)); #line 141 "..\..\MainWindow.xaml" this.GreenImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Preview_Click); #line default #line hidden return; case 19: this.BlueImage = ((System.Windows.Controls.Image)(target)); #line 142 "..\..\MainWindow.xaml" this.BlueImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Preview_Click); #line default #line hidden return; case 20: this.AlphaImage = ((System.Windows.Controls.Image)(target)); #line 143 "..\..\MainWindow.xaml" this.AlphaImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Preview_Click); #line default #line hidden return; case 21: this.mergeBtn = ((System.Windows.Controls.Button)(target)); #line 145 "..\..\MainWindow.xaml" this.mergeBtn.Click += new System.Windows.RoutedEventHandler(this.MergeBtn_Click); #line default #line hidden return; case 22: this.PreviewWindow = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; case 23: this.PreviewWindowImage = ((System.Windows.Controls.Image)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.stDateChoose = ((System.Windows.Controls.StackPanel)(target)); return; case 2: this.lvDateList = ((System.Windows.Controls.ListView)(target)); return; case 3: this.btnDeleteLesson = ((System.Windows.Controls.Button)(target)); return; case 4: this.btnAddLesson = ((System.Windows.Controls.Button)(target)); return; case 5: this.spLessonName = ((System.Windows.Controls.StackPanel)(target)); return; case 6: this.cbLevel = ((System.Windows.Controls.ComboBox)(target)); return; case 7: this.btnSubmitEditing = ((System.Windows.Controls.Button)(target)); return; case 8: this.btnSubmitNewLesson = ((System.Windows.Controls.Button)(target)); return; case 9: this.tcLesson = ((System.Windows.Controls.TabControl)(target)); return; case 10: this.btnResetGettingReadyQuestion = ((System.Windows.Controls.Button)(target)); return; case 11: this.btnAddGettingReadyQuestion = ((System.Windows.Controls.Button)(target)); return; case 12: this.btnDeleteGettingReadyQuestion = ((System.Windows.Controls.Button)(target)); return; case 13: this.lvGetReadyQuestionList = ((System.Windows.Controls.ListView)(target)); return; case 14: this.tcKeyWords = ((System.Windows.Controls.TabControl)(target)); return; case 15: this.btnResetkeyWords = ((System.Windows.Controls.Button)(target)); return; case 16: this.btnAddkeyWords = ((System.Windows.Controls.Button)(target)); return; case 17: this.btnDeletekeyWords = ((System.Windows.Controls.Button)(target)); return; case 18: this.lvKeyWordsList = ((System.Windows.Controls.ListView)(target)); return; case 19: this.btnResetkeyWordEx = ((System.Windows.Controls.Button)(target)); return; case 20: this.btnAddkeyWordEx = ((System.Windows.Controls.Button)(target)); return; case 21: this.btnDeletekeyWordEx = ((System.Windows.Controls.Button)(target)); return; case 22: this.lvKeyWordExList = ((System.Windows.Controls.ListView)(target)); return; case 23: this.tcSentence = ((System.Windows.Controls.TabControl)(target)); return; case 24: this.btnResetSentences = ((System.Windows.Controls.Button)(target)); return; case 25: this.btnAddSentences = ((System.Windows.Controls.Button)(target)); return; case 26: this.btnDeletekeySentences = ((System.Windows.Controls.Button)(target)); return; case 27: this.lvSentencesList = ((System.Windows.Controls.ListView)(target)); return; case 28: this.btnResetSentenceEx = ((System.Windows.Controls.Button)(target)); return; case 29: this.btnAddSentenceEx = ((System.Windows.Controls.Button)(target)); return; case 30: this.btnDeleteSentenceEx = ((System.Windows.Controls.Button)(target)); return; case 31: this.lvSentenceExList = ((System.Windows.Controls.ListView)(target)); return; case 32: this.sliProgress = ((System.Windows.Controls.Slider)(target)); return; case 33: this.btnOpenAudioFile = ((System.Windows.Controls.Button)(target)); return; case 34: this.tcListening = ((System.Windows.Controls.TabControl)(target)); return; case 35: this.btnResetListeningQuestion = ((System.Windows.Controls.Button)(target)); return; case 36: this.btnAddListeningQuestion = ((System.Windows.Controls.Button)(target)); return; case 37: this.btnDeleteListeningQuestion = ((System.Windows.Controls.Button)(target)); return; case 38: this.lvListeningQuestionList = ((System.Windows.Controls.ListView)(target)); return; case 39: this.lvListeningPart2List = ((System.Windows.Controls.ListView)(target)); return; case 40: this.btnOpenWordFile = ((MahApps.Metro.Controls.Tile)(target)); return; case 41: this.tbWordFilePath = ((System.Windows.Controls.TextBox)(target)); return; case 42: this.btnReviewWordFile = ((MahApps.Metro.Controls.Tile)(target)); return; case 43: this.dvGrammar = ((System.Windows.Controls.DocumentViewer)(target)); return; case 44: this.btnResetGrammarQuestion = ((System.Windows.Controls.Button)(target)); return; case 45: this.btnAddGrammarQuestion = ((System.Windows.Controls.Button)(target)); return; case 46: this.btnDeleteGrammarQuestion = ((System.Windows.Controls.Button)(target)); return; case 47: this.lvGrammarQuestionList = ((System.Windows.Controls.ListView)(target)); return; case 48: this.imgAVT = ((System.Windows.Media.ImageBrush)(target)); return; case 49: this.stpEditLesonQuestion = ((System.Windows.Controls.StackPanel)(target)); return; case 50: this.IdOfQuestion = ((System.Windows.Controls.TextBlock)(target)); return; case 51: this.IndexOfGV = ((System.Windows.Controls.TextBlock)(target)); return; case 52: this.tbContentOfAnswer = ((System.Windows.Controls.TextBox)(target)); return; case 53: this.gvLessonQuestion = ((System.Windows.Controls.DataGrid)(target)); return; case 54: this.PronFlyout = ((MahApps.Metro.Controls.Flyout)(target)); return; case 55: this.WrapPron = ((System.Windows.Controls.ItemsControl)(target)); return; case 56: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; } this._contentLoaded = true; }
public OpenChildWindowMessage(ChildWindow window) { Window = window; }
/// <summary> /// Shows the given child window on the given container in an asynchronous way. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="container">The container.</param> /// <returns></returns> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, there is no container defined. /// or /// The provided child window is already visible in the specified window. /// </exception> public static Task <TResult> ShowChildWindowAsync <TResult>(this Window window, ChildWindow dialog, Panel container) { window.Dispatcher.VerifyAccess(); if (container == null) { throw new InvalidOperationException("The provided child window can not add, there is no container defined."); } if (container.Children.Contains(dialog)) { throw new InvalidOperationException("The provided child window is already visible in the specified window."); } return(ShowChildWindowInternalAsync <TResult>(dialog, container)); }
/// <summary> /// Shows the given child window on the MetroWindow dialog container in an asynchronous way. /// When the dialog was closed it returns a result. /// </summary> /// <param name="window">The owning window with a container of the child window.</param> /// <param name="dialog">A child window instance.</param> /// <param name="overlayFillBehavior">The overlay fill behavior.</param> /// <returns> /// A task representing the operation. /// </returns> /// <exception cref="System.InvalidOperationException"> /// The provided child window can not add, the container can not be found. /// or /// The provided child window is already visible in the specified window. /// </exception> public static async Task <TResult> ShowChildWindowAsync <TResult>(this Window window, ChildWindow dialog, OverlayFillBehavior overlayFillBehavior = OverlayFillBehavior.WindowContent) { var tcs = new TaskCompletionSource <TResult>(); window.Dispatcher.VerifyAccess(); var metroDialogContainer = window.Template.FindName("PART_MetroActiveDialogContainer", window) as Grid; metroDialogContainer = metroDialogContainer ?? window.Template.FindName("PART_MetroInactiveDialogsContainer", window) as Grid; if (metroDialogContainer == null) { throw new InvalidOperationException("The provided child window can not add, there is no container defined."); } if (metroDialogContainer.Children.Contains(dialog)) { throw new InvalidOperationException("The provided child window is already visible in the specified window."); } if (overlayFillBehavior == OverlayFillBehavior.WindowContent) { metroDialogContainer.SetCurrentValue(Grid.RowProperty, (int)metroDialogContainer.GetValue(Grid.RowProperty) + 1); metroDialogContainer.SetCurrentValue(Grid.RowSpanProperty, 1); } return(await OpenDialogAsync(dialog, metroDialogContainer, tcs)); }
private static Task AddDialogToContainerAsync(ChildWindow dialog, Panel container) { return(Task.Factory.StartNew(() => dialog.Dispatcher.Invoke(new Action(() => container.Children.Add(dialog))))); }
private static Task <TResult> ShowChildWindowInternalAsync <TResult>(ChildWindow dialog, Panel container) { return(AddDialogToContainerAsync(dialog, container) .ContinueWith(task => { return (Task <TResult>)dialog.Dispatcher.Invoke(new Func <Task <TResult> >(() => OpenDialogAsync <TResult>(dialog, container))); }) .Unwrap()); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.btnsetting = ((System.Windows.Controls.Button)(target)); return; case 2: this.FlipViewTest = ((MahApps.Metro.Controls.FlipView)(target)); return; case 3: this.flUser = ((MahApps.Metro.Controls.Flyout)(target)); return; case 4: this.lbUserName = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.lbUserLevel = ((System.Windows.Controls.Label)(target)); return; case 6: this.pcLevel = ((System.Windows.Controls.Border)(target)); return; case 7: this.lbUserLevelScore = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.gEdituserInfo = ((System.Windows.Controls.Grid)(target)); return; case 9: this.lbEditIUserInfo = ((System.Windows.Controls.Label)(target)); return; case 10: this.gChangePass = ((System.Windows.Controls.Grid)(target)); return; case 11: this.lbChangePassword = ((System.Windows.Controls.Label)(target)); return; case 12: this.gLogOut = ((System.Windows.Controls.Grid)(target)); return; case 13: this.lbLogOut = ((System.Windows.Controls.Label)(target)); return; case 14: this.flProccess = ((MahApps.Metro.Controls.Flyout)(target)); return; case 15: this.gvDate = ((System.Windows.Controls.DataGrid)(target)); return; case 16: this.flChampions = ((MahApps.Metro.Controls.Flyout)(target)); return; case 17: this.lvChampion = ((System.Windows.Controls.ListView)(target)); return; case 18: this.btnCloseChampions = ((MahApps.Metro.Controls.Tile)(target)); return; case 19: this.child01 = ((MahApps.Metro.SimpleChildWindow.ChildWindow)(target)); return; case 20: this.imgAVT = ((System.Windows.Media.ImageBrush)(target)); return; case 21: this.btnAVT = ((MahApps.Metro.Controls.Tile)(target)); return; case 22: this.txtUserFullName = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.txtBasicInfo = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.stpChangPassword = ((System.Windows.Controls.StackPanel)(target)); return; case 25: this.txtOldPass = ((System.Windows.Controls.PasswordBox)(target)); return; case 26: this.txtNewPass = ((System.Windows.Controls.PasswordBox)(target)); return; case 27: this.txtConfiPass = ((System.Windows.Controls.PasswordBox)(target)); return; } this._contentLoaded = true; }
public async Task ShowChildWindowAsync(object context, ChildWindow childWindow) { await GetMetroWindow(context).ShowChildWindowAsync(childWindow); }