public InkState_Gesture(InkCollector inkCollector)
            : base(inkCollector)
        {
            this._inkCollector = inkCollector;
            this._inkFrame     = inkCollector._mainPage;

            //initApp();
        }
Beispiel #2
0
        public InkCollector(InkCanvas canvas, InkFrame inkframe)
        {
            _inkCanvas = canvas;
            _mainPage  = inkframe;

            //初始化state
            //init all the states:一定要在presenter之后init
            _state_ink                       = new InkState_Ink(this);
            _state_erase                     = new InkState_Erase(this);
            _state_pointerase                = new InkState_PointErase(this);
            _state_move                      = new InkState_Move(this);
            _state_select                    = new InkState_Select(this);
            _state_rotate                    = new InkState_Rotate(this);
            _state_zoom                      = new InkState_Zoom(this);
            _state_inserttext                = new InkState_InsertText(this);
            _state_inkplay                   = new InkState_Inkplay(this);
            _state_Gesture                   = new InkState_Gesture(this);
            _state_DrawArrow                 = new InkState_DrawArrow(this);
            _state_VideoPlay                 = new InkState_VideoPlay(this);
            _state_AutoMove                  = new InkState_AutoMove(this);
            _state_DrawGraphic               = new InkState_DrawGraphic(this);
            _state_None                      = new InkState_None(this);
            _state_DrawStrokeInGraphic       = new InkState_DrawStrokeInGraphic(this);
            _state_Summarization             = new InkState_Summarization(this);
            _state_MergeSummarization        = new InkState_MergeSummarization(this);
            _state_HyperLinkSummarization    = new InkState_HyperLinkSummarization(this);
            _state_AddKeyFrameAnnotation     = new InkState_AddKeyFrameAnnotation(this);
            _state_TapestrySummarization     = new InkState_TapestrySummarization(this);
            _state_DoubleSpiralSummarization = new InkState_DoubleSpiralSummarization(this);
            _state = _state_ink;//默认state

            _inkCanvas.AddHandler(InkCanvas.MouseLeftButtonDownEvent, new MouseButtonEventHandler(this._inkCanvas_MouseDown), true);
            _inkCanvas.AddHandler(InkCanvas.MouseLeftButtonUpEvent, new MouseButtonEventHandler(this._inkCanvas_MouseUp), true);
            //初始化事件
            _inkCanvas.MouseMove += new MouseEventHandler(_inkCanvas_MouseMove);

            //System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            //sw.Reset();
            //sw.Start();
            //LoadTemplates loadTemplates = new LoadTemplates();
            //sw.Stop();
            //Console.WriteLine("loadTemplates总需要时间:" + sw.ElapsedMilliseconds + "ms");
        }
Beispiel #3
0
 public InkState_InsertText(InkCollector inkCollector)
     : base(inkCollector)
 {
     this._inkFrame = inkCollector._mainPage;
 }
 public InkState_Select(InkCollector inkCollector)
     : base(inkCollector)
 {
     this._inkCollector = inkCollector;
     this._inkFrame     = inkCollector._mainPage;
 }