void DrawGetByDate() { EditorGUILayout.BeginVertical(); EditorGUILayout.BeginHorizontal("box"); if (GUILayout.Button("Change Date")) { DatePopUp.Init(this, "Date"); //Call the date pop up window and set the tag for it to send the data back to } if (GUILayout.Button("Get Sessions From [" + date + "]")) { GetData(date, "", FilterTypes.date.ToString(), LineUpSqlSettings.getDataWithFilter); //Grab sessions from the defined date } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal("box"); if (GUILayout.Button("Change Start Date")) { DatePopUp.Init(this, "StartDate"); } if (GUILayout.Button("Change End Date")) { DatePopUp.Init(this, "EndDate"); } if (GUILayout.Button("Get Sessions Between [" + startDate + "] And [" + endDate + "]")) { GetData(startDate, endDate, FilterTypes.dateRange.ToString(), LineUpSqlSettings.getDataWithFilter); //Grab sessions between two date's } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }
public static string callType = ""; //The tag that was sent public static void Init(Viewer viewer, string call) { DatePopUp window = (DatePopUp)EditorWindow.GetWindow(typeof(DatePopUp)); window.Show(); //Set the active date as todays date year = System.DateTime.Now.Year; month = System.DateTime.Now.Month; day = System.DateTime.Now.Day - 1; SetUpMonths(); //Get all the months that are in the year SetUpDays(); //Get all the days that are in the month viewerCall = viewer; callType = call; window.ShowPopup(); }