public
Description: A simple language for defining todo lists, using the Mg (or MGrammar) language, from Microsoft's Oslo platform.
Homepage:
Clone URL: git://github.com/m4dc4p/mg-todo.git
mg-todo / TodoPlugin / ToDoCommands.py
100755 20 lines (15 sloc) 0.677 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#----------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#----------------------------------------------------------------
 
import sys
import System
import Microsoft
import Common
 
@Metadata.ImportSingleValue('{Microsoft.Intellipad}Core')
def Initialize(value):
    global Core
    Core = value
    Common.Initialize(Core)
 
@Metadata.CommandExecuted('{Microsoft.Intellipad}BufferView', '{Microsoft.Intellipad}SetToDoMode', 'Ctrl+Shift+G')
def SetToDoMode(target, sender, args):
    sender.Mode = Core.ComponentDomain.GetBoundValue[System.Object]('{Microsoft.Intellipad}ToDoMode')