Пример #1
0
        public LateBindingApi.Excel.Scenario Add(string name, object changingCells)
        {
            object[] paramArray = new object[2];
            paramArray[0] = name;
            paramArray[1] = changingCells;
            object returnValue = Invoker.MethodReturn(this, "Add", paramArray);

            if (null == returnValue)
            {
                return(null);
            }
            LateBindingApi.Excel.Scenario newClass = new LateBindingApi.Excel.Scenario(this, returnValue);
            return(newClass);
        }
Пример #2
0
 public LateBindingApi.Excel.Scenario this[object index]
 {
     get
     {
         object[] paramArray = new object[1];
         paramArray[0] = index;
         object returnValue = Invoker.MethodReturn(this, "Item", paramArray);
         if (null == returnValue)
         {
             return(null);
         }
         LateBindingApi.Excel.Scenario newClass = new LateBindingApi.Excel.Scenario(this, returnValue);
         return(newClass);
     }
 }
Пример #3
0
        public IEnumerator GetEnumerator()
        {
            object    enumProxy  = Invoker.MethodReturn(this, "_NewEnum");
            COMObject enumerator = new COMObject(this, enumProxy);

            Invoker.Method(enumerator, "Reset", null);
            bool isMoveNextTrue = (bool)Invoker.MethodReturn(enumerator, "MoveNext", null);

            while (true == isMoveNextTrue)
            {
                object itemProxy = Invoker.PropertyGet(enumerator, "Current", null);
                LateBindingApi.Excel.Scenario returnClass = new LateBindingApi.Excel.Scenario(this, itemProxy);
                isMoveNextTrue = (bool)Invoker.MethodReturn(enumerator, "MoveNext", null);
                yield return(returnClass);
            }
        }
Пример #4
0
        public LateBindingApi.Excel.Scenario Add(string name, object changingCells, object values, object comment, object locked, object hidden)
        {
            object[] paramArray = new object[6];
            paramArray[0] = name;
            paramArray[1] = changingCells;
            paramArray[2] = values;
            paramArray[3] = comment;
            paramArray[4] = locked;
            paramArray[5] = hidden;
            object returnValue = Invoker.MethodReturn(this, "Add", paramArray);

            if (null == returnValue)
            {
                return(null);
            }
            LateBindingApi.Excel.Scenario newClass = new LateBindingApi.Excel.Scenario(this, returnValue);
            return(newClass);
        }