public static bool IsAvailable(this TStyle style, DeviceProfile profile)
        {
            if (!style.IsValid())
            {
                return(false);
            }

            switch (style)
            {
            case TStyle.Mix:
                return(true);

            case TStyle.Dip:
                return(true);

            case TStyle.Wipe:
                return(true);

            case TStyle.DVE:
                return(profile.DVE > 0);

            case TStyle.Stinger:
                return(profile.Stingers > 0);

            default:
                throw new ArgumentOutOfRangeException(nameof(style), style, null);
            }
        }
Пример #2
0
        /// <summary>
        /// Gets colors, bold, but not font properties.
        /// </summary>
        public TStyles(AuScintilla sci)
        {
            BackgroundColor = ColorInt.SwapRB(sci.Call(SCI_STYLEGETBACK));

            TStyle _Get(EToken tok)
            {
                int  color = ColorInt.SwapRB(sci.Call(SCI_STYLEGETFORE, (int)tok));
                bool bold  = 0 != sci.Call(SCI_STYLEGETBOLD, (int)tok);

                return(new TStyle(color, bold));
            }

            Comment      = _Get(EToken.Comment);
            String       = _Get(EToken.String);
            StringEscape = _Get(EToken.StringEscape);
            Number       = _Get(EToken.Number);
            Punctuation  = _Get(EToken.Punctuation);
            Operator     = _Get(EToken.Operator);
            Keyword      = _Get(EToken.Keyword);
            Namespace    = _Get(EToken.Namespace);
            Type         = _Get(EToken.Type);
            Function     = _Get(EToken.Function);
            LocalVar     = _Get(EToken.LocalVar);
            Parameter    = _Get(EToken.Parameter);
            Field        = _Get(EToken.Field);
            Constant     = _Get(EToken.Constant);
            EnumMember   = _Get(EToken.EnumMember);
            Label        = _Get(EToken.Label);
            Preprocessor = _Get(EToken.Preprocessor);
            Excluded     = _Get(EToken.Excluded);
            XmlDocText   = _Get(EToken.XmlDocText);
            XmlDocTag    = _Get(EToken.XmlDocTag);

            LineNumber = _Get(EToken.LineNumber);
        }
Пример #3
0
        public TStyles()
        {
            FontName = "Consolas";
            FontSize = 10;

            Comment = 0x408000;            //green like in VS but towards yellow
            String  = 0xA07040;            //brown, more green
            //0xc0c0c0; //good contrast with 0xA07040, but maybe not with white background
            //0xc0e000; //light yellow-green. Too vivid.
            StringEscape = 0xB776FB;     //pink-purple like in VS
            Number       = 0x804000;     //brown, more red
            //Punctuation = 0; //black
            Operator     = 0x0000ff;     //blue like keyword
            Keyword      = 0x0000ff;     //blue like in VS
            Namespace    = 0x808000;     //dark yellow
            Type         = 0x0080c0;     //like in VS but more blue
            Function     = (0, true);
            LocalVar     = 0x204020;     //dark green gray
            Parameter    = 0x204020;     //like variable
            Field        = 0x204020;     //like variable
            Constant     = 0x204020;     //like variable
            EnumMember   = 0x204020;     //like variable
            Label        = 0xff00ff;     //magenta
            Preprocessor = 0xff8000;     //orange
            Excluded     = 0x808080;     //gray
            XmlDocText   = 0x408000;     //green like comment
            XmlDocTag    = 0x808080;     //gray

            LineNumber = 0x808080;
        }
Пример #4
0
        //
        // Public methods
        //

        /// <summary>
        /// Initializes a new instance of the <see cref="TWord" /> class.
        /// </summary>
        public TWord()
        {
            m_oChars      = new TChars();
            m_oRectangle  = new TOCRRect();
            m_sWordData   = "";
            m_iConfidance = 0;
            m_iStyle      = 0;
        }
Пример #5
0
 public virtual IEnumerable <TStyle> GetStyles <TStyle>()
     where TStyle : class, IFigureStyle
 {
     foreach (var style in list)
     {
         TStyle correctStyle = style as TStyle;
         if (correctStyle != null)
         {
             yield return(correctStyle);
         }
     }
 }
Пример #6
0
        internal static TStyle[] GetDefaultCodeStyles <TStyle, TStyleType>()
            where TStyle : StyleBase <TStyleType>, new()
            where TStyleType : struct, Enum
        {
            var r = new TStyle[Enum.GetValues(typeof(TStyleType)).Length];

            for (var i = 0; i < r.Length; i++)
            {
                r[i] = new TStyle {
                    StyleID = ClrHacker.DirectCast <int, TStyleType>(i)
                };
            }
            return(r);
        }
Пример #7
0
    private void OnActEnd()
    {
        ActIndex++;

        if (ActIndex >= ActManager.Instance().GetActDict().Count)
        {
            return;
        }

        if (_tStyle == TStyle.None)
        {
            StartAct();
        }
        else
        {
            Overlay.Transition(OverlayTransition.Complete, 1f, () => { StartAct(); });
        }

        _tStyle = TStyle.None;
    }
Пример #8
0
 /// <summary>
 /// get song list by style
 /// </summary>
 /// <param name="tStyle"></param>
 /// <returns></returns>
 public abstract Task <SongListContent> GetSongListAsync(TStyle tStyle);
Пример #9
0
 public void SetTransitionStyle(TStyle tStyle)
 {
     _tStyle = tStyle;
 }
Пример #10
0
 /// <summary>
 /// Adds the style.
 /// </summary>
 /// <param name="iStyle">The i style.</param>
 public void AddStyle(TStyle iStyle)
 {
     m_iStyle |= iStyle;
 }