public void ShowPopup(object sender, PopupDialogType popupDialogType) { this.attachedPopup.IsOpen = false; this.attachedPopup.Child = null; switch (popupDialogType) { case PopupDialogType.Create: { Rectangle target = sender as Rectangle; if (target != null) { ShowCreateDialog(target); } break; } case PopupDialogType.Edit: { EventControl target = sender as EventControl; if (target != null) { ShowEditEventDialog(target); } break; } case PopupDialogType.Details: { EventControl target = sender as EventControl; if (target != null) { ShowEventDetailsDialog(target); } break; } } }
public static PopupDialogView Popup(PopupDialogType t, GameObject parent, ButtonEventHandler callback, params object[] ps) { return(Popup(t, parent, "", new object[] { }, callback, ps)); }
public static PopupDialogView Popup(PopupDialogType t, GameObject parent, params object[] ps) { return(Popup(t, parent, null, ps)); }
public static PopupDialogView Popup(PopupDialogType t, string richPath, object[] richPs, ButtonEventHandler callback, params object[] ps) { return(Popup(t, null, richPath, richPs, callback, ps)); }
public static PopupDialogView Popup(PopupDialogType t, ButtonEventHandler callback, params object[] ps) { return(Popup(t, null, callback, ps)); }
public static PopupDialogView PopupAB(PopupDialogType t, AssetBundle bundle, params object[] ps) { return(PopupAB(t, bundle, null, null, ps)); }
public static PopupDialogView PopupAB(PopupDialogType t, AssetBundle bundle, ButtonEventHandler callback, params object[] ps) { return(PopupAB(t, bundle, null, callback, ps)); }
private void SubmitDialog(object target, PopupDialogType type) { EditEventDialog submittedDialog = this.attachedPopup.Child as EditEventDialog; if (type == PopupDialogType.Create) { OrganizerEvent newEvent = OrganizerEventFactory.CreateOrganizerEvent( (OrganizerEventType)submittedDialog.EventTypeComboBox.SelectedItem, submittedDialog.TitleTextBox.Text, submittedDialog.LocationTextBox.Text, submittedDialog.StartTimePicker.Value.Value, submittedDialog.EndTimePicker.Value.Value, submittedDialog.AllDayCheckBox.IsChecked.Value, null); //TO-DO: add the optional extended fields instead of null. this.masterDispatcher.DataSources[0].Add(newEvent); } else { OrganizerEvent dataSource = submittedDialog.DataSource; if (dataSource.EventType == (OrganizerEventType)submittedDialog.EventTypeComboBox.SelectedItem) { dataSource.Title = submittedDialog.TitleTextBox.Text; dataSource.Location = submittedDialog.LocationTextBox.Text; dataSource.End = submittedDialog.EndTimePicker.Value.Value; dataSource.Start = submittedDialog.StartTimePicker.Value.Value; } else { OrganizerEvent newEvent = OrganizerEventFactory.CreateOrganizerEvent( (OrganizerEventType)submittedDialog.EventTypeComboBox.SelectedItem, submittedDialog.TitleTextBox.Text, submittedDialog.LocationTextBox.Text, submittedDialog.StartTimePicker.Value.Value, submittedDialog.EndTimePicker.Value.Value, submittedDialog.AllDayCheckBox.IsChecked.Value, null); this.masterDispatcher.DataSources[0].Remove(dataSource); this.masterDispatcher.DataSources[0].Add(newEvent); } } this.attachedPopup.IsOpen = false; }
protected virtual void OnPopupDialog(PopupDialogType t, string title, string msg) { }