Exemplo n.º 1
0
        private void LoadAllFonts(string FontPath, DirectoryInfo di, string FontExtension, Boolean ErrorIfEmpty)
        {
            // Create an array representing the files in the current directory.
            FileInfo[] fi = di.GetFiles(FontExtension);
            if (ErrorIfEmpty && fi.Length == 0)
            {
                FlxMessages.ThrowException(FlxErr.ErrEmptyFolder, FontPath, FontExtension);
            }


            foreach (FileInfo fontFile in fi)
            {
                if (FFontFiles.ContainsKey(fontFile.Name))
                {
                    continue;
                }

                FFontFiles.Add(fontFile.Name, null);
                try
                {
                    LoadFont(fontFile.FullName);
                }
                catch (Exception ex)
                {
                    //Invalid font. nothing to do, just continue reading the other fonts.
                    // What we will do is just ignore it here, and throw an exception when (and if) the user actually tries to use this font.

                    if (FlexCelTrace.HasListeners)
                    {
                        FlexCelTrace.Write(new TPdfCorruptFontInFontFolderError(ex.Message, fontFile.FullName));
                    }
                }
            }
        }
Exemplo n.º 2
0
 private void CheckConnected()
 {
     if (CurrentChart == null)
     {
         FlxMessages.ThrowException(FlxErr.ErrNotConnected);
     }
 }
Exemplo n.º 3
0
 public override void Flush()
 {
     if (HelperStream != null)
     {
         FlxMessages.ThrowException(FlxErr.ErrInternal);
     }
     VirtualStream.Flush();
 }
Exemplo n.º 4
0
 /// <summary>
 /// This method will be called each time that the master datasource moves its position. Use it to filter the data returned
 /// if this is used on a master-detail relationship.
 /// </summary>
 /// <remarks>
 /// You do not need to implement this method if you are not using Master-Detail or Split relationships.</remarks>
 /// <param name="masterDetailLinks">List of all the master tables that are related to this one.
 /// If there are no parents on this VirtualDataTableState, this will be an empty array, not null.
 /// Use it on <see cref="GetValue"/> to filter the data and then return only the records that satisfy the master-detail relationships on <see cref="GetValue"/>
 /// </param>
 /// <param name="splitLink">Parent Split table if this dataset is on a Split relationship, or null if there is none.
 /// Use it to know how many records you should retun on <see cref="RowCount"/>. Note that a table might be on Master-Detail relationship
 /// *and* split relationship. In this case you need to first filter the records that are on the master detail relationship, and then apply the split to them.
 /// </param>
 public virtual void MoveMasterRecord(TMasterDetailLink[] masterDetailLinks, TSplitLink splitLink)
 {
     if (masterDetailLinks == null)
     {
         return;
     }
     for (int i = 0; i < masterDetailLinks.Length; i++)
     {
         if (masterDetailLinks[i].ParentDataSource.RowCount != 0)                  //Avoid throwing an exception if there is actually only one master record.
         {
             FlxMessages.ThrowException(FlxErr.ErrTableDoesNotSupportMasterDetail, FTableData.TableName);
         }
     }
 }