예제 #1
0
        public void Execute(Arguments arguments)
        {
            int id = arguments.Id.Value;

            if (WordManager.Switch(id))
            {
                Scripter.Variables.SetVariableValue(arguments.Result.Value, new Language.BooleanStructure(true));
            }
        }
예제 #2
0
        public void Execute(Arguments arguments)
        {
            string path = arguments.Path.Value;

            WordWrapper wordWraper = WordManager.AddWord();

            wordWraper.Open(path);
            Scripter.Variables.SetVariableValue(arguments.Result.Value, new Language.IntegerStructure(wordWraper.Id));
        }
예제 #3
0
        public void Close()
        {
            try
            {
                application.WindowDeactivate -= Application_WindowDeactivate;
                WordManager.Remove(this);

                application.Quit(
                    Word.WdSaveOptions.wdDoNotSaveChanges,
                    Word.WdOriginalFormat.wdOriginalDocumentFormat,
                    false);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #4
0
 internal WordWrapper()
 {
     id = WordManager.GetNextId();
 }