private static void AddDataElement(XmlDocument xmlDoc, DataShadow shadow) { XmlElement stateElement = CreateElement(xmlDoc.DocumentElement, xmlStrings.Data); stateElement.SetAttribute(xmlStrings.StateId, shadow.GetStateId()); AddTransitions(shadow, stateElement); AddDeveloperNotes(shadow.GetDeveloperNotes(), stateElement); }
private void PlayForm_Load(object sender, EventArgs e) { Table table; // State Name string stateId = shadow.GetStateId(); CommonForm.LoadStateIdTextBoxes(statePrefixTextBox, stateNumberTextBox, stateNameTextBox, stateId); // Initialize Transitions table = shadow.GetTransitions(); CommonForm.LoadTransitionDataGridView(transitionsDataGridView, table); // Developer Notes table = shadow.GetDeveloperNotes(); CommonForm.LoadDeveloperNotesTextBox(developerNotesTextBox, table); // Design Notes table = shadow.GetDesignNotes(); CommonForm.LoadDesignNotesTextBox(designNotesTextBox, table); statePrefixTextBox.Focus(); }
private static void AddDataElement(XmlDocument xmlDoc, DataShadow shadow) { XmlElement stateElement = CreateElement(xmlDoc.DocumentElement, xmlStrings.Data); stateElement.SetAttribute(xmlStrings.StateId, shadow.GetStateId()); AddTransitions(shadow, stateElement); AddDeveloperNotes(shadow.GetDeveloperNotes(), stateElement); }
private static void AddDataTable(Document doc, DataShadow dataShadow) { Selection content = doc.Application.Selection; if (addMSWordMapMarkers) { content.Font.Name = "Arial"; content.Font.Size = 2; content.Font.Color = WdColor.wdColorWhite;//change this to white late to make it more hidden content.TypeText(dataShadow.GetStateId()); content.set_Style(WdBuiltinStyle.wdStyleHeading3); content.TypeParagraph(); content = doc.Application.Selection;//re-read all current content } doc.Tables[Templates.Data].Range.Copy(); content.Bookmarks.Add("bm" + Left(AlphaNumericCharsOnly(dataShadow.GetStateId()), 38)); content.Move(WdUnits.wdStory); content.Paste(); Microsoft.Office.Interop.Word.Table wordTable = doc.Tables[doc.Tables.Count]; wordTable.Range.ParagraphFormat.KeepWithNext = -1; wordTable.Cell(1, 1).Range.InsertAfter(dataShadow.GetStateId()); FillEnteringFrom(wordTable.Cell(3, 1), dataShadow); Cell cell = wordTable.Cell(7, 1); // was 11 but I think that's wrong... Table table = dataShadow.GetDeveloperNotes(); if (!table.IsEmpty()) { string notes = table.GetData(0, (int)TableColumns.DeveloperNotes.Text); string notesDate = table.GetData(0, (int)TableColumns.DeveloperNotes.TextDateStamp); cell.Range.InsertAfter(notes); SetCellBackgroundColorIfNecessary(cell, notesDate); } table = dataShadow.GetTransitions(); FillTransitionTable(wordTable, 5, table); //SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), dataShadow.GetLastChangeDate()); SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), dataShadow.GetLastChangeVersion());//JDK added content.Move(WdUnits.wdStory); content.set_Style("Normal"); content.TypeParagraph(); content.Move(WdUnits.wdStory); }
private static void AddDataTable(Document doc, DataShadow dataShadow) { Selection content = doc.Application.Selection; doc.Tables[Templates.Data].Range.Copy(); content.Bookmarks.Add("bm" + Left(AlphaNumericCharsOnly(dataShadow.GetStateId()), 38)); content.Move(WdUnits.wdStory); content.Paste(); Microsoft.Office.Interop.Word.Table wordTable = doc.Tables[doc.Tables.Count]; wordTable.Range.ParagraphFormat.KeepWithNext = -1; wordTable.Cell(1, 1).Range.InsertAfter(dataShadow.GetStateId()); FillEnteringFrom(wordTable.Cell(3, 1), dataShadow); Cell cell = wordTable.Cell(7, 1); // was 11 but I think that's wrong... Table table = dataShadow.GetDeveloperNotes(); if (!table.IsEmpty()) { string notes = table.GetData(0, (int)TableColumns.DeveloperNotes.Text); string notesDate = table.GetData(0, (int)TableColumns.DeveloperNotes.TextDateStamp); cell.Range.InsertAfter(notes); SetCellBackgroundColorIfNecessary(cell, notesDate); } table = dataShadow.GetTransitions(); FillTransitionTable(wordTable, 5, table); SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), dataShadow.GetLastChangeDate()); content.Move(WdUnits.wdStory); content.set_Style("Normal"); content.TypeParagraph(); content.Move(WdUnits.wdStory); }