예제 #1
0
        List <Char> lstChars = new List <Char>(); //减字列表
        public FormPreviewer()
        {
            InitializeComponent();

            DataTranslator translator = new DataTranslator();

            foreach (CharNotationDataSet.CharRow row in translator.CharTable)
            {
                lstChars.Add(translator.GetChar(row));
            }
        }
예제 #2
0
        bool mouseDown; //记录鼠标是否按下

        public FormDesigner()
        {
            InitializeComponent();

            //准备编辑区域内容
            basicStrokes = BasicStrokesInit(); //基础笔画部件
            //将数据绑定到combo上。此处无需新建binding,因为该数据不会更新
            comboStrokes.DataSource    = basicStrokes;
            comboStrokes.DisplayMember = "type";

            //CharEditor.BasicStrokes = basicStrokes; //将笔画信息传入chareditor
            Stroke.setWidth(3, 15);
            charEditor = new CharEditor();
            mouseDown  = false;

            dataTranslator = new DataTranslator();

            lstChar.DataSource    = dataTranslator.CharTable;
            lstChar.DisplayMember = "char_name";
        }