private void Button_Click(object sender, RoutedEventArgs e) { DateTimeComboControl editor = new DateTimeComboControl(); PosDialogWindow window = new PosDialogWindow(editor, "Modify Date and Time"); editor.SelectedDateTime = SelectedDateTime; ParentWindow.ShowShadingOverlay = true; window.Width = 560; window.Height = 475; window.ShowDialog((Window)ParentWindow); ParentWindow.ShowShadingOverlay = false; if (!window.ClosedByUser) { SelectedDateTime = editor.SelectedDateTime; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 2: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 3: this.dateTimeComboControl = ((PosControls.DateTimeComboControl)(target)); return; } this._contentLoaded = true; }