public DIExcelCellMapping(CellMappingType cellType, SheetType sheetType, string cellAddress, string cellValue)
     : base(cellAddress,cellValue)
 {
     this.CurrentCellMappingType = cellType;
     this.CurrentSheetType = sheetType;
     this.CellAddress = cellAddress;
 }
Example #2
0
        public Sheet(IList<Kana> kanas, int pages, int questionsOnARow, SheetType type = SheetType.Kana, bool includePageNumbers = true, bool includeAnswerSheets = false)
        {
            kanas = kanas.Where(x => x.Group != KanaGroup.Empty).ToList();
            Pages = new List<SheetPage>();
            var sheetType = type;
            bool evenRow = false;
            for (var pageCount = 1; pageCount <= pages; pageCount++)
            {
                var page = new SheetPage();
                page.PageNumber = pageCount;
                for (var rowCount = 1; rowCount <= 8; rowCount++)
                {
                    if(type == SheetType.Alternate && evenRow)
                        sheetType = SheetType.Kana;
                    if(type == SheetType.Alternate && !evenRow)
                        sheetType = SheetType.Romaji;

                    page.Rows.Add(new KanaRow(kanas.RandomItems(questionsOnARow), sheetType));
                    evenRow = !evenRow;
                }
                Pages.Add(page);
            }

            Type = type;
            QuestionOnARow = questionsOnARow;
            IncludePageNumbers = includePageNumbers;
            IncludeAnswerSheets = includeAnswerSheets;
        }
Example #3
0
		public SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
		{
			channel = TextureChannel.Red;
			type = t;
			current = allocateSheet();
			this.allocateSheet = allocateSheet;
		}
Example #4
0
 public BlankConfig Get(BlankType blankType, SheetType sheetType)
 {
     return
         (BlankConfig) BaseGet(GetKey(blankType, sheetType))
         ??
         (BlankConfig) BaseGet(GetKey(blankType, SheetType.Undefined));
 }
Example #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="name">Nom de la feuille</param>
 /// <param name="type">Sens des en tete des données (verticale ou horizontal)</param>
 /// <param name="nbColumn">Nbre de colonne ou de ligne de la feuille, selon le sens</param>
 /// <param name="header">L'entete de la feuille (OUI/NON)</param>
 /// <param name="headerLevel">Niveau de l'entete. A partir de quelle ligne ou colonne seront limitées les données de l'entete</param>
 /// <param name="isUnitLine"></param>
 /// <param name="?"></param>
 public SheetAttribute(string name, SheetType type, int nbColumn, bool header=false, int headerLevel=0, bool isUnitLine=false, bool isMultiLines=true)
 {
     Name = name;
     Type = type;
     NbColumns = nbColumn;
     Header = header;
     HeaderLevel = headerLevel;
     IsUnitsLine = isUnitLine;
     IsMultiLines = isMultiLines;
 }
Example #6
0
        public Sheet(SheetType type, Stream stream)
        {
            using (var bitmap = (Bitmap)Image.FromStream(stream))
            {
                Size = bitmap.Size;
                data = new byte[4 * Size.Width * Size.Height];

                Util.FastCopyIntoSprite(new Sprite(this, bitmap.Bounds(), TextureChannel.Red), bitmap);
            }

            Type = type;
            ReleaseBuffer();
        }
Example #7
0
        public Sheet(SheetType type, Stream stream)
        {
            using (var bitmap = (Bitmap)Image.FromStream(stream))
            {
                Size = bitmap.Size;
                data = new byte[4 * Size.Width * Size.Height];

                Util.FastCopyIntoSprite(new Sprite(this, bitmap.Bounds(), TextureChannel.Red), bitmap);
            }

            Type = type;
            ReleaseBuffer();
        }
Example #8
0
        public void ConstructSaveLoad()
        {
            Sheet sheet = new Sheet();
            Sheet loadedSheet;

            SaveLoadSheet(sheet, out loadedSheet);

            foreach (SheetType sheetType in SheetType.GetValues(typeof(SheetType)))
            {
                sheet = new Sheet(sheetType);
                SaveLoadSheet(sheet, out loadedSheet);
            }
        }
Example #9
0
 public FrmSheetMapUserSet(AxMapControl inAxMapControl, Form inForm, Plugin.Application.IApplicationRef inHook, SheetType inST)
 {
     InitializeComponent();
     //isOK = false;
     //cBoxScale.SelectedIndex = 0;
     //curMapName = incurMapName;
     pAxMapControl              = inAxMapControl;
     hook                       = inHook;
     pMainForm                  = inForm;
     sheetType                  = inST;
     pAxMapControl.OnMouseDown += new
                                  IMapControlEvents2_Ax_OnMouseDownEventHandler(pAxMapControl_OnMouseDown);//订阅事件
 }
Example #10
0
 public BzffOutMap(string inMapNo, int inScale, IPoint inPoint, SheetType inST)
 {
     base._Name    = "GeoDataManagerFrame.BzffOutMap";
     base._Caption = "标准分幅制图";
     base._Tooltip = "标准分幅制图";
     base._Checked = false;
     base._Visible = true;
     base._Enabled = true;
     base._Message = "标准分幅制图";
     pMapNo        = inMapNo;
     pScale        = inScale;
     pPoint        = inPoint;
     sheetType     = inST;
 }
        /// <summary>
        /// The constructor for the record.
        /// </summary>
        /// <param name="biff">The GenericBiff record that should contain the correct type and data for the BOUNDSHEET record.</param>
        /// <exception cref="InvalidRecordIdException">
        /// An InvalidRecordIdException is thrown if biff contains an invalid type or invalid data.
        /// </exception>
        public BoundSheetRecord(GenericBiff biff)
        {
            if (biff.Id == (ushort)RecordType.Boundsheet)
            {
                BinaryReader reader = new BinaryReader(biff.GetDataStream());
                _bofPos = reader.ReadUInt32();
                _visibility = (VisibilityType)reader.ReadByte();
                _type = (SheetType)reader.ReadByte();

                byte len = reader.ReadByte();
                _name = Reader.ReadPossibleCompressedString(reader, len);
            }
            else
                throw new InvalidRecordIdException(biff.Id, RecordType.Boundsheet);
        }
    /// <summary>
    /// Load sprites from the given source
    /// </summary>
    /// <remarks>
    /// Load sprites which can be drawn to display or offscreen surfaces. This method is used to load both <b>SheetType.SpriteSheet</b> and <b>SheetType.SpritePack</b>.
    /// There are various asset sources supported:
    /// <list type="bullet">
    /// <item><b>Resources</b> - Synchronously loaded sprite assets from a <b>Resources</b> folder. This was the only asset source supported in RetroBlit prior to 3.0.</item>
    /// <item><b>ResourcesAsync</b> - Asynchronously loaded sprite assets from a <b>Resources</b> folder.</item>
    /// <item><b>WWW</b> - Asynchronously loaded sprite assets from a URL.</item>
    /// <item><b>AddressableAssets</b> - Asynchronously loaded sprite assets from Unity Addressable Assets.</item>
    /// <item><b>Existing Assets</b> - Synchronously loaded sprite assets from an existing Unity <b>Texture2D</b> or <b>RenderTexture</b>.</item>
    /// </list>
    ///
    /// If the asset is loaded via a synchronous method then <b>Load</b> will block until the loading is complete.
    /// If the asset is loaded via an asynchronous method then <b>Load</b> will immediately return and the asset loading will
    /// continue in a background thread. The status of an asynchronous loading asset can be check by looking at <see cref="RBAsset.status"/>,
    /// or by using the event system with <see cref="RBAsset.OnLoadComplete"/> to get a callback when the asset is done loading.
    ///
    /// <seedoc>Features:Sprites</seedoc>
    /// <seedoc>Features:Asynchronous Asset Loading</seedoc>
    /// </remarks>
    /// <code>
    /// SpriteSheetAsset spriteMain = new SpriteSheetAsset();
    ///
    /// public void Initialize()
    /// {
    ///     // Load asset from Resources asynchronously. This method call will immediately return without blocking.
    ///     spriteMain.Load("main_spritepack", RB.SheetType.SpritePack, RB.AssetSource.ResourcesAsync);
    /// }
    ///
    /// public void Render()
    /// {
    ///     // Don't draw anything until sprites are loaded
    ///     if (spriteMain.status != RB.AssetStatus.Ready)
    ///     {
    ///         return;
    ///     }
    ///
    ///     RB.SpriteSheetSet(spriteMain);
    ///     RB.DrawSprite("hero/walk1", playerPos);
    /// }
    /// </code>
    /// <param name="path">Path of the sprite sheet</param>
    /// <param name="sheetType">The type of sprite sheet, either <see cref="SheetType.SpriteSheet"/> or <see cref="SheetType.SpritePack"/></param>
    /// <param name="source">Source type of the asset</param>
    /// <returns>Load status</returns>
    /// <seealso cref="RB.Result"/>
    /// <seealso cref="RB.AssetStatus"/>
    /// <seealso cref="RB.AssetSource"/>
    /// <seealso cref="RB.SheetType"/>
    public RB.AssetStatus Load(string path, SheetType sheetType = SheetType.SpriteSheet, RB.AssetSource source = RB.AssetSource.Resources)
    {
        Unload();

        if (!RetroBlitInternal.RBAssetManager.CheckSourceSupport(source))
        {
            InternalSetErrorStatus(RB.AssetStatus.Failed, RB.Result.NotSupported);
            return(status);
        }

        RetroBlitInternal.RBAPI.instance.AssetManager.SpriteSheetLoad(this, new Vector2i(0, 0), path, null, source, sheetType);

        grid = SpriteGrid.fullSheet;

        return(status);
    }
Example #13
0
        /// <summary>
        /// Generate Sheet for Comparison Report
        /// </summary>
        /// <param name="excelFile">Excel File</param>
        /// <param name="dbConnection">Database Connection </param>
        /// <param name="dbQueries">DIQueries</param>
        /// <param name="sheetType">Sheet Type for Comparison Reports</param>
        internal void GenerateSheet(ref DIExcel excelFile, DIConnection dbConnection, DIQueries dbQueries, SheetType sheetType)
        {
            int SheetNo = 0;
            int CurrentRowIndex = 0;
            DataTable MissingRecords = null;
            DataTable AdditionalRecords = null;
            SheetSource SheetGenerator = null;

            // -- Get Sheet Class Instance
            SheetGenerator = SheetSourceFactory.CreateInstance(sheetType, dbConnection, dbQueries);

            this.NameColIndex = SheetGenerator.NameColumnIndex;
            this.LastColIndex = SheetGenerator.LastColumnIndex;
            this.LanguageName = SheetGenerator.GetLanguageName();

            // -- Get Missing Records
            MissingRecords = SheetGenerator.GetMissingRecordsTable();
            //-- Get Additional Records
            AdditionalRecords = SheetGenerator.GetAdditionalRecordsTable();

            // if records is morethan 50000 then create multiple sheets
            if (MissingRecords.Rows.Count > Constants.SheetsLayout.MAXEXCELROWS || (MissingRecords.Rows.Count + AdditionalRecords.Rows.Count) > Constants.SheetsLayout.MAXEXCELROWS)
            {
                // -- Create Multiple Sheet
                this.GenerateSheets(ref excelFile, SheetGenerator.SheetName, MissingRecords, AdditionalRecords);
            }
            else
            {
                // -- Create Worksheet
                SheetNo = this.CreateSheet(ref excelFile, SheetGenerator.SheetName, 0);

                // -- Set Initial Sheet Value
                this.SetSheetHeading(ref  excelFile, SheetNo, SheetGenerator.SheetName);
                this.SetSheetLanguageValue(ref  excelFile, SheetNo);
                this.SetMissingText(ref  excelFile, SheetNo);

                // -- Load Missing Records Into Sheet
                excelFile.LoadDataTableIntoSheet(Constants.Sheet.Indicator.DetailsRowIndex, Constants.HeaderColIndex, MissingRecords, SheetNo, false);
                CurrentRowIndex = Constants.Sheet.Indicator.DetailsRowIndex + Constants.RecordsGapCount + MissingRecords.Rows.Count;
                excelFile.SetCellValue(SheetNo, CurrentRowIndex, Constants.HeaderColIndex, DILanguage.GetLanguageString(Constants.SheetHeader.ADDITIONAL) + " : " + DBNameForAdditionalRecords);
                CurrentRowIndex += 1;
                // -- Load Additional Records Into Sheet
                excelFile.LoadDataTableIntoSheet(CurrentRowIndex, Constants.HeaderColIndex, AdditionalRecords, SheetNo, false);
                // -- Apply Font Settings
                this.ApplyFontSetting(ref excelFile, SheetNo, MissingRecords.Rows.Count);
            }
        }
Example #14
0
        /// <summary>
        /// extracts the boundsheetdata from the biffrecord
        /// </summary>
        /// <param name="reader">IStreamReader </param>
        /// <param name="id">Type of the record </param>
        /// <param name="length">Length of the record</param>
        public BoundSheet8(IStreamReader reader, RecordType id, ushort length)
            : base(reader, id, length)
        {
            // assert that the correct record type is instantiated
            Debug.Assert(this.Id == ID);

            this.lbPlyPos = this.Reader.ReadUInt32();

            byte flags = reader.ReadByte();

            Flags = flags;

            // Bitmask is 0003h -> first two bits, but we can hide our hidden status by flipping reserved bits
            this.hsState = (HiddenState)Utils.BitmaskToByte(flags, 0x00FF);

            this.dt = (SheetType)reader.ReadByte();

            var oldStreamPosition = this.Reader.BaseStream.Position;
            var cch       = reader.ReadByte();
            var fHighByte = Utils.BitmaskToBool(reader.ReadByte(), 0x0001);

            this.Reader.BaseStream.Seek(oldStreamPosition, System.IO.SeekOrigin.Begin);

            if ((fHighByte && (this.Length - 8 != cch * 2)) ||
                (!fHighByte && (this.Length - 8 != cch)))
            {
                //BoundSheet8 Record is Encrypted - just read the bytes, don't process them
                //don't grab lbPlyPos, dt, and hsState (6 bytes), but grab everything else
                this.RawSheetNameBytes = reader.ReadBytes((int)(this.Length - 6));
                return;
            }
            else
            {
                this.stName = new ShortXLUnicodeString(reader);
            }



            if (this.Offset + this.Length != this.Reader.BaseStream.Position)
            {
                Console.WriteLine("BoundSheet8 Record is malformed - document probably has a password");
                throw new Exception("BoundSheet8 Record is malformed - document probably has a password");
            }

            // assert that the correct number of bytes has been read from the stream
            Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position);
        }
Example #15
0
        /// <summary>
        /// The constructor for the record.
        /// </summary>
        /// <param name="biff">The GenericBiff record that should contain the correct type and data for the BOUNDSHEET record.</param>
        /// <exception cref="InvalidRecordIdException">
        /// An InvalidRecordIdException is thrown if biff contains an invalid type or invalid data.
        /// </exception>
        public BoundSheetRecord(GenericBiff biff)
        {
            if (biff.Id == (ushort)RecordType.Boundsheet)
            {
                BinaryReader reader = new BinaryReader(biff.GetDataStream());
                _bofPos     = reader.ReadUInt32();
                _visibility = (VisibilityType)reader.ReadByte();
                _type       = (SheetType)reader.ReadByte();

                byte len = reader.ReadByte();
                _name = Reader.ReadPossibleCompressedString(reader, len);
            }
            else
            {
                throw new InvalidRecordIdException(biff.Id, RecordType.Boundsheet);
            }
        }
Example #16
0
        public static void Run()
        {
            //ExStart:1
            //Source directory
            string sourceDir = RunExamples.Get_SourceDirectory();

            //Load source Excel file
            Workbook workbook = new Workbook(sourceDir + "InternationalMacroSheet.xlsm");

            //Get Sheet Type
            SheetType sheetType = workbook.Worksheets[0].Type;

            //Print Sheet Type
            Console.WriteLine("Sheet Type: " + sheetType);
            //ExEnd:1

            Console.WriteLine("DetectInternationalMacroSheet executed successfully.");
        }
Example #17
0
        /// <summary>
        /// extracts the boundsheetdata from the biffrecord
        /// </summary>
        /// <param name="reader">IStreamReader </param>
        /// <param name="id">Type of the record </param>
        /// <param name="length">Length of the record</param>
        public BoundSheet8(IStreamReader reader, RecordType id, ushort length)
            : base(reader, id, length)
        {
            // assert that the correct record type is instantiated
            Debug.Assert(this.Id == ID);

            this.lbPlyPos = this.Reader.ReadUInt32();

            byte flags = reader.ReadByte();

            // Bitmask is 0003h -> first two bits, but we can hide our hidden status by flipping reserved bits
            this.hsState = (HiddenState)Utils.BitmaskToByte(flags, 0x00FF);

            this.dt = (SheetType)reader.ReadByte();

            this.stName = new ShortXLUnicodeString(reader);

            // assert that the correct number of bytes has been read from the stream
            Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position);
        }
Example #18
0
        internal static string GetSheetTypeNameString(SheetType sheetType)
        {
            string result = null;

            switch (sheetType)
            {
            case SheetType.Unified:
                result = "Jednotné";
                break;

            case SheetType.MenWomenSeparated:
                result = "Mužské a ženské";
                break;

            case SheetType.VoicesSeparated:
                result = "Rozdělené po hlasech";
                break;
            }
            return(result);
        }
Example #19
0
        public Sheet GetSheet(int id, SheetType type, string name)
        {
            if (id == 0)
            {
                var newSheet = new Sheet
                {
                    Type     = type,
                    Number   = string.Format("{0}{1}", DateTime.Now.Year.ToString("0000"), DateTime.Now.Month.ToString("00")),
                    Evection = type == SheetType.Errand ? new Evection() : null,
                    Coding   = DateTime.Now.Ticks.ToString()
                };
                return(newSheet);
            }
            var sheet = GetAllModel(id);

            if (sheet == null)
            {
                throw new ArgumentException("参数错误,未找到相关报销单信息");
            }
            return(sheet);
        }
Example #20
0
        private void AddToolStripMenuItemsForSheetType(SheetType SheetTypeToAdd, ref ToolStripMenuItem ParentMenuItem)
        {
            ToolStripMenuItem NewButton = new ToolStripMenuItem
            {
                Name = "New" + SheetTypeToAdd.ToString() + "Button",
                Size = new Size(152, 22),
                Text = SheetTypeToAdd.ToString().Replace("_", " ")
            };

            if (SheetTypeToAdd < SheetType.None)
            {
                NewButton.Click += new System.EventHandler(this.NewSheetButtonClicked);
            }
            ParentMenuItem.DropDownItems.Add(NewButton);
            if (SheetTypeParentage.TryGetValue(SheetTypeToAdd, out List <SheetType> ChildTypes))
            {
                foreach (SheetType ChildType in ChildTypes)
                {
                    AddToolStripMenuItemsForSheetType(ChildType, ref NewButton);
                }
            }
        }
Example #21
0
 public KanaRow(IList<Kana> kanas, SheetType sheetType)
 {
     Questions = new List<Question>();
     foreach (var kana in kanas)
     {
         QuestionType questionType;
         switch (sheetType)
         {
             case SheetType.Kana:
                 questionType = QuestionType.Kana;
                 break;
             case SheetType.Romaji:
                 questionType = QuestionType.Romaji;
                 break;
             case SheetType.Combined:
                 questionType = EnumHelper.Random<QuestionType>();
                 break;
             default:
                 throw new ArgumentOutOfRangeException(nameof(sheetType), sheetType, null);
         }
         Questions.Add(new Question(kana, questionType));
     }
 }
Example #22
0
 public SheetBuilder(SheetType t, int w, int h)
     : this(t, () => AllocateSheet(t, w, h))
 {
 }
Example #23
0
 public static Sheet AllocateSheet(SheetType type, int w, int h)
 {
     return(new Sheet(type, new Size(w, h)));
 }
Example #24
0
 public Sheet(SheetType type, ITexture texture)
 {
     Type         = type;
     this.texture = texture;
     Size         = texture.Size;
 }
Example #25
0
 public void EndRecognition(short linesCount, SheetType sheetType)
 {
     _scannedLinesCount = linesCount;
     _sheetType = sheetType;
     switch (RecognitionMode)
     {
         case RecognitionMode.BulletinRecognition:
             EndRecognizeBulletin();
             break;
         case RecognitionMode.BulletinGeometryTesting:
             break;
         default:
             throw new Exception("Неизвестный режим работы: " + RecognitionMode);
     }
 }
Example #26
0
 public Garage(Guid id, bool isCustom, GarageType type, SheetColor sheetColor, SheetType sheetType, List <Window> windows, List <Door> doors,
               List <Roof> roofs, double xLength, double yLength, double zLength
               )
 {
     this.Id         = id;
     this.IsCustom   = isCustom;
     this.Type       = type;
     this.SheetColor = sheetColor;
     this.SheetType  = sheetType;
     this.Windows    = windows;
     this.Doors      = doors;
     this.Roofs      = roofs;
     SetSize(xLength, yLength, zLength);
 }
Example #27
0
 public Sheet Add(Sheet before = null, Sheet after = null, int count = 1, SheetType type = SheetType.Worksheet, string path = null)
 {
     return Sheet.ResolveType(InternalObject.GetType().InvokeMember("Add", System.Reflection.BindingFlags.InvokeMethod, null, InternalObject, 
         ComArguments.Prepare(before, after, count, (String.IsNullOrEmpty(path) ? (object)(int)type : (object)path))));
 }
Example #28
0
 public DbUpdateException(string message, Exception innerException, bool rollbackSuccess, SheetType sheetType) :
     base(message, innerException)
 {
     this.rollbackSuccess = rollbackSuccess;
     this.sheetType       = sheetType;
 }
Example #29
0
 public static Sheet AllocateSheet(SheetType type, int sheetSize)
 {
     return(new Sheet(type, new Size(sheetSize, sheetSize)));
 }
Example #30
0
 public SheetBuilder(SheetType t, int sheetSize)
     : this(t, () => AllocateSheet(t, sheetSize))
 {
 }
Example #31
0
        /// <summary>
        /// ken,第一次改寫(廢除) 延長交易時間商品13:45後交易量比重-日明細
        /// </summary>
        /// <param name="ws"></param>
        /// <param name="prodType"></param>
        /// <param name="sheetType"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="oswGrp"></param>
        private void wf_30770_date(Workbook workbook, string prodType, SheetType sheetType,
                                   string startDate, string endDate, string oswGrp)
        {
            Worksheet ws = workbook.Worksheets[(int)sheetType];

            DataTable dtTemp = dao30770.d_30770(prodType, "D", startDate, endDate, oswGrp);

            if (dtTemp.Rows.Count <= 0)
            {
                MessageDisplay.Info(string.Format("{0}~{1},{2}-{3}無任何資料!", startDate, endDate, _ProgramID, "延長交易時間商品13:45後交易量比重-日明細"), GlobalInfo.ResultText);
                return;
            }

            //表頭
            int cp_max_seq_no = dtTemp.Rows[0]["cp_max_seq_no"].AsInt();

            int colStart1 = 0;
            int colStart2 = cp_max_seq_no + 1;
            int colStart3 = (cp_max_seq_no * 2) + 2;
            int rowIndex  = 0;

            ws.Cells[rowIndex, colStart1 + 1].Value = oswGrp + "交易量";
            ws.Cells[rowIndex + 2, colStart2].Value = "小計";
            ws.Cells[rowIndex, colStart2 + 1].Value = "一般交易時段交易量";
            ws.Cells[rowIndex + 2, colStart3].Value = "小計";
            ws.Cells[rowIndex, colStart3 + 1].Value = "延長交易時段交易量比重";
            ws.Cells[rowIndex + 2, colStart3 + cp_max_seq_no + 1].Value = "小計";

            //DataView dv = dtTemp.AsDataView();
            //dv.Sort = "seq_no";
            dtTemp.Sort("seq_no");

            rowIndex = 1;
            for (int k = 1; k <= cp_max_seq_no; k++)
            {
                int ll_found = dtTemp.Rows.IndexOf(dtTemp.Select("seq_no = " + k).FirstOrDefault());
                if (ll_found < 0)
                {
                    continue;
                }
                string am11_kind_id = dtTemp.Rows[ll_found]["am11_kind_id"].AsString();
                string apdk_name    = dtTemp.Rows[ll_found]["apdk_name"].AsString();

                ws.Cells[rowIndex + 0, k + colStart1].Value = am11_kind_id;
                ws.Cells[rowIndex + 1, k + colStart1].Value = apdk_name;
                ws.Cells[rowIndex + 0, k + colStart2].Value = am11_kind_id;
                ws.Cells[rowIndex + 1, k + colStart2].Value = apdk_name;
                ws.Cells[rowIndex + 0, k + colStart3].Value = am11_kind_id;
                ws.Cells[rowIndex + 1, k + colStart3].Value = apdk_name;
            }// for (int k = 0;k < cp_max_seq_no;k++) {


            rowIndex = 2;
            string ymd    = "";
            string kindId = "";

            foreach (DataRow dr in dtTemp.Rows)
            {
                string am11_ymd = dr["am11_ymd"].AsString();
                DateTime.TryParseExact(am11_ymd, "yyyyMMdd", null, System.Globalization.DateTimeStyles.AllowWhiteSpaces, out DateTime am11);
                string am11_kind_id = dr["am11_kind_id"].AsString();

                if (ymd != am11_ymd)
                {
                    ymd = am11_ymd;
                    rowIndex++;
                    ws.Cells[rowIndex, 0].Value = am11.ToString("yyyy/MM/dd");
                }//if (ymd != am11_ymd) {

                if (kindId != am11_kind_id)
                {
                    kindId = am11_kind_id;

                    Decimal cp_grp_m_qnty   = dr["cp_grp_m_qnty"].AsDecimal();
                    Decimal cp_grp_tot_qnty = dr["cp_grp_tot_qnty"].AsDecimal();
                    ws.Cells[rowIndex, colStart2].Value = cp_grp_m_qnty;
                    ws.Cells[rowIndex, colStart3].Value = cp_grp_tot_qnty;

                    if (cp_grp_tot_qnty > 0)
                    {
                        ws.Cells[rowIndex, colStart3 + cp_max_seq_no + 1].Value = Math.Round(cp_grp_m_qnty / cp_grp_tot_qnty, 4, MidpointRounding.AwayFromZero) * 100;
                    }
                    else
                    {
                        ws.Cells[rowIndex, colStart3 + cp_max_seq_no + 1].Value = 0;
                    }
                }//if (kindId != am11_kind_id) {

                int     li_col   = dr["seq_no"].AsInt();
                Decimal m_qnty   = dr["m_qnty"].AsDecimal();
                Decimal tot_qnty = dr["tot_qnty"].AsDecimal();

                ws.Cells[rowIndex, li_col + colStart1].Value = m_qnty;
                ws.Cells[rowIndex, li_col + colStart2].Value = tot_qnty;
                if (tot_qnty > 0)
                {
                    ws.Cells[rowIndex, li_col + colStart3].Value = Math.Round(m_qnty / tot_qnty, 4, MidpointRounding.AwayFromZero) * 100;
                }
                else
                {
                    ws.Cells[rowIndex, li_col + colStart3].Value = 0;
                }
            }//foreach (DataRow dr in dtTemp.Rows) {
        }
Example #32
0
 // Constructor should be protected for unsealed classes, private for sealed classes.
 // (The Serializer invokes this constructor through reflection, so it can be private)
 protected DbUpdateException(SerializationInfo info, StreamingContext context) :
     base(info, context)
 {
     this.rollbackSuccess = info.GetBoolean("rbs");
     this.sheetType       = (SheetType)info.GetInt32("st");
 }
Example #33
0
		public SheetBuilder(SheetType t)
			: this(t, Game.Settings.Graphics.SheetSize) { }
Example #34
0
 public SheetBuilder(SheetType t)
     : this(t, AllocateSheet)
 {
 }
Example #35
0
 internal SheetBuilder(SheetType t)
     : this(t, AllocateSheet)
 {
 }
Example #36
0
		public SheetBuilder(SheetType t)
			: this(t, AllocateSheet) { }
        /// <summary>
        /// Returns Instance of SheetSource for generating sheet
        /// </summary>
        /// <param name="sheetType">Sheet Type</param>
        /// <param name="dbConnection">Database Connection</param>
        /// <param name="dbQueries"></param>
        /// <returns></returns>
        internal static SheetSource CreateInstance(SheetType sheetType, DIConnection dbConnection, DIQueries dbQueries)
        {
            SheetSource RetVal = null;

            switch (sheetType)
            {
                case SheetType.INDICATOR:
                    RetVal = new IndicatorSheetSource();
                    break;
                case SheetType.UNIT:
                    RetVal = new UnitSheetSource();
                    break;
                case SheetType.SUBGROUP:
                    RetVal = new SubgroupSheetSource();
                    break;
                case SheetType.IUS:
                    RetVal = new IUSSheetSource();
                    break;
                case SheetType.TIMEPERIOD:
                    RetVal = new TimeperiodSheetSource();
                    break;
                case SheetType.AREA:
                    RetVal = new AreaSheetSource();
                    break;
                case SheetType.SECTOR:
                    RetVal = new ICSheetSource(ICType.Sector,DILanguage.GetLanguageString(Constants.SheetHeader.SECTOR));
                    break;
                case SheetType.GOAL:
                    RetVal = new ICSheetSource(ICType.Goal , DILanguage.GetLanguageString(Constants.SheetHeader.GOAL));
                    break;
                case SheetType.CF:
                    RetVal = new ICSheetSource(ICType.CF, DILanguage.GetLanguageString(Constants.SheetHeader.CF));
                    break;
                case SheetType.INSTITUTION:
                    RetVal = new ICSheetSource(ICType.Institution , DILanguage.GetLanguageString(Constants.SheetHeader.INSTITUTION));
                    break;
                case SheetType.THEME:
                    RetVal = new ICSheetSource(ICType.Theme, DILanguage.GetLanguageString(Constants.SheetHeader.THEME));
                    break;
                case SheetType.CONVENTION:
                    RetVal = new ICSheetSource(ICType.Convention, DILanguage.GetLanguageString(Constants.SheetHeader.CONVENTION));
                    break;
                case SheetType.SOURCE:
                    RetVal = new ICSheetSource(ICType.Source, DILanguage.GetLanguageString(Constants.SheetHeader.SOURCE));
                    break;
                case SheetType.DATA:
                    RetVal = new DataSheetSource();
                    break;
                default:
                    break;
            }

            // -- Set Connection
            if (RetVal != null)
            {
                RetVal.DBConnection = dbConnection ;
                RetVal.DBQueries = dbQueries;
            }

            return RetVal;
        }
Example #38
0
 private void ScannerManager_SheetProcessed(object sender, SheetEventArgs e)
 {
     _lastVotingResult = e.SheetProcessingSession.VotingResult;
     _lastError = e.SheetProcessingSession.Error;
     _lastDropResult = e.SheetProcessingSession.DropResult;
     _lastSheetType = e.SheetProcessingSession.SheetType;
     _sheetProcessed.GetAccess(this);
     _sheetProcessed.Set();
 }
Example #39
0
 internal SheetBuilder(SheetType t)
     : this(t, AllocateSheet)
 {
 }
Example #40
0
 public Sheet(SheetType type, Size size)
 {
     Type = type;
     Size = size;
 }
Example #41
0
 private static object GetKey(BlankType blankType, SheetType sheetType)
 {
     return ((int)blankType) * 1000 + (int)sheetType;
 }
Example #42
0
		public static Sheet AllocateSheet(SheetType type, int sheetSize)
		{
			return new Sheet(type, new Size(sheetSize, sheetSize));
		}
 public DIExcelCellMapping(CellMappingType cellType, SheetType sheetType, string cellAddress, string cellValue) : base(cellAddress, cellValue)
 {
     this.CurrentCellMappingType = cellType;
     this.CurrentSheetType       = sheetType;
     this.CellAddress            = cellAddress;
 }
Example #44
0
		public SheetBuilder(SheetType t, int sheetSize)
			: this(t, () => AllocateSheet(t, sheetSize)) { }
Example #45
0
		public Sheet(SheetType type, Size size)
		{
			Type = type;
			Size = size;
		}
Example #46
0
 public SheetBuilder(SheetType t, int sheetSize, int margin = 1)
     : this(t, () => AllocateSheet(t, sheetSize), margin)
 {
 }
Example #47
0
		public Sheet(SheetType type, ITexture texture)
		{
			Type = type;
			this.texture = texture;
			Size = texture.Size;
		}
Example #48
0
 private static object GetKey(BlankType blankType, SheetType sheetType)
 {
     return(((int)blankType) * 1000 + (int)sheetType);
 }
 public Sheet2D CreateNewSheet(SheetType type, int sheetSize)
 {
     return(new Sheet2D(type, new Size(sheetSize, sheetSize), textureArray, TextureArrayIndex));
 }
Example #50
0
 public SheetBuilder(SheetType t)
     : this(t, Game.Settings.Graphics.SheetSize)
 {
 }
 public Sheet2D CreateNewSheet(SheetType type, int w, int h)
 {
     return(new Sheet2D(type, new Size(w, h), textureArray, TextureArrayIndex));
 }
Example #52
0
 public void SheetIsReady(IScanner scanner, short linesCount, SheetType sheetType)
 {
     Logger.LogInfo(Message.ScannerManagerSheetIsReady, linesCount, sheetType);
     try
     {
         _sheetProcessingSession.SheetType = sheetType;
         _config.Alerts.ResetErrorCounters();
         if (linesCount > _scanner.WorkZoneH)
             Logger.LogError(Message.ScannerManagerSheetIsReadyTooLarge, _scanner.WorkZoneH);
         var recognizeThread = new Thread(() => _recognitionManager.EndRecognition(linesCount, sheetType))
         {
             Name = "Recognize",
             IsBackground = true,
             Priority = ThreadPriority.Highest
         };
         recognizeThread.Start();
     }
     catch (Exception ex)
     {
         Logger.LogError(Message.ScannerManagerSheetIsReadyError, ex);
     }
     finally
     {
         Logger.LogVerbose(Message.Common_DebugReturn);
     }
 }
        /// <summary>
        /// USed To Generate Sheet of Comparison Report
        /// </summary>
        /// <param name="sheetGenerator">Base Class Object SheetGenerator</param>
        /// <param name="excelFile">Excel File</param>
        /// <param name="progressCounter"> ProgressCounter for Progressbar Increment </param>
        private void GenerateSheet(SheetType sheetType, ref DIExcel excelFile, ref int progressCounter)
        {
            SheetGenerator Generator = new SheetGenerator();

            Generator.GenerateSheet(ref excelFile,this.ReferenceDBConnection,DataBaseComparisonReportGenerator.DBQueries,sheetType);
            progressCounter += 1;
            this.RaiseProgressBarIncrement(progressCounter);
        }