public GraphicsTimerTask SubscribeGraphicsTimerTask(
     object uniqueName,
     TaskIntervalPlan planName,
     int intervalMs,
     EventHandler<GraphicsTimerTaskEventArgs> tickhandler)
 {
     GraphicsTimerTask existingTask;
     if (!registeredTasks.TryGetValue(uniqueName, out existingTask))
     {
         existingTask = new GraphicsTimerTask(this.rootgfx, planName, uniqueName, intervalMs, tickhandler);
         registeredTasks.Add(uniqueName, existingTask);
         switch (planName)
         {
             case TaskIntervalPlan.CaretBlink:
                 {
                     caretIntervalTaskList.Add(existingTask);
                 }
                 break;
             default:
                 {
                     fastIntervalTaskList.Add(existingTask);
                 }
                 break;
         }
     }
     return existingTask;
 }
 internal static void RegisterCaretBlink(RootGraphic root)
 {
     if (!root.CaretHandleRegistered)
     {
         root.CaretHandleRegistered = true;
         task = root.SubscribeGraphicsIntervalTask(
             caretBlinkTask,
             TaskIntervalPlan.CaretBlink,
             20,
             tickHandler);
     }
 }