/// <summary> /// Called to calculate the size that this section requires on /// the next call to Print. This method will be called once /// prior to each call to Print. /// </summary> /// <param name="reportDocument">The parent ReportDocument that is printing.</param> /// <param name="g">Graphics object to print on.</param> /// <param name="bounds">Bounds of the area to print within. /// The bounds passed already takes the margins into account - so you cannot /// print or do anything within these margins. /// </param> /// <returns>The values for RequireSize, Fits and Continues for this section.</returns> protected override SectionSizeValues DoCalcSize( ReportDocument reportDocument, Graphics g, Bounds bounds ) { // Take offset into account... bounds.Position.X += OffsetLeft; bounds.Position.Y += OffsetTop; SectionSizeValues retval = new SectionSizeValues(); // need to determine what to do with these values... retval.Fits = true; retval.Continued = false; SizeF contentSize = new SizeF(0, 0); if (CurrentSection != null) { CurrentSection.CalcSize(reportDocument, g, GetMaxContentBounds(bounds)); contentSize = CurrentSection.Size; // or could use RequiredSize? } this.borderBounds = GetBorderBounds(bounds, contentSize); this.paddingBounds = border.GetInnerBounds(this.borderBounds); this.contentBounds = paddingBounds.GetBounds(PaddingTop, PaddingRight, PaddingBottom, PaddingLeft); retval.RequiredSize = this.borderBounds.GetSizeF(); return(retval); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return(true); } if (line.Contains("TEXTBAUSTEIN")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } return(false); }
public void Refresh() { lock (m_Lock) { StreamReader sr = null; try { m_Sections.Clear(); try { sr = new StreamReader(FileName); } catch (FileNotFoundException) { return; } Dictionary <string, string> CurrentSection = null; string s; string SectionName; string Key = null; string Value = null; while ((s = sr.ReadLine()) != null) { s = s.Trim(); SectionName = ParseSectionName(s); if (SectionName != null) { if (m_Sections.ContainsKey(SectionName)) { CurrentSection = null; } else { CurrentSection = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); m_Sections.Add(SectionName, CurrentSection); } } else if (CurrentSection != null) { if (ParseKeyValuePair(s, ref Key, ref Value)) { if (!CurrentSection.ContainsKey(Key)) { CurrentSection.Add(Key, Value); } } } } } finally { if (sr != null) { sr.Close(); } sr = null; } } }
public override Section GetSection(string name) { if (!Options.CaseSensitive) { name = name.ToLowerInvariant(); } // the wanted section might not be completely parsed yet if (CurrentSection.Equals(name, StringComparison)) { ParseCurrentSection(); return(Sections[name]); } if (Sections.TryGetValue(name, out var section)) { return(section); } if (!ParseSection(name)) { throw new ArgumentException($"section not found: {name}", nameof(name)); } return(Sections[name]); }
public override void DoSettingsWindowContents(Rect inRect) { base.DoSettingsWindowContents(inRect); Listing_Standard listingStandard = new Listing_Standard(); Rect menuRect = inRect.ContractedBy(10f); menuRect.y += 20f; menuRect.height -= 20f; Widgets.DrawMenuSection(menuRect); TabDrawer.DrawTabs(menuRect, tabs, 200f); CurrentSection.DrawSection(menuRect); /* Reset Buttons */ float padding = ResetImageSize + 5; Rect resetAllButton = new Rect(menuRect.width - padding, menuRect.y + 15, ResetImageSize, ResetImageSize); Rect resetButton = new Rect(resetAllButton.x - padding, resetAllButton.y, ResetImageSize, ResetImageSize); listingStandard.Begin(resetAllButton); if (listingStandard.ButtonImage(VehicleTex.ResetPage, ResetImageSize, ResetImageSize)) { List <FloatMenuOption> options = CurrentSection.ResetOptions.ToList(); FloatMenu floatMenu = new FloatMenu(options) { vanishIfMouseDistant = true }; //floatMenu.onCloseCallback... Find.WindowStack.Add(floatMenu); } listingStandard.End(); }
public void AddDescription(string text) { if (!string.IsNullOrEmpty(text)) { CurrentSection.AddParagraph(text).Style = _descriptionStyle.Name; } }
} // AdvancePointers /// <summary> /// Sizes all the sections that fit within a single row/column /// </summary> /// <param name="reportDocument">Parent ReportDocument</param> /// <param name="g">Graphics object for sizing / printing</param> /// <param name="bounds">The bounds the line must fit within</param> /// <param name="sizeOnly">Indicates that no printing should be done, /// just size the line</param> /// <param name="advanceSectionIndex">Advance the section index, /// so that it's ready for the next line</param> /// <returns>Size and flags for if it fits and if it's continued</returns> protected SectionSizeValues SizePrintLine( ReportDocument reportDocument, Graphics g, Bounds bounds, bool sizeOnly, bool advanceSectionIndex ) { SectionSizeValues retvals = new SectionSizeValues(); retvals.Fits = false; int savedSectionIndex = this.sectionIndex; // Debug.WriteLine("\nEntering " + Direction + " section, sizeonly = " + sizeOnly); // Debug.WriteLine(" Bounds: " + bounds); // The following loop sizes all sections that fit on one line // If it runs out of room within the current bounds, it returns // and will continue where it left off on the next call. while (this.sectionIndex < this.SectionCount) { CurrentSection.CalcSize(reportDocument, g, bounds); if (CurrentSection.Fits) { retvals.Fits = true; if (!sizeOnly) { CurrentSection.Print(reportDocument, g, bounds); } AdvancePointers(CurrentSection.Size, ref bounds, ref retvals.RequiredSize); if (CurrentSection.Continued) { break; } else { this.sectionIndex++; } } else // it doesn't fit { // reset size since we didn't print but need the size to be // refigured next time CurrentSection.ResetSize(); break; } } // while // Debug.WriteLine("Leaving " + Direction + " section"); // Debug.WriteLine(" Size: " + RequiredSize); retvals.Continued = this.sectionIndex < this.SectionCount; if (!advanceSectionIndex) { this.sectionIndex = savedSectionIndex; } return(retvals); } // SizePrintLine
/// <summary> /// Resets the size of the section, that is, it enforces /// that a call to CalcSize() will actully have an effect, /// and not just use a stored value. /// </summary> public override void ResetSize() { base.ResetSize(); if (CurrentSection != null) { CurrentSection.ResetSize(); } }
ExportContainer CreateContainerForSection(ExportPage parent, Point location) { var detail = (ExportContainer)CurrentSection.CreateExportColumn(); detail.Location = location; detail.Parent = parent; return(detail); }
public ObjectDB Select(Address address) { if (CurrentSection.Address != address.XX) { throw new Exception("Обращение к заявленной секции невозможно!"); } return(CurrentSection.Get(address.AsPosition())); }
private void Refresh() { lock (_lock) { StringReader sr = null; try { _sections.Clear(); _modified.Clear(); sr = new StringReader(IniString); Dictionary <string, string> CurrentSection = null; string s; string SectionName; string Key = null; string Value = null; while ((s = sr.ReadLine()) != null) { s = s.Trim(); SectionName = ParseSectionName(s); if (SectionName != null) { if (_sections.ContainsKey(SectionName)) { CurrentSection = null; } else { CurrentSection = new Dictionary <string, string>(); _sections.Add(SectionName, CurrentSection); } } else if (CurrentSection != null) { if (ParseKeyValuePair(s, ref Key, ref Value)) { if (!CurrentSection.ContainsKey(Key)) { CurrentSection.Add(Key, Value); } } } } } finally { if (sr != null) { sr.Close(); } sr = null; } } }
private static void ParametrIsMatch(ref string clearLine) { if (ParametrPattern.IsMatch(clearLine)) { var param = clearLine.Split(' '); var key = param[0]; var value = param[2]; CurrentSection.Add(key, value); } }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { //MI TTE I LER must be considered when using tesseract because of recognition problems. if (line.Contains("MITTEILER") || line.Contains("M I TTE I LER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; //Is not true but only works that way keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; //Is not true but only works that way keywordsOnly = true; return(true); } if (line.Contains("PATIENT")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return(true); } if (line.Contains("ENDE FAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } return(false); }
private bool GetSection(string line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = false; return(true); } if (line.Contains("OBJEKTINFO")) { section = CurrentSection.Objektinfo; keywordsOnly = false; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return(true); } if (line.Contains("ENDE ALARMFAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } return(false); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = false; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return(true); } if (line.Contains("TEXTBAUSTEINE")) { section = CurrentSection.HTextbausteine; keywordsOnly = false; return(true); } if (line.Contains("ENDE FAX")) { section = CurrentSection.IFooter; keywordsOnly = false; return(true); } return(false); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("KOORDINATEN")) { section = CurrentSection.CKoordinaten; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.DEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.EZielort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.FEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNGEN")) { section = CurrentSection.GBemerkungen; keywordsOnly = false; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.HEinsatzmittel; keywordsOnly = true; return(true); } if (line.Contains("ENDE ALARMFAX")) { section = CurrentSection.ZFooter; keywordsOnly = false; return(true); } return(false); }
/// <summary> /// Writes the specified expression. /// </summary> /// <param name="expression">The expression to write.</param> /// <returns>The number of written characters.</returns> private int WriteExpression(CurrentSection expression) { #region Contract if (expression == null) { return(0); } #endregion Writer.Write("$$"); return(2); }
void UpdateSection(CurrentSection section) { // Update the current user section to the defined UserSection = section; // Dispose all controls of the hoster foreach (Control c in HostingPanel.Controls) { c.Dispose(); } // Remove every control list inside the hoster HostingPanel.Controls.Clear(); // Disable every button btnGameLicensingSetup.BackColor = Color.Black; btnGameNewsSetup.BackColor = Color.Black; btnGameUpdatesSetup.BackColor = Color.Black; btnLauncherAPIIntegrations.BackColor = Color.Black; btnLauncherDesign.BackColor = Color.Black; // Switch cases to update each section switch (section) { case 0: { // The default case will be the update section btnGameUpdatesSetup.BackColor = Color.Teal; // Add the Game Update user control to the hoster panel IW_UC_GameSetup GameSetupHost = new IW_UC_GameSetup(); HostingPanel.Controls.Add(GameSetupHost); break; } case CurrentSection.GameLicensingSetup: { // Update the game licensing button btnGameLicensingSetup.BackColor = Color.Teal; // Add the Game Update user control to the hoster panel IW_UC_GameLicensingSetup GameSetupHost = new IW_UC_GameLicensingSetup(); HostingPanel.Controls.Add(GameSetupHost); break; } } }
private void SetSection(int index) { int preButtonIndex = 0; Section[] sections = allSectionsInLayers[currentLayer].ToArray(); int lastIndex = currentSectionIndex < 0 ? 0 : currentSectionIndex; lastIndex = index >= 0 ? lastIndex : -1; int targetIndex = currentSectionIndex; if (CurrentSection != null) { preButtonIndex = CurrentSection.CurrentButtonIndex; CurrentSection.SetCurrentButton(-1); } targetIndex = sections.GetClampedIndex(index); SetCurrentSection(targetIndex); bool available = index >= 0; if (available) { if (CurrentSection == null || !CurrentSection.Active) { targetIndex = lastIndex; available = false; int dir = (index - targetIndex); dir = (int)Mathf.Sign(dir); Section testSection = null; for (int i = 1; i < sections.Length; i++) { testSection = sections.GetLoop(targetIndex + (dir * i)); if (testSection != null && testSection.Active) { available = true; targetIndex = sections.GetIndexOf(testSection); break; } } } } if (!available) { targetIndex = lastIndex; } SetCurrentSection(targetIndex); CurrentSection.SetCurrentButton(preButtonIndex); }
/// <summary> /// This function will take the inf and parse it into InfSection's. /// /// The sections can then be ordered to create an execution order. /// </summary> public void ParseIntoSections( ) { String InfLine; StreamReader InfReader = new StreamReader(InfPath); InfSection CurrentSection = null; while ((InfLine = InfReader.ReadLine()) != null) { InfLine = InfLine.Trim(); if (InfLine.Length == 0) { //Add the current section to the list of sections. if (CurrentSection != null) { InfSections.Add(CurrentSection); CurrentSection = null; } continue; } if (InfLine[0] == '[') { //if there can be sections without whitespace between them //the code above to add the current section to InfSections must be added CurrentSection = new InfSection(InfLine.Substring(1, InfLine.IndexOf(']') - 1)); } else if (InfLine[0] == ';') { continue; } else { CurrentSection.AddLine(InfLine); } } if (CurrentSection != null) { //there was no whitespace after the last section //add the section to the list InfSections.Add(CurrentSection); } InfReader.Close(); }
public void ProcessCurrentSection() { var name = CurrentSection.ToString(); var doublePointSplit = name.Split(':'); if (doublePointSplit.Length > 1) { name = doublePointSplit[0]; } if (!FormatPlaceholders.Contains(name)) { FormatPlaceholders.Add(name); } ClearCurrentSection(); }
private static bool GetSection(string line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; // Is not true but only works that way. keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; // Is not true but only works that way. keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return(true); } if (line.Contains("ENDE FAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } return(false); }
/// <summary> /// Called to actually print this section. /// </summary> /// <param name="reportDocument">The parent ReportDocument that is printing.</param> /// <param name="g">Graphics object to print on.</param> /// <param name="bounds">Bounds of the area to print within. /// These bounds already take the margins into account. /// </param> protected override void DoPrint( ReportDocument reportDocument, Graphics g, Bounds bounds ) { border.DrawBorder(g, this.borderBounds); if (Background != null) { g.FillRectangle(Background, this.paddingBounds.GetRectangleF()); } if (CurrentSection != null) { CurrentSection.Print(reportDocument, g, this.contentBounds); } }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.ToUpper().Contains("FUNKRUFNAME")) { section = CurrentSection.BEinsatzmittel; keywordsOnly = false; return(true); } if (line.ToUpper().Contains("ÖRTLICHE EINSATZINFORMATIONEN")) { section = CurrentSection.CLink; keywordsOnly = false; return(true); } return(false); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly, ref bool multiLineProperties) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; multiLineProperties = false; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; multiLineProperties = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.DEinsatzgrund; multiLineProperties = false; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.EEinsatzmittel; multiLineProperties = false; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.FBemerkung; multiLineProperties = false; keywordsOnly = false; return(true); } if (line.Contains("ENDE ALARMFAX — V2.0")) { section = CurrentSection.GFooter; multiLineProperties = false; keywordsOnly = false; return(true); } return(false); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.DEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.EEinsatzmittel; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.FBemerkung; keywordsOnly = false; return(true); } if (line.Contains("EINSATZHINWEIS")) { section = CurrentSection.GHinweis; keywordsOnly = false; return(true); } if (line.Contains("ENDE ALARMFAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return(true); } return(false); }
protected override void SeekInternal(Timing seekTiming, int sequenceIndex = 0) { sectionIndex_ = sequenceIndex; int seekSample = CurrentSection.GetSampleFromTiming(seekTiming); for (int i = 0; i < NumTracks; ++i) { if (i < CurrentSection.Clips.Length) { musicSources_[i].clip = CurrentSection.Clips[i]; musicSources_[i].timeSamples = seekSample; } else { musicSources_[i].clip = null; } } }
public void SendtoAutoCAD(PlanSwift.Item AItem) { PlanSwift.ISection CurrentSection; PlanSwift.INode CurrentNode; int ItemDigiType, SectionIndex, NodeIndex; double Xscale, Yscale; float nx, ny; object StartNode, EndNode; if (AItem.DigiType != 3) { ItemDigiType = AItem.DigiType; switch (ItemDigiType) { // IF Digitizer type is "Area" do something case 0: for (SectionIndex = 0; SectionIndex <= AItem.Sections.Count - 1; SectionIndex++) { CurrentSection = AItem.Sections[SectionIndex]; StartNode = CurrentSection.Nodes[0].Point; EndNode = CurrentSection.Nodes[CurrentSection.Nodes.Count - 1].Point; double[] SP = new double[((CurrentSection.Nodes.Count + 1) * 2)]; Xscale = CurrentSection.Page().ScaleX; Yscale = CurrentSection.Page().ScaleY; //Loop Though all nodes in current section for (NodeIndex = 0; NodeIndex <= CurrentSection.Nodes.Count - 1; NodeIndex++) { CurrentNode = CurrentSection.Nodes[NodeIndex]; nx = CurrentNode.x; ny = -CurrentNode.y; SP[NodeIndex * 2] = (nx / Xscale) * 12; SP[NodeIndex * 2 + 1] = (ny / Yscale) * 12; } //Close lines of the area SP[SP.Length - 2] = (CurrentSection.Nodes[0].x / Xscale) * 12; SP[SP.Length - 1] = (-CurrentSection.Nodes[0].y / Yscale) * 12; AuDocument.ModelSpace.AddLightWeightPolyline(SP); } break; } } }
private void SectionChecker() { if (SelectedSection == null) { SaveSection(); } else { if (CurrentSection.Equals(SelectedSection)) { MessageBox.Show("Updated"); } else { UpdateSection(); } } SelectedSection = null; CurrentSection = null; SecView.Close(); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return(true); } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return(true); } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; keywordsOnly = true; return(true); } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return(true); } if (line.Contains("BEMERKUNG")) { section = CurrentSection.FBemerkung; keywordsOnly = false; return(true); } if (line.Contains("DISPOLISTE")) { section = CurrentSection.GEinsatzmittel; keywordsOnly = true; return(true); } return(false); }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return true; } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return true; } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.DEinsatzgrund; keywordsOnly = true; return true; } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.EEinsatzmittel; keywordsOnly = true; return true; } if (line.Contains("BEMERKUNG")) { section = CurrentSection.FBemerkung; keywordsOnly = false; return true; } if (line.Contains("ENDE ALARMFAX — V2.0")) { section = CurrentSection.GFooter; keywordsOnly = false; return true; } return false; }
private bool GetSection(String line, ref CurrentSection section, ref bool keywordsOnly) { //MI TTE I LER must be considered when using tesseract because of recognition problems. if (line.Contains("MITTEILER") || line.Contains("M I TTE I LER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return true; } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; //Is not true but only works that way keywordsOnly = true; return true; } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return true; } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = true; return true; } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return true; } if (line.Contains("ENDE FAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return true; } return false; }
private bool GetSection(String line, ref CurrentSection section, out bool keywordsOnly) { if (line.Contains("MITTEILER")) { section = CurrentSection.BMitteiler; keywordsOnly = true; return true; } if (line.Contains("EINSATZORT")) { section = CurrentSection.CEinsatzort; keywordsOnly = true; return true; } if (line.Contains("ZIELORT")) { section = CurrentSection.DZielort; keywordsOnly = true; return true; } if (line.Contains("EINSATZGRUND")) { section = CurrentSection.EEinsatzgrund; keywordsOnly = true; return true; } if (line.Contains("EINSATZMITTEL")) { section = CurrentSection.FEinsatzmittel; keywordsOnly = true; return true; } if (line.Contains("BEMERKUNG")) { section = CurrentSection.GBemerkung; keywordsOnly = false; return true; } if (line.Contains("ENDE FAX")) { section = CurrentSection.HFooter; keywordsOnly = false; return true; } keywordsOnly = true; return false; }
/// <summary> /// Writes the specified expression. /// </summary> /// <param name="expression">The expression to write.</param> /// <returns>The number of written characters.</returns> private int WriteExpression(CurrentSection expression) { #region Contract if (expression == null) return 0; #endregion Writer.Write("$$"); return 2; }