示例#1
0
        public override void Dispose()
        {
            TypeWriter tw = this.Content as TypeWriter;

            tw.Dispose();
            base.Dispose();
        }
示例#2
0
        public void Evaluate(int SpreadMax)
        {
            if (FTypeWriterWrap.IsConnected)
            {
                FValid.SliceCount          = FTypeWriterWrap.SliceCount;
                FOutput.SliceCount         = FTypeWriterWrap.SliceCount;
                FCursorPosition.SliceCount = FTypeWriterWrap.SliceCount;
                FSelectStart.SliceCount    = FTypeWriterWrap.SliceCount;
                FSelectEnd.SliceCount      = FTypeWriterWrap.SliceCount;
                FEnabled.SliceCount        = FTypeWriterWrap.SliceCount;

                for (int i = 0; i < FTypeWriterWrap.SliceCount; i++)
                {
                    FValid[i] = FTypeWriterWrap[i] is TypeWriterWrap;
                    if (FValid[i])
                    {
                        TypeWriter tw = FTypeWriterWrap[i].Content as TypeWriter;
                        FOutput[i]         = tw.Output;
                        FCursorPosition[i] = tw.CursorPosition;
                        FSelectStart[i]    = tw.SelectStart;
                        FSelectEnd[i]      = tw.SelectEnd;
                        FEnabled[i]        = tw.Enabled;
                    }
                }
            }
            else
            {
                FValid.SliceCount          = 0;
                FOutput.SliceCount         = 0;
                FCursorPosition.SliceCount = 0;
                FSelectStart.SliceCount    = 0;
                FSelectEnd.SliceCount      = 0;
                FEnabled.SliceCount        = 0;
            }
        }
示例#3
0
 public void Evaluate(int SpreadMax)
 {
     if (FTypeWriterWrap.IsConnected)
     {
         FValid.SliceCount = FTypeWriterWrap.SliceCount;
         for (int i = 0; i < FTypeWriterWrap.SliceCount; i++)
         {
             FValid[i] = FTypeWriterWrap[i] is TypeWriterWrap;
             if (FValid[i])
             {
                 if (FSet[i])
                 {
                     TypeWriter tw = FTypeWriterWrap[i].Content as TypeWriter;
                     tw.BlackList.Clear();
                     tw.WhiteList.Clear();
                     foreach (string s in FWhite[i])
                     {
                         tw.WhiteList.Add(s);
                     }
                     foreach (string s in FBlack[i])
                     {
                         tw.BlackList.Add(s);
                     }
                 }
             }
         }
     }
     else
     {
         FValid.SliceCount = 0;
     }
 }
示例#4
0
        public void Evaluate(int SpreadMax)
        {
            if (FTypeWriterWrap.IsConnected)
            {
                FValid.SliceCount = FTypeWriterWrap.SliceCount;
                for (int i = 0; i < FTypeWriterWrap.SliceCount; i++)
                {
                    FValid[i] = FTypeWriterWrap[i] is TypeWriterWrap;
                    if (FValid[i])
                    {
                        TypeWriter tw = FTypeWriterWrap[i].Content as TypeWriter;

                        if (FSetKeyboard[i])
                        {
                            tw.Keyboard = FKeyboardIn[i];
                        }
                        if (FEnableKeyboard[i])
                        {
                            tw.Enabled = true;
                        }
                        if (FDisableKeyboard[i])
                        {
                            tw.Enabled = false;
                        }
                        if (FSetMaxLength[i])
                        {
                            tw.MaxLength = FMaxLength[i];
                        }
                        if (FSetCursorPosition[i])
                        {
                            tw.CursorPosition = FNewCursorPosition[i];
                        }
                        if (FInitialize[i])
                        {
                            tw.Initialize(FInitialText[i]);
                        }
                        if (FInsertText[i])
                        {
                            tw.InsertText(FInputText[i]);
                        }
                        if (FSetSelect[i])
                        {
                            tw.SelectStart = FSelectStart[i];
                            tw.SelectEnd   = FSelectEnd[i];
                        }
                    }
                }
            }
            else
            {
                FValid.SliceCount = 0;
            }
        }
示例#5
0
        public override TypeWriterWrap ConstructVObject()
        {
            int        i  = this.CurrObj;
            TypeWriter tw = new TypeWriter();

            tw.CursorPosition       = FNewCursorPosition[i];
            tw.IgnoreNavigationKeys = FIgnoreNavigationKeys[i];
            tw.IgnoreNewLine        = FIgnoreNewLine[i];
            tw.Keyboard             = FKeyboardIn[i];
            tw.Enabled   = FDefKeyState[i];
            tw.MaxLength = FMaxLength[i];
            return(new TypeWriterWrap(tw));
        }
示例#6
0
        public override void InitializeFrame()
        {
            for (int i = 0; i < FOutput.SliceCount; i++)
            {
                if (FOutput[i] != null)
                {
                    TypeWriter tw = FOutput[i].Content as TypeWriter;
                    tw.IgnoreNavigationKeys = FIgnoreNavigationKeys[i];

                    if (FSetKeyboard[i])
                    {
                        tw.Keyboard = FKeyboardIn[i];
                    }
                    if (FEnableKeyboard[i])
                    {
                        tw.Enabled = true;
                    }
                    if (FDisableKeyboard[i])
                    {
                        tw.Enabled = false;
                    }
                    if (FSetMaxLength[i])
                    {
                        tw.MaxLength = FMaxLength[i];
                    }
                    if (FSetCursorPosition[i])
                    {
                        tw.CursorPosition = FNewCursorPosition[i];
                    }
                    if (FInitialize[i])
                    {
                        tw.Initialize(FInitialText[i]);
                    }
                    if (FInsertText[i])
                    {
                        tw.InsertText(FInputText[i]);
                    }
                    if (FSetSelect[i])
                    {
                        tw.SelectStart = FSelectStart[i];
                        tw.SelectEnd   = FSelectEnd[i];
                    }
                }
            }
        }
示例#7
0
 public TypeWriterWrap(TypeWriter o) : base(o)
 {
 }