private static void AddDecisionElement(XmlDocument xmlDoc, DecisionShadow shadow) { XmlElement stateElement = CreateElement(xmlDoc.DocumentElement, xmlStrings.Decision); 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 AddDecisionTable(Document doc, DecisionShadow decisionShadow) { 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(decisionShadow.GetStateId()); content.set_Style(WdBuiltinStyle.wdStyleHeading3); content.TypeParagraph(); content = doc.Application.Selection;//re-read all current content } doc.Tables[Templates.Decision].Range.Copy(); content.Bookmarks.Add("bm" + Left(AlphaNumericCharsOnly(decisionShadow.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(decisionShadow.GetStateId()); FillEnteringFrom(wordTable.Cell(3, 1), decisionShadow); Cell cell = wordTable.Cell(7, 1); Table table = decisionShadow.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 = decisionShadow.GetTransitions(); FillTransitionTable(wordTable, 5, table); //SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), decisionShadow.GetLastChangeDate()); SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), decisionShadow.GetLastChangeVersion());//JDK added content.Move(WdUnits.wdStory); content.set_Style("Normal"); content.TypeParagraph(); content.Move(WdUnits.wdStory); }
private static void AddDecisionTable(Document doc, DecisionShadow decisionShadow) { Selection content = doc.Application.Selection; doc.Tables[Templates.Decision].Range.Copy(); content.Bookmarks.Add("bm" + Left(AlphaNumericCharsOnly(decisionShadow.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(decisionShadow.GetStateId()); FillEnteringFrom(wordTable.Cell(3, 1), decisionShadow); Cell cell = wordTable.Cell(7, 1); Table table = decisionShadow.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 = decisionShadow.GetTransitions(); FillTransitionTable(wordTable, 5, table); SetCellBackgroundColorIfNecessary(wordTable.Cell(1, 1), decisionShadow.GetLastChangeDate()); content.Move(WdUnits.wdStory); content.set_Style("Normal"); content.TypeParagraph(); content.Move(WdUnits.wdStory); }