コード例 #1
0
ファイル: Level.cs プロジェクト: kayyer/sigstat
        /// <summary>
        /// Set the style according to text level
        /// </summary>
        /// <param name="style"></param>
        /// <param name="level"></param>
        public static void StyleAs(this ExcelStyle style, TextLevel level)
        {
            switch (level)
            {
            case TextLevel.Title:
                style.StyleAsTitle();
                break;

            case TextLevel.Heading1:
                style.StyleAsHeading1();
                break;

            case TextLevel.Heading2:
                style.StyleAsHeading2();
                break;

            case TextLevel.Heading3:
                style.StyleAsHeading3();
                break;

            case TextLevel.Normal:
                style.StyleAsNormal();
                break;
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="TextBuilder"/>.
 /// </summary>
 /// <param name="textLevel">The level of the text file representatives.</param>
 /// <param name="textLocation">The location of the text file representatives.</param>
 /// <param name="textPathFind">The regex used to find a part of the image path to replace.</param>
 /// <param name="textPathReplace">The replace value that results in the correct text path.</param>
 public TextBuilder(TextLevel textLevel, TextLocation textLocation, Regex textPathFind, string textPathReplace)
 {
     this.fileLevel    = textLevel;
     this.fileLocation = textLocation;
     this.pathFind     = textPathFind;
     this.pathReplace  = textPathReplace;
 }
コード例 #3
0
        private void TextLevel_OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key != Key.Enter)
            {
                return;
            }

            var player = _players[_playerIndex];

            try
            {
                var level = byte.Parse(TextLevel.Text);
                player.Level = level;
                TextLevel.SelectAll();
                Data.Blitzball.SetPlayerInfo(_playerIndex, player);
            }
            catch
            {
                Error.Show("Please enter a value between 0 and 255");
            }

            RefreshCurrentPlayer();
        }
コード例 #4
0
 /// <summary>
 /// Inserts text into the defined cell, and format to match text level
 /// </summary>
 /// <param name="ws">Worksheet in wich the text is inserted</param>
 /// <param name="row">Row of the cell</param>
 /// <param name="col">Column of the cell</param>
 /// <param name="text">Text to insert</param>
 /// <param name="level">Level of text</param>
 public static void InsertText(this ExcelWorksheet ws, int row, int col, string text, TextLevel level = TextLevel.Normal)
 {
     ws.Cells[row, col].Value = text;
     ws.Cells[row, col].Style.StyleAs(level);
 }
コード例 #5
0
ファイル: Level.cs プロジェクト: adamtisza/ExcelEditor
 public int GetLevel(TextLevel level)
 {
     return(TextLevels[level]);
 }