void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ThisControl = ((PosControls.DateEntryControl)(target)); return; case 2: this.mainPane = ((System.Windows.Controls.DockPanel)(target)); return; case 3: this.Configuration = ((PosControls.ConfigurationManager)(target)); return; case 4: this.dateControl = ((PosControls.DateEntryDateControl)(target)); return; case 5: this.buttonSelect = ((PosControls.PushButton)(target)); return; case 6: this.buttonCancel = ((PosControls.PushButton)(target)); return; } this._contentLoaded = true; }
public static DateTime?PromptForDay(string fieldName, DateTime?day = null) { DateEntryControl control = new DateEntryControl(); PosDialogWindow window = new PosDialogWindow(control, fieldName); control.SelectedDay = day.HasValue ? day.Value : DateTime.Now; window.IsClosable = false; window.Width = 410; window.Height = 430; window.ShowDialogForActiveWindow(); return(control.SelectedDay); }