コード例 #1
0
        public void MakeCommandsTest()
        {
            var o    = new NMRSpectrumQuery();
            var cmds = o.MakeCommand("1.45 (s, 1H), 1.55 (d, J = 1.3 Hz, 3H), 1.95 (dd, J = 7.3, 2.3 Hz, 1.4H, CH3), 2.2-3.2 (m, 15H)");

            Assert.AreNotEqual(0, cmds.Count());
        }
コード例 #2
0
        public void ButtonNMRSpec_Click(object sender, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e)
        {
            var app  = Globals.ThisAddIn.Application;
            var text = app.Selection.Text;

            text = Utility.Normalize(text);
            var query = new NMRSpectrumQuery()
            {
                Format = CurrentNMRFormat
            };
            var commands = query.MakeCommand(text);

            WordApplyer.Apply(commands);
        }