示例#1
0
        public V77Connection(String connectionString)
        {
            ProcessId = 0;
            List <Int32> pids = new List <Int32>();

            foreach (Process p in Process.GetProcesses())
            {
                pids.Add(p.Id);
            }

            // получаем экземпляр COM объекта 1с.
            Object rootComObject = Activator.CreateInstance(v77SApplication);

            Root = new V77System(rootComObject);

            foreach (Process p in Process.GetProcesses())
            {
                if (!pids.Contains(p.Id) && (p.ProcessName.ToUpper() == "1CV7S"))
                {
                    ProcessId = p.Id;
                    break;
                }
            }

            IsConnected = false;
            cnString    = connectionString;
            timer       = new Timer(CloseByTimeout, null, Timeout.Infinite, Timeout.Infinite);
        }
示例#2
0
 public V77Reference(V77System _root)
     : base()
 {
     root = _root;
 }
示例#3
0
 public V77Document(V77System _root)
     : base()
 {
     root = _root;
 }