private void DisplayInfo(IPlayer player, string clanTag) { JArray clanMembers = GetClanMembers(clanTag); if (clanMembers == null) { player.Reply(Lang("NotFound", player.Id)); return; } CustomTable customTable = new CustomTable(); customTable.AddColumn(Lang("ColumnName", player.Id)); customTable.AddColumn(Lang("ColumnID", player.Id)); customTable.AddColumn(Lang("ColumnStatus", player.Id)); foreach (JToken userID in clanMembers) { IPlayer mPlayer = covalence.Players.FindPlayerById((string)userID); if (mPlayer == null) { continue; } customTable.AddRow(mPlayer.Name, mPlayer.Id, mPlayer.IsConnected ? Lang("Online", player.Id) : Lang("Offline", player.Id)); } player.Reply(Lang("DisplayMsg", player.Id, clanTag, customTable)); }
/// <summary> /// how to create a custom table /// </summary> /// <remarks></remarks> public void CreateCustomTable() { // Set a reference to the drawing document. // This assumes a drawing document is active. DrawingDocument oDrawDoc = (DrawingDocument)_InvApplication.ActiveDocument; // Set a reference to the active sheet. Sheet oSheet = default(Sheet); oSheet = oDrawDoc.ActiveSheet; // Set the column titles string[] oTitles = new string[] { "Part Number", "Quantity", "Material" }; // Set the contents of the custom table (contents are set row-wise) string[] oContents = new string[] { "1", "1", "Brass", "2", "2", "Aluminium", "3", "1", "Steel" }; // Set the column widths (defaults to the column title width if not specified) double[] oColumnWidths = new double[] { 2.5, 2.5, 4 }; // Create the custom table CustomTable oCustomTable = default(CustomTable); oCustomTable = oSheet.CustomTables.Add("My Table", _InvApplication.TransientGeometry.CreatePoint2d(15, 15), 3, 3, oTitles, oContents, oColumnWidths); // Change the 3rd column to be left justified. oCustomTable.Columns[3].ValueHorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextLeft; // Create a table format object TableFormat oFormat = oSheet.CustomTables.CreateTableFormat(); // Set inside line color to red. oFormat.InsideLineColor = _InvApplication.TransientObjects.CreateColor(255, 0, 0); // Set outside line weight. oFormat.OutsideLineWeight = 0.1; // Modify the table formats oCustomTable.OverrideFormat = oFormat; }
public static void Create(CustomTable t) { IndexViewBuilder ourGeneratedFile = new IndexViewBuilder(t); string templatefile = FileManager.ReadingTextFile(AppDomain.CurrentDomain.BaseDirectory + "Resources/Views/Index.cshtml"); string genratedCode = ourGeneratedFile.Prepare(templatefile); FileManager.SaveFile(".cshtml", ourGeneratedFile.CurrentTable.PathOfIndexView, genratedCode); }
private void PopulateStaffComboBox() { staff.Clear(); staffcomboBox1.Items.Clear(); // Get day from the DateTime picker Column dayColumn = null; switch (dateTimePicker1.Value.DayOfWeek) { case DayOfWeek.Monday: dayColumn = Tables.ROTA_TABLE.Mon; break; case DayOfWeek.Tuesday: dayColumn = Tables.ROTA_TABLE.Tue; break; case DayOfWeek.Wednesday: dayColumn = Tables.ROTA_TABLE.Wed; break; case DayOfWeek.Thursday: dayColumn = Tables.ROTA_TABLE.Thur; break; case DayOfWeek.Friday: dayColumn = Tables.ROTA_TABLE.Fri; break; case DayOfWeek.Saturday: dayColumn = Tables.ROTA_TABLE.Sat; break; case DayOfWeek.Sunday: dayColumn = Tables.ROTA_TABLE.Sun; break; } QueryBuilder b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.ID, Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.STAFF_TABLE.JobRole) .From(Tables.STAFF_TABLE, Tables.ROTA_TABLE) .Where( b.IsEqual(Tables.STAFF_TABLE.ID, Tables.ROTA_TABLE.StaffID), b.And(), b.IsEqual(dayColumn, 1)); CustomTableFactory ctf = new CustomTableFactory(dbCon); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { Staff s = new Staff(); s.ID = int.Parse(row[Tables.STAFF_TABLE.ID].ToString()); s.FirstName = row[Tables.STAFF_TABLE.FirstName].ToString(); s.LastName = row[Tables.STAFF_TABLE.LastName].ToString(); s.JobRole = row[Tables.STAFF_TABLE.JobRole].ToString(); if (s.JobRole == "Doctor" || s.JobRole == "Nurse") { staff.Add(s); } } foreach (Staff s in staff) { staffcomboBox1.Items.Add(string.Format("{0} {1}, {2}", s.FirstName, s.LastName, s.JobRole)); } }
private void PopulateRotaRows() { CustomTableFactory ctf = new CustomTableFactory(dbCon); QueryBuilder b = new QueryBuilder(); Column dayColumn = GetDayColumnForDay(date.DayOfWeek); b.Select(Tables.STAFF_TABLE.ID, Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.STAFF_TABLE.JobRole).From(Tables.STAFF_TABLE, Tables.ROTA_TABLE).Where( b.IsEqual(Tables.STAFF_TABLE.ID, Tables.ROTA_TABLE.StaffID), b.And(), b.IsEqual(dayColumn, 1) ); CustomTable ct = ctf.GetCustomTable(b); rotaRows = ct.GetRows(); }
/// <summary> /// Sets the next available staff ID. /// </summary> private void GetLatestStaffID() { QueryBuilder b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.ID).From(Tables.STAFF_TABLE).OrderBy(true, Tables.STAFF_TABLE.ID).Limit(1); CustomTableFactory ctf = new CustomTableFactory(dbCon); CustomTable ct = ctf.GetCustomTable(b); int id = GetInt(ct.GetRows()[0][Tables.STAFF_TABLE.ID]); if (id > nextAvailableStaffID) { nextAvailableStaffID = id; } }
public static void QuestionCaptureFunctionalKeys() { Form form = new Form(); //CREATE TABLE DataGridView table = new CustomTable(); table.Location = new Point(40, 40); table.Columns.Add("Column 1", "Column 1"); table.Rows.Add(); form.Controls.Add(table); //ADD EVENT LISTENER form.ShowDialog(); }
private void LoadDataGrid() { //select M.scientificName, M.commercialName, M.manufacturer, MI.instructions FROM Medication M, MedicationInstance MI WHERE M.id = MI.medicationID AND MI.prescriptionID = 159; CustomTableFactory ctf = new CustomTableFactory(dbCon); QueryBuilder b = new QueryBuilder(); b.Select(Tables.MEDICATION_TABLE.ScientificName, Tables.MEDICATION_TABLE.CommercialName, Tables.MEDICATION_TABLE.Manufacturer, Tables.MEDICATIONINSTANCE_TABLE.Instructions) .From(Tables.MEDICATION_TABLE, Tables.MEDICATIONINSTANCE_TABLE) .Where(b.IsEqual(Tables.MEDICATION_TABLE.ID, Tables.MEDICATIONINSTANCE_TABLE.MedicationID), b.And(), b.IsEqual(Tables.MEDICATIONINSTANCE_TABLE.PrescriptionID, prescriptionID)); CustomTable table = ctf.GetCustomTable(b); foreach (Dictionary <Column, object> row in table.GetRows()) { dataGridView1.Rows.Add(row[MEDICATION_TABLE.ScientificName], row[MEDICATION_TABLE.CommercialName], row[MEDICATION_TABLE.Manufacturer], row[MEDICATIONINSTANCE_TABLE.Instructions]); } }
private void PopulateAdminFormRota() { dataGridView1.Rows.Clear(); CustomTableFactory ctf = new CustomTableFactory(dbCon); b = new QueryBuilder(); b.Select(Tables.ROTA_TABLE.StaffID, Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.STAFF_TABLE.JobRole, Tables.ROTA_TABLE.Mon, Tables.ROTA_TABLE.Tue, Tables.ROTA_TABLE.Wed, Tables.ROTA_TABLE.Thur, Tables.ROTA_TABLE.Fri, Tables.ROTA_TABLE.Sat, Tables.ROTA_TABLE.Sun) .From(Tables.ROTA_TABLE, Tables.STAFF_TABLE).Where(b.IsEqual(Tables.STAFF_TABLE.ID, Tables.ROTA_TABLE.StaffID)); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { dataGridView1.Rows.Add(row.Values.ToArray()); } }
private void PopulateAdminMessage() { CustomTableFactory ctf = new CustomTableFactory(dbCon); b = new QueryBuilder(); b.Select(Tables.PATIENT_TABLE.ID, Tables.PATIENT_TABLE.FirstName, Tables.PATIENT_TABLE.LastName, Tables.PATIENT_TABLE.Email).From(Tables.PATIENT_TABLE); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { foreach (var value in row.Values) { Console.Write(value + " | "); } dataGridView1.Rows.Add(row.Values.ToArray()); Log.WriteLine(); } }
private void populateUpdateStaff() { CustomTableFactory ctf = new CustomTableFactory(dbCon); b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.ID, Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName).From(Tables.STAFF_TABLE); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { foreach (var value in row.Values) { //Console.Write(value + " | "); } dataGridView1.Rows.Add(row.Values.ToArray()); Log.WriteLine(); } }
/// <summary> /// Populates the appointment <see cref="System.Windows.Forms.DataGridView"/> pulling appointments /// that are between the two given dates. /// </summary> /// <param name="d1">The 'from' date.</param> /// <param name="d2">The 'to' date.</param> public void PopulateAppointments(DateTime d1, DateTime d2) { appointmentDataGridView.Rows.Clear(); selectedAppointments.Clear(); selectedAppointments = af.GetAppointmentsByDateRange(d1, d2); //DateTime today = DateTime.Today; //DateTime date = new DateTime(today.Year, today.Month, today.Day); //DateTime date2 = date.AddDays(1); DateTime date = new DateTime(d1.Year, d1.Month, d1.Day); DateTime date2 = new DateTime(d2.Year, d2.Month, d2.Day);; string date1String = date.ToString("yyyy-MM-dd"); string date2String = date2.ToString("yyyy-MM-dd"); CustomTableFactory ctf = new CustomTableFactory(dbCon); //QueryBuilder b = new QueryBuilder(); //b.Select(Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.PATIENT_TABLE.FirstName, Tables.PATIENT_TABLE.LastName, Tables.APPOINTMENT_TABLE.AppointmentDate, Tables.APPOINTMENT_TABLE.AppointmentTime) // .From(Tables.STAFF_TABLE, Tables.PATIENT_TABLE, Tables.APPOINTMENT_TABLE) // .Where(b.IsEqual(Tables.APPOINTMENT_TABLE.StaffID, Tables.STAFF_TABLE.ID), b.And(), // b.IsEqual(Tables.APPOINTMENT_TABLE.PatientID, Tables.PATIENT_TABLE.ID), b.And(), // b.IsMoreThanEqual(Tables.APPOINTMENT_TABLE.AppointmentDate,date1String),b.And(), // b.IsLessThan(Tables.APPOINTMENT_TABLE.AppointmentDate,date2String)); QueryBuilder b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.PATIENT_TABLE.FirstName, Tables.PATIENT_TABLE.LastName, Tables.APPOINTMENT_TABLE.AppointmentDate, Tables.APPOINTMENT_TABLE.AppointmentTime, Tables.APPOINTMENT_TABLE.Status, Tables.APPOINTMENT_TABLE.Cause) .From(Tables.STAFF_TABLE, Tables.PATIENT_TABLE, Tables.APPOINTMENT_TABLE) .Where(b.IsEqual(Tables.APPOINTMENT_TABLE.StaffID, Tables.STAFF_TABLE.ID), b.And(), b.IsEqual(Tables.APPOINTMENT_TABLE.PatientID, Tables.PATIENT_TABLE.ID), b.And(), b.IsBetweenDate(Tables.APPOINTMENT_TABLE.AppointmentDate, date, date2)); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { foreach (var value in row.Values) { Console.Write(value + " | "); } appointmentDataGridView.Rows.Add(row.Values.ToArray()); Log.WriteLine(); } }
private void PopulateAdminFormStaff() { dataGridView2.Rows.Clear(); CustomTableFactory ctf = new CustomTableFactory(dbCon); b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.ID, Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.STAFF_TABLE.JobRole, Tables.STAFF_TABLE.Email, Tables.STAFF_TABLE.Address, Tables.STAFF_TABLE.Postcode).From(Tables.STAFF_TABLE); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { foreach (var value in row.Values) { Console.Write(value + " | "); } dataGridView2.Rows.Add(row.Values.ToArray()); Log.WriteLine(); } }
/// <summary> /// Retrieves the stored query from the QueryBuilder and executes it against the database /// provided by the dbCon. The results are stored as a list of dictionary objects keyed to a Column. /// The value is an object. Each dictionary represents a row in table. /// </summary> /// <param name="b">The QueryBuilder object containing the SQL query to invoke against the database.</param> /// <returns>A CustomTable that has the resulting 'table' as a list of <code>Dictionary<Column, object></code></returns> public CustomTable GetCustomTable(QueryBuilder b) { List <Dictionary <Column, object> > result = new List <Dictionary <Column, object> >(); MySqlCommand query = new MySqlCommand(b.ToString(), dbCon.GetConnection()); MySqlDataReader reader = query.ExecuteReader(); while (reader.Read()) { Dictionary <Column, object> dic = new Dictionary <Column, object>(); foreach (Column c in b.GetSelectedColumns()) { dic[c] = reader[c.GetAs()]; } result.Add(dic); } reader.Close(); reader.Dispose(); CustomTable ct = new CustomTable(result); return(ct); }
private void PopulateDataGrid() { QueryBuilder b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.STAFF_TABLE.JobRole, Tables.ROTA_TABLE.Mon, Tables.ROTA_TABLE.Tue, Tables.ROTA_TABLE.Wed, Tables.ROTA_TABLE.Thur, Tables.ROTA_TABLE.Fri, Tables.ROTA_TABLE.Sat, Tables.ROTA_TABLE.Sun) .From(Tables.ROTA_TABLE, Tables.STAFF_TABLE) .Where(b.IsEqual(Tables.STAFF_TABLE.ID, Tables.ROTA_TABLE.StaffID), b.And(), b.IsEqual(Tables.STAFF_TABLE.FirstName, firstName), b.And(), b.IsEqual(Tables.STAFF_TABLE.LastName, lastName)); CustomTableFactory ctf = new CustomTableFactory(dbCon); CustomTable ct = ctf.GetCustomTable(b); if (ct.GetRows().Count == 0) { MessageBox.Show("No staff member found using those names.", "No Staff Member"); this.Close(); this.Dispose(); return; } Dictionary <Tables.Column, object> row = ct.GetRows()[0]; List <string> resultRow = new List <string>(); foreach (Column c in b.GetSelectedColumns()) { string s = ""; try { int i = int.Parse(row[c].ToString()); s = (i == 1) ? "On" : "Off"; }catch (FormatException e) { s = row[c].ToString(); } resultRow.Add(s); } dataGridView1.Rows.Add(resultRow.ToArray()); }
public void PopulateAppointments(string firstName, string lastName) { if (infoFac.GetPatientsByName(firstName, lastName).Count == 0) { MessageBox.Show("There are no patients matching that name. Please make sure your spelling is correct.", "No Patients Found"); return; } Patient p = infoFac.GetPatientsByName(firstName, lastName)[0]; int patientID = p.ID; selectedAppointments.Clear(); appointmentDataGridView.Rows.Clear(); QueryBuilder b2 = new QueryBuilder(); b2.Select(Tables.ALL).From(Tables.APPOINTMENT_TABLE).Where(b2.IsEqual(Tables.APPOINTMENT_TABLE.PatientID, patientID)); selectedAppointments = af.GetAppointments(b2); CustomTableFactory ctf = new CustomTableFactory(dbCon); QueryBuilder b = new QueryBuilder(); b.Select(Tables.STAFF_TABLE.FirstName, Tables.STAFF_TABLE.LastName, Tables.PATIENT_TABLE.FirstName, Tables.PATIENT_TABLE.LastName, Tables.APPOINTMENT_TABLE.AppointmentDate, Tables.APPOINTMENT_TABLE.AppointmentTime, Tables.APPOINTMENT_TABLE.Status, Tables.APPOINTMENT_TABLE.Cause) .From(Tables.STAFF_TABLE, Tables.PATIENT_TABLE, Tables.APPOINTMENT_TABLE) .Where(b.IsEqual(Tables.APPOINTMENT_TABLE.StaffID, Tables.STAFF_TABLE.ID), b.And(), b.IsEqual(Tables.APPOINTMENT_TABLE.PatientID, Tables.PATIENT_TABLE.ID), b.And(), b.IsEqual(Tables.PATIENT_TABLE.FirstName, firstName), b.And(), b.IsEqual(Tables.PATIENT_TABLE.LastName, lastName)); CustomTable ct = ctf.GetCustomTable(b); foreach (var row in ct.GetRows()) { foreach (var value in row.Values) { //Console.Write(value + " | "); } appointmentDataGridView.Rows.Add(row.Values.ToArray()); //Log.WriteLine(); } }
public void SetCustomTable(CustomTable _table) { table = _table; }
// Update is called once per frame void FixedUpdate() { if (name == "Parameter Reference Table") { //-------------------------------------// //If dropdown 1 is selected if (val1 != Ddown1.value) { selectedref1 = referencedObject(Ddown1); val1 = Ddown1.value; updatePopulateRow1 = true; } //Only update if dropdown1 is not "none" if (updatePopulateRow1) { int heightOfTable = GetComponent <ReferenceManager>().GetHeight(); int currentPage = GetComponent <ReferenceManager>().GetPage(); //h = 4, p = 0 ---- display aircrafts 0 - 3 ---- si >= (p*h) and si < (p*h) + h //h = 4, p = 1 ---- display aircrafts 4 - 7 retValues1 = referencingManager.GetComponent <ReferenceCalculator>().OneToManyParameterReference(selectedref1, selectedref2, currentPage, heightOfTable); GetComponent <ReferenceManager> ().SetCustomTable(retValues1); GetComponent <ReferenceManager>().PopulateRow(); } //If dropdown1 is cleared if (val1 == 0) { updatePopulateRow1 = false; selectedref1 = null; } //-------------------------------------// //-------------------------------------// //If dropdown 2 is selected if (val2 != Ddown2.value) { selectedref2 = referencedObject(Ddown2); val2 = Ddown2.value; updatePopulateRow2 = true; } //Only update if dropdown2 is not "none" if (updatePopulateRow2) { int heightOfTable = GetComponent <ReferenceManager>().GetHeight(); int currentPage = GetComponent <ReferenceManager>().GetPage(); retValues2 = referencingManager.GetComponent <ReferenceCalculator>().OneToManyParameterReference(selectedref1, selectedref2, currentPage, heightOfTable); GetComponent <ReferenceManager> ().SetCustomTable(retValues1); GetComponent <ReferenceManager>().PopulateRow(); } //If dropdown2 is cleared if (val2 == 0) { updatePopulateRow2 = false; selectedref2 = null; } } else { counter.text = refData.GetRefListCount().ToString(); if (copyClicks) { if (Input.GetMouseButtonDown(1)) { OnMouseButtonClick(1); } else { OnMouseButtonClick(0); } } } //-------------------------------------// }
private CustomBlock buildTextFromBlock(FREngine.IBlock block, int iBlock) { if (block.Type == FREngine.BlockTypeEnum.BT_Table) { FREngine.ITableBlock tableBlock = block.GetAsTableBlock(); CustomTable cstable = new CustomTable(); cstable.X = tableBlock.Region.BoundingRectangle.Left; cstable.Y = tableBlock.Region.BoundingRectangle.Top; cstable.Width = tableBlock.Region.BoundingRectangle.Width; cstable.Height = tableBlock.Region.BoundingRectangle.Height; cstable.ParentIndex = Page.Index; cstable.Index = tableIndex; tableIndex++; List <CustomBlock> blockItems = new List <CustomBlock>(); for (int iCell = 0; iCell < tableBlock.Cells.Count; iCell++) { FREngine.ITableCell cell = tableBlock.Cells[iCell]; CustomBlock csBlock = buildTextFromBlock(cell.Block, iCell); if (csBlock != null) { blockItems.Add(csBlock); //blockAll.Add(csBlock); } } var rowItemsGroup = blockItems.GroupBy(x => x.Y); int iRow = 0; foreach (var item in rowItemsGroup) { CustomRow rowItem = new CustomRow() { Width = cstable.Width, Height = item.Max(x => x.Height), BlockItems = item.ToList(), X = item.Min(x => x.X), Y = item.Min(x => x.Y), Value = string.Join("\t", item.Select(x => x.Value)), Index = iRow, ParentIndex = iBlock, }; cstable.RowItems.Add(rowItem); iRow++; } cstable.Value = string.Join("\n", cstable.RowItems.Select(x => x.Value));; // //string.Join("|", cstable.BlockItems.Select(x => x.Value)); Page.TableItems.Add(cstable); return(null); } if (block.Type != FREngine.BlockTypeEnum.BT_Text) { return(null); } CustomBlock result = new CustomBlock(); FREngine.ITextBlock textBlock = block.GetAsTextBlock(); result.Index = iBlock; result.X = textBlock.Region.BoundingRectangle.Left; result.Y = textBlock.Region.BoundingRectangle.Top; result.Width = textBlock.Region.BoundingRectangle.Width; result.Height = textBlock.Region.BoundingRectangle.Height; for (int iPar = 0; iPar < textBlock.Text.Paragraphs.Count; iPar++) { FREngine.IParagraph par = textBlock.Text.Paragraphs[iPar]; result.LineItems.AddRange(buildTextFromParagraph(par, iBlock)); } result.Value = string.Join("\n", result.LineItems.Select(x => x.Value)); return(result); }
public NewComponentIOMarshal(GrasshopperDocument document, ScriptingAncestorComponent component) { _document = document; _objectTable = _document.Objects; _component = component; }
public CustomTable OneToManyParameterReference(GameObject ref1, GameObject ref2, int currentPage, int height) { //List of CustomTable ( new class ) created. //returnTable[0] will have all rows for selection 1 of drop down //returnTable[1] will have all rows for selection 2 of drop down CustomTable refTable = new CustomTable(); // CustomTable ref2Table = new CustomTable(); if (ref1 == null && ref2 == null) { return(refTable); } else { int inactivePlanes = 0; foreach (Transform aircraft in aircraftParent.transform) { if (aircraft.gameObject.activeInHierarchy) { int SiblingIndex = aircraft.GetSiblingIndex() - inactivePlanes; //Lies between the rows to be calculated if (SiblingIndex >= (currentPage * height) && SiblingIndex < (currentPage * height) + height) { //Iterate through each aircraft in parent object and doo the calculations List <string> calculations = new List <string>(); //create new row - add aircrat name at index 0 and remaining calculations after it calculations.Add(aircraft.gameObject.GetComponent <movement>().callsign); if (ref1) { if (!ref1.activeInHierarchy) { string[] inActiveStatusArray = { "NaN", "NaN", "NaN", "NaN", "NaN", "NaN" }; calculations.AddRange(inActiveStatusArray); } else { calculations.AddRange(DoCalculations(aircraft.gameObject, ref1)); } //Add row method also keeps the counter. So we can check if a table is empty if ref1Table.RowCount = 0 } else { string[] emptyArray = { " ", " ", " ", " ", " ", " " }; calculations.AddRange(emptyArray); } if (ref2) { if (!ref2.activeInHierarchy) { string[] inActiveStatusArray = { "NaN", "NaN", "NaN", "NaN", "NaN", "NaN" }; calculations.AddRange(inActiveStatusArray); } else { calculations.AddRange(DoCalculations(aircraft.gameObject, ref2)); } } else { string[] emptyArray = { " ", " ", " ", " ", " ", " " }; calculations.AddRange(emptyArray); } refTable.AddRow(calculations); } } else { inactivePlanes++; } } //will add these tables to return table. Please see CustomTable methods to retrieve these rows. return(refTable); } }
public IndexViewBuilder(CustomTable t) { CurrentTable = t; init(); }
public DialogBoxViewBuilder(CustomTable t) { CurrentTable = t; init(); }
public virtual void VisitItem(Object item) { if (item == null) { return; } Module module = item as Module; if (module != null) { VisitModule(module); return; } Product product = item as Product; if (product != null) { VisitProduct(product); return; } Feature feature = item as Feature; if (feature != null) { VisitFeature(feature); return; } AdvtExecuteSequence advtExecuteSequence = item as AdvtExecuteSequence; if (advtExecuteSequence != null) { VisitAdvtExecuteSequence(advtExecuteSequence); return; } InstallUISequence installUISequence = item as InstallUISequence; if (installUISequence != null) { VisitInstallUISequence(installUISequence); return; } User user = item as User; if (user != null) { VisitUser(user); return; } Upgrade upgrade = item as Upgrade; if (upgrade != null) { VisitUpgrade(upgrade); return; } Directory directory = item as Directory; if (directory != null) { VisitDirectory(directory); return; } PropertyRef propertyRef = item as PropertyRef; if (propertyRef != null) { VisitPropertyRef(propertyRef); return; } WebSite webSite = item as WebSite; if (webSite != null) { VisitWebSite(webSite); return; } AdminUISequence adminUISequence = item as AdminUISequence; if (adminUISequence != null) { VisitAdminUISequence(adminUISequence); return; } CustomAction customAction = item as CustomAction; if (customAction != null) { VisitCustomAction(customAction); return; } DirectoryRef directoryRef = item as DirectoryRef; if (directoryRef != null) { VisitDirectoryRef(directoryRef); return; } AppId appId = item as AppId; if (appId != null) { VisitAppId(appId); return; } Media media = item as Media; if (media != null) { VisitMedia(media); return; } CustomTable customTable = item as CustomTable; if (customTable != null) { VisitCustomTable(customTable); return; } Condition condition = item as Condition; if (condition != null) { VisitCondition(condition); return; } SFPCatalog sFPCatalog = item as SFPCatalog; if (sFPCatalog != null) { VisitSFPCatalog(sFPCatalog); return; } UI ui = item as UI; if (ui != null) { VisitUI(ui); return; } FragmentRef fragmentRef = item as FragmentRef; if (fragmentRef != null) { VisitFragmentRef(fragmentRef); return; } Icon icon = item as Icon; if (icon != null) { VisitIcon(icon); return; } Property property = item as Property; if (property != null) { VisitProperty(property); return; } FeatureRef featureRef = item as FeatureRef; if (featureRef != null) { VisitFeatureRef(featureRef); return; } WebDirProperties webDirProperties = item as WebDirProperties; if (webDirProperties != null) { VisitWebDirProperties(webDirProperties); return; } ComplianceCheck complianceCheck = item as ComplianceCheck; if (complianceCheck != null) { VisitComplianceCheck(complianceCheck); return; } InstallExecuteSequence installExecuteSequence = item as InstallExecuteSequence; if (installExecuteSequence != null) { VisitInstallExecuteSequence(installExecuteSequence); return; } AdminExecuteSequence adminExecuteSequence = item as AdminExecuteSequence; if (adminExecuteSequence != null) { VisitAdminExecuteSequence(adminExecuteSequence); return; } Binary binary = item as Binary; if (binary != null) { VisitBinary(binary); return; } Group group = item as Group; if (group != null) { VisitGroup(group); return; } WebApplication webApplication = item as WebApplication; if (webApplication != null) { VisitWebApplication(webApplication); return; } ActionSequenceType actionSequenceType = item as ActionSequenceType; if (actionSequenceType != null) { VisitActionSequenceType(actionSequenceType); return; } ActionModuleSequenceType actionModuleSequenceType = item as ActionModuleSequenceType; if (actionModuleSequenceType != null) { VisitActionModuleSequenceType(actionModuleSequenceType); return; } BillboardAction billboardAction = item as BillboardAction; if (billboardAction != null) { VisitBillboardAction(billboardAction); return; } Error error = item as Error; if (error != null) { VisitError(error); return; } Dialog dialog = item as Dialog; if (dialog != null) { VisitDialog(dialog); return; } ProgressText progressText = item as ProgressText; if (progressText != null) { VisitProgressText(progressText); return; } TextStyle textStyle = item as TextStyle; if (textStyle != null) { VisitTextStyle(textStyle); return; } ListBox listBox = item as ListBox; if (listBox != null) { VisitListBox(listBox); return; } ListView listView = item as ListView; if (listView != null) { VisitListView(listView); return; } ComboBox comboBox = item as ComboBox; if (comboBox != null) { VisitComboBox(comboBox); return; } UIText uIText = item as UIText; if (uIText != null) { VisitUIText(uIText); return; } RadioGroup radioGroup = item as RadioGroup; if (radioGroup != null) { VisitRadioGroup(radioGroup); return; } IniFileSearch iniFileSearch = item as IniFileSearch; if (iniFileSearch != null) { VisitIniFileSearch(iniFileSearch); return; } RegistrySearch registrySearch = item as RegistrySearch; if (registrySearch != null) { VisitRegistrySearch(registrySearch); return; } ComponentSearch componentSearch = item as ComponentSearch; if (componentSearch != null) { VisitComponentSearch(componentSearch); return; } FileSearch fileSearch = item as FileSearch; if (fileSearch != null) { VisitFileSearch(fileSearch); return; } DirectorySearch directorySearch = item as DirectorySearch; if (directorySearch != null) { VisitDirectorySearch(directorySearch); return; } File file = item as File; if (file != null) { VisitFile(file); return; } Component component = item as Component; if (component != null) { VisitComponent(component); return; } Merge merge = item as Merge; if (merge != null) { VisitMerge(merge); return; } Custom custom = item as Custom; if (custom != null) { VisitCustom(custom); return; } WebError webError = item as WebError; if (webError != null) { VisitWebError(webError); return; } WebVirtualDir webVirtualDir = item as WebVirtualDir; if (webVirtualDir != null) { VisitWebVirtualDir(webVirtualDir); return; } WebDir webDir = item as WebDir; if (webDir != null) { VisitWebDir(webDir); return; } WebFilter webFilter = item as WebFilter; if (webFilter != null) { VisitWebFilter(webFilter); return; } MergeRef mergeRef = item as MergeRef; if (mergeRef != null) { VisitMergeRef(mergeRef); return; } Subscribe subscribe = item as Subscribe; if (subscribe != null) { VisitSubscribe(subscribe); return; } Publish publish = item as Publish; if (publish != null) { VisitPublish(publish); return; } TypeLib typeLib = item as TypeLib; if (typeLib != null) { VisitTypeLib(typeLib); return; } Shortcut shortcut = item as Shortcut; if (shortcut != null) { VisitShortcut(shortcut); return; } ODBCTranslator oDBCTranslator = item as ODBCTranslator; if (oDBCTranslator != null) { VisitODBCTranslator(oDBCTranslator); return; } Permission permission = item as Permission; if (permission != null) { VisitPermission(permission); return; } Class _class = item as Class; if (_class != null) { VisitClass(_class); return; } CopyFile copyFile = item as CopyFile; if (copyFile != null) { VisitCopyFile(copyFile); return; } Patch patch = item as Patch; if (patch != null) { VisitPatch(patch); return; } ODBCDriver oDBCDriver = item as ODBCDriver; if (oDBCDriver != null) { VisitODBCDriver(oDBCDriver); return; } PerfCounter perfCounter = item as PerfCounter; if (perfCounter != null) { VisitPerfCounter(perfCounter); return; } FileShare fileShare = item as FileShare; if (fileShare != null) { VisitFileShare(fileShare); return; } Certificate certificate = item as Certificate; if (certificate != null) { VisitCertificate(certificate); return; } Category category = item as Category; if (category != null) { VisitCategory(category); return; } WebAppPool webAppPool = item as WebAppPool; if (webAppPool != null) { VisitWebAppPool(webAppPool); return; } SqlString sqlString = item as SqlString; if (sqlString != null) { VisitSqlString(sqlString); return; } ServiceControl serviceControl = item as ServiceControl; if (serviceControl != null) { VisitServiceControl(serviceControl); return; } IsolateComponent isolateComponent = item as IsolateComponent; if (isolateComponent != null) { VisitIsolateComponent(isolateComponent); return; } ServiceConfig serviceConfig = item as ServiceConfig; if (serviceConfig != null) { VisitServiceConfig(serviceConfig); return; } WebProperty webProperty = item as WebProperty; if (webProperty != null) { VisitWebProperty(webProperty); return; } SqlScript sqlScript = item as SqlScript; if (sqlScript != null) { VisitSqlScript(sqlScript); return; } SqlDatabase sqlDatabase = item as SqlDatabase; if (sqlDatabase != null) { VisitSqlDatabase(sqlDatabase); return; } WebLockdown webLockdown = item as WebLockdown; if (webLockdown != null) { VisitWebLockdown(webLockdown); return; } Extension extension = item as Extension; if (extension != null) { VisitExtension(extension); return; } ReserveCost reserveCost = item as ReserveCost; if (reserveCost != null) { VisitReserveCost(reserveCost); return; } RemoveFile removeFile = item as RemoveFile; if (removeFile != null) { VisitRemoveFile(removeFile); return; } ProgId progId = item as ProgId; if (progId != null) { VisitProgId(progId); return; } Microsoft.Tools.WindowsInstallerXml.Serialize.Environment environment = item as Microsoft.Tools.WindowsInstallerXml.Serialize.Environment; if (environment != null) { VisitEnvironment(environment); return; } ServiceInstall serviceInstall = item as ServiceInstall; if (serviceInstall != null) { VisitServiceInstall(serviceInstall); return; } IniFile iniFile = item as IniFile; if (iniFile != null) { VisitIniFile(iniFile); return; } Registry registry = item as Registry; if (registry != null) { VisitRegistry(registry); return; } CreateFolder createFolder = item as CreateFolder; if (createFolder != null) { VisitCreateFolder(createFolder); return; } MIME mIME = item as MIME; if (mIME != null) { VisitMIME(mIME); return; } Verb verb = item as Verb; if (verb != null) { VisitVerb(verb); return; } }
public virtual void VisitCustomTable(CustomTable node) { VisitColumnArray(node.Column); VisitRowArray(node.Row); }
public NewComponentIOMarshal(GrasshopperDocument document, ZuiPythonComponent component) { m_document = document; m_objectTable = m_document.Objects; m_component = component; }