ACAT.Extensions.Default.FunctionalAgents.NewFile.NewFileAgent.NewFileAgent C# (CSharp) Метод

NewFileAgent() публичный Метод

Initializes a new instance of the class.
public NewFileAgent ( ) : System
Результат System
        public NewFileAgent()
        {
            Name = "New File Agent";

            try
            {
                // Check if word is installed on the user's computer and
                // is < MS Word 2013
                var type = Type.GetTypeFromProgID("Word.Application");
                if (type != null)
                {
                    dynamic wordObject = Activator.CreateInstance(type);
                    if (wordObject != null)
                    {
                        _isWordInstalled = (wordObject.Version == "14.0");
                        wordObject.Quit(false);
                    }
                }
            }
            catch (Exception)
            {
            }
        }