Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
    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;
            }
        }
    }
Ejemplo n.º 4
0
        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]);
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
 public void AddDescription(string text)
 {
     if (!string.IsNullOrEmpty(text))
     {
         CurrentSection.AddParagraph(text).Style = _descriptionStyle.Name;
     }
 }
Ejemplo n.º 7
0
        } // 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
Ejemplo n.º 8
0
 /// <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();
     }
 }
Ejemplo n.º 9
0
        ExportContainer CreateContainerForSection(ExportPage parent, Point location)
        {
            var detail = (ExportContainer)CurrentSection.CreateExportColumn();

            detail.Location = location;
            detail.Parent   = parent;
            return(detail);
        }
Ejemplo n.º 10
0
        public ObjectDB Select(Address address)
        {
            if (CurrentSection.Address != address.XX)
            {
                throw new Exception("Обращение к заявленной секции невозможно!");
            }

            return(CurrentSection.Get(address.AsPosition()));
        }
Ejemplo n.º 11
0
        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;
                }
            }
        }
Ejemplo n.º 12
0
 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);
     }
 }
Ejemplo n.º 13
0
 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);
 }
Ejemplo n.º 14
0
        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);
        }
Ejemplo n.º 15
0
        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);
        }
Ejemplo n.º 16
0
 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);
 }
Ejemplo n.º 17
0
        /// <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);
        }
Ejemplo n.º 18
0
        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;
            }
            }
        }
Ejemplo n.º 19
0
        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);
        }
Ejemplo n.º 20
0
        /// <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();
        }
Ejemplo n.º 21
0
        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();
        }
Ejemplo n.º 22
0
 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);
 }
Ejemplo n.º 23
0
 /// <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);
     }
 }
Ejemplo n.º 24
0
 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);
 }
Ejemplo n.º 25
0
        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);
        }
Ejemplo n.º 26
0
 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);
 }
Ejemplo n.º 27
0
    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;
            }
        }
    }
Ejemplo n.º 28
0
        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;
                }
            }
        }
Ejemplo n.º 29
0
 private void SectionChecker()
 {
     if (SelectedSection == null)
     {
         SaveSection();
     }
     else
     {
         if (CurrentSection.Equals(SelectedSection))
         {
             MessageBox.Show("Updated");
         }
         else
         {
             UpdateSection();
         }
     }
     SelectedSection = null;
     CurrentSection  = null;
     SecView.Close();
 }
Ejemplo n.º 30
0
 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);
 }
Ejemplo n.º 31
0
 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;
 }
Ejemplo n.º 32
0
 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;
 }
Ejemplo n.º 33
0
 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;
 }
Ejemplo n.º 34
0
        /// <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;
        }