Exemplo n.º 1
0
 internal void ClickSaveButton(IntPtr saveButton, bool selectNextNode)
 {
     if (saveButton != IntPtr.Zero)
     {
         ApiSetter.ClickButton(saveButton, _handle, (state) =>
         {
             SaveDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.SaveWindow, this, processId) as SaveDialog_3C;
             if (string.IsNullOrEmpty(fill.Message) || fill.Message.Contains("保存成功") == false)
             {
                 _state = FillState.Waiting;
                 if (_asyncHandle != null)
                 {
                     _asyncHandle.Reset();
                 }
             }
             else
             {
                 fill.DoFillWork(null);
                 if (selectNextNode)
                 {
                     this.SelectNextNode(true);
                 }
             }
         }, null);
     }
     else
     {
         _state = FillState.Waiting;
         if (_asyncHandle != null)
         {
             _asyncHandle.Reset();
         }
     }
 }
Exemplo n.º 2
0
 public override bool DoFillWork(object state)
 {
     if (_okButton == IntPtr.Zero)
     {
         return(false);
     }
     return(ApiSetter.ClickButton(_okButton, base.HWnd, null, null));
 }
Exemplo n.º 3
0
        public override bool DoFillWork(object state)
        {
            string fileName = state as string;

            ApiSetter.SetText(this.fileName, fileName);
            ApiSetter.ClickButton(okButton, base.HWnd, null, null);
            return(true);
        }
Exemplo n.º 4
0
        public override bool DoFillWork(object fileName)
        {
            FillValue3C value = fileName as FillValue3C;

            if (value == null || value.Value == null || _editHandle == IntPtr.Zero || _okButtonHandle == IntPtr.Zero)
            {
                return(false);
            }
            ApiSetter.SetText(_editHandle, value.Value);
            return(ApiSetter.ClickButton(_okButtonHandle, base.HWnd, null, null));
        }
Exemplo n.º 5
0
        public override bool DoFillWork(object propertyAndCategory)
        {
            string[] values = propertyAndCategory as string[];
            if (values == null || values.Length != 2)
            {
                return(false);
            }
            bool result = ApiSetter.CheckRadioButton(_category, values[0]) && ApiSetter.CheckRadioButton(_property, values[1]);

            return(result && ApiSetter.ClickButton(_okButton, base.HWnd, ConfirmInfoTip, null));
        }
Exemplo n.º 6
0
        public override bool DoFillWork(object fillValue)
        {
            bool        result = false;
            FillValue3C value  = fillValue as FillValue3C;

            if (value != null)
            {
                result = ApiSetter.SetComboBoxSelected(base.HWnd, _comboBoxHandle, value.Value, true);
            }
            ApiSetter.ClickButton(_okBtnHandle, base.HWnd, StartFillSelectFirm, this.FillValue);
            return(result);
        }
Exemplo n.º 7
0
        public unsafe override bool DoFillWork(object state)
        {
            NativeApi.SendMessage(_listBox, WMMSG.WM_SETFOCUS, 0, 0);
            uint msg   = WMMSG.LB_SETCURSEL;
            long style = NativeApi.GetWindowLong(_listBox, -16);

            if ((style & ListBoxStyles.LBS_MULTIPLESEL) == ListBoxStyles.LBS_MULTIPLESEL)
            {
                msg = WMMSG.LB_SETSEL;
            }
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.Value == null || fillValue.Separators == null || fillValue.Separators.Length < 1)
            {
                return(false);
            }
            string[] values = fillValue.Value.Split(fillValue.Separators[0]);
            if (values == null)
            {
                return(false);
            }
            int           count = NativeApi.SendMessage(_listBox, WMMSG.LB_GETCOUNT, 0, 0).ToInt32();
            StringBuilder text  = new StringBuilder(256);

            for (int i = 0; i < count; i++)
            {
                RECT   rect;
                IntPtr result = NativeApi.SendMessage(_listBox, WMMSG.LB_GETTEXT, i, text);
                if (values.Contains(text.ToString()))
                {
                    IntPtr checkedIndex = NativeApi.SendMessage(_listBox, msg, i, 0);
                    if (checkedIndex.ToInt32() == -1)
                    {
                        continue;
                    }
                    //NativeApi.SendMessage(base.HWnd, WMMSG.WM_COMMAND, (_listBox.ToInt32() & 0xFFFF | 0x10000), _listBox.ToInt32());
                    NativeApi.SendMessage(_listBox, WMMSG.LB_GETITEMRECT, i, ((IntPtr)(&rect)).ToInt32());
                    if (fillValue.DoubleClick)
                    {
                        NativeApi.SendMessage(_listBox, WMMSG.WM_LBUTTONDOWN, MouseVirtualKeys.None, (rect.Top << 16) | (rect.Left & 0xFFFF));
                        NativeApi.SendMessage(_listBox, WMMSG.WM_LBUTTONUP, MouseVirtualKeys.None, (rect.Top << 16) | (rect.Left & 0xFFFF));
                    }
                    NativeApi.SendMessage(_listBox, WMMSG.WM_LBUTTONDOWN, MouseVirtualKeys.None, (rect.Top << 16) | (rect.Left & 0xFFFF));
                    NativeApi.SendMessage(_listBox, WMMSG.WM_LBUTTONUP, MouseVirtualKeys.None, (rect.Top << 16) | (rect.Left & 0xFFFF));
                }
            }
            ApiSetter.ClickButton(_finishButton, base.HWnd, null, null);
            return(true);
        }
Exemplo n.º 8
0
        public override void InitHandle()
        {
            IntPtr        childAfter = IntPtr.Zero;
            StringBuilder className  = new StringBuilder(256);
            StringBuilder text       = new StringBuilder(256);

            NativeApi.EnumChildWindows(base.HWnd, (hwnd, lParam) =>
            {
                NativeApi.GetClassName(hwnd, className, 255);
                string classNameStr = className.ToString();
                if (classNameStr.StartsWith(CCCFillManager.ButtonClassName))
                {
                    NativeApi.GetWindowText(hwnd, text, 255);
                    string title = text.ToString();
                    if (title == "保存" || title == "完成")
                    {
                        saveButton = hwnd;
                    }
                    else if (title == "追加")
                    {
                        addButton = hwnd;
                    }
                    text.Clear();
                }
                else if (classNameStr.StartsWith(CCCFillManager.ComboBoxClassName) || classNameStr.StartsWith(CCCFillManager.EditClassName))
                {
                    if (ApiSetter.IsEditable(hwnd))
                    {
                        inputCount++;
                    }
                }
                className.Clear();
                return(true);
            }, IntPtr.Zero);

            do
            {
                childAfter = NativeApi.FindWindowEx(base.HWnd, childAfter, null, null);
                NativeApi.GetClassName(childAfter, className, 255);
                if (className.ToString().StartsWith(CCCFillManager.ContainerClassName))
                {
                    container = childAfter;
                    current   = NativeApi.FindWindowEx(container, IntPtr.Zero, null, null);
                }
            } while (childAfter != IntPtr.Zero);
        }
Exemplo n.º 9
0
        private bool FillCheckBox(FillParameter3C fillParameter, IntPtr container)
        {
            FillValue3C value = _pageData[fillParameter.Key] as FillValue3C;

            if (value == null || string.IsNullOrEmpty(value.Value))
            {
                return(false);
            }
            string[]      values    = value.Value.Split(fillParameter.Separators[0]);
            List <string> valueList = new List <string>();

            foreach (var item in values)
            {
                valueList.AddRange(item.Split('|'));
            }
            return(ApiSetter.CheckCheckBox(container, this, value.Note, valueList));
        }
Exemplo n.º 10
0
        public override bool DoFillWork(object state)
        {
            bool        result    = true;
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.Value == null || fillValue.Separators == null || fillValue.Separators.Length < 1)
            {
                return(false);
            }
            string[] values = fillValue.Value.Split(fillValue.Separators[0]);
            if (values != null)
            {
                for (int i = 0; i < radionPanels.Count && values.Length > i; i++)
                {
                    result = result && ApiSetter.CheckRadioButton(radionPanels[i], values[i]);
                }
            }
            return(result && ApiSetter.ClickButton(okButton, base.HWnd, null, null));
        }
Exemplo n.º 11
0
        public static bool CheckRadioButton(IntPtr _parent, string value)
        {
            StringBuilder text   = new StringBuilder(256);
            bool          result = NativeApi.EnumChildWindows(_parent, (handle, lParam) =>
            {
                text.Clear();
                NativeApi.GetWindowText(handle, text, 255);
                if (text.ToString() == value)
                {
                    IntPtr hwndParent = new IntPtr((int)NativeApi.GetWindowLong(_parent, -8));
                    NativeApi.SendMessage(handle, WMMSG.WM_SETFOCUS, 0, 0);
                    ApiSetter.ClickButton(handle, hwndParent, null, null);
                    return(false);
                }
                return(true);
            }, IntPtr.Zero);

            return(result == false);
        }
Exemplo n.º 12
0
        public override bool DoFillWork(object state)
        {
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.AttachFile == null || fillValue.Separators == null || fillValue.Separators.Length < 1)
            {
                return(false);
            }
            string[] fileNames = fillValue.AttachFile.Split(fillValue.Separators[0]);
            //bool flag = fillValue.AttachFile == fillValue.PublicAttachFile;
            foreach (string fileName in fileNames)
            {
                //string fullName = (base.Owner == null || string.IsNullOrEmpty(base.Owner.DataFilePath)) ?
                //    fileName : string.Format("{0}\\{1}", base.Owner.DataFilePath, fileName);
                //List<string> files = CheckFile(fileName, base.Owner.DataFilePath, fillValue.PublicAttachFile, flag);
                //if (files != null)
                //{
                //    foreach (var file in files)
                //    {
                string file = fileName;

                if (Path.GetFileName(fileName) == fileName)
                {
                    file = string.Format("{0}\\{1}", base.Owner.DataFilePath, fileName);
                }

                if (File.Exists(file))
                {
                    ApiSetter.ClickButton(addButton, base.HWnd, FillOpenFileDialog, file); // 点击添加按钮
                }
                else
                {
                    this.Owner.Records.Add(new FillRecord(ElementType.Unknown, RecordType.Failed, string.Format("文件 {0} 不存在", file), null));
                }
                //    }
                //}
                //else
                //    this.Owner.Records.Add(new FillRecord(ElementType.Unknown, RecordType.Failed, string.Format("文件 {0} 不存在", fullName), null));
            }
            ApiSetter.ClickButton(saveButton, base.HWnd, null, null); // 点击保存按钮
            return(true);
        }
Exemplo n.º 13
0
        public unsafe override bool DoFillWork(object state)
        {
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.Value == null || fillValue.Separators == null || fillValue.Separators.Length < 1)
            {
                return(false);
            }
            string[] values = fillValue.Value.Split(fillValue.Separators[0]);
            if (values == null || values.Length == 0)
            {
                return(false);
            }
            ApiSetter.SetComboBoxSelected(base.HWnd, comboBox, values[0]);
            if (values.Length > 1)
            {
                uint msg   = WMMSG.LB_SETCURSEL;
                long style = NativeApi.GetWindowLong(listBox, -16);
                if ((style & ListBoxStyles.LBS_MULTIPLESEL) == ListBoxStyles.LBS_MULTIPLESEL)
                {
                    msg = WMMSG.LB_SETSEL;
                }
                int           count = NativeApi.SendMessage(listBox, WMMSG.LB_GETCOUNT, 0, 0).ToInt32();
                StringBuilder text  = new StringBuilder(256);
                for (int i = 0; i < count; i++)
                {
                    RECT   rect;
                    IntPtr result = NativeApi.SendMessage(listBox, WMMSG.LB_GETTEXT, i, text);
                    if (values.Contains(text.ToString()))
                    {
                        NativeApi.SendMessage(listBox, msg, i, 0);
                        NativeApi.SendMessage(listBox, WMMSG.LB_GETITEMRECT, i, ((IntPtr)(&rect)).ToInt32());
                        NativeApi.SendMessage(listBox, WMMSG.WM_LBUTTONDOWN, MouseVirtualKeys.MK_CONTROL, (rect.Top << 16) | (rect.Left & 0xFFFF));
                        NativeApi.SendMessage(listBox, WMMSG.WM_LBUTTONUP, MouseVirtualKeys.MK_CONTROL, (rect.Top << 16) | (rect.Left & 0xFFFF));
                    }
                }
                ApiSetter.ClickButton(multiInstall, base.HWnd, null, null);
            }
            return(ApiSetter.ClickButton(finish, base.HWnd, null, null));
        }
Exemplo n.º 14
0
        public static bool CheckCheckBox(IntPtr _parent, Main_3C owner, string note, List <string> values)
        {
            StringBuilder text       = new StringBuilder(256);
            IntPtr        saveButton = IntPtr.Zero;
            bool          result     = NativeApi.EnumChildWindows(_parent, (handle, lParam) =>
            {
                text.Clear();
                NativeApi.GetClassName(handle, text, 255);
                if (text.ToString().StartsWith(CCCFillManager.EditClassName))
                {
                    ApiSetter.SetText(handle, note);
                    return(true);
                }
                else if (text.ToString().StartsWith(CCCFillManager.ButtonClassName))
                {
                    text.Clear();
                    NativeApi.GetWindowText(handle, text, 255);
                    int index = values.IndexOf(text.ToString());
                    if (index != -1)
                    {
                        IntPtr hwndParent = new IntPtr((int)NativeApi.GetWindowLong(_parent, -8));
                        NativeApi.SendMessage(handle, WMMSG.WM_SETFOCUS, 0, 0);
                        ApiSetter.ClickButton(handle, hwndParent, null, null);
                        values.RemoveAt(index);
                    }
                    else if (text.ToString() == "保存")
                    {
                        saveButton = handle;
                    }
                }
                return(true);
            }, IntPtr.Zero);

            if (saveButton != IntPtr.Zero)
            {
                owner.ClickSaveButton(saveButton);
            }
            return(true);
        }
Exemplo n.º 15
0
 public override bool DoFillWork(object val)
 {
     if (_yesBtn == IntPtr.Zero)
     {
         return(false);
     }
     ApiSetter.ClickButton(_yesBtn, base.HWnd, (state) =>
     {
         SaveDialog_3C fill = FillDialog_3C.GetFillDialog(CCCWindowType.SaveWindow, base.Owner, base.Owner.ProcessId) as SaveDialog_3C;
         if (string.IsNullOrEmpty(fill.Message) || fill.Message.Contains("保存成功") == false)
         {
             base.Owner.Reset();
         }
         else
         {
             fill.DoFillWork(null);
             base.Owner.SelectNextNode(true);
         }
     }, null);
     base.Owner.ClickSaveButton(_yesBtn, true);
     return(true);
 }
Exemplo n.º 16
0
        public override bool DoFillWork(object state)
        {
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.Value == null || fillValue.Separators == null || fillValue.Separators.Length < 1)
            {
                return(false);
            }
            string[] values = fillValue.Value.Split(fillValue.Separators[0]);
            if (values == null || values.Length == 0)
            {
                return(true);
            }
            List <IntPtr> list = ControlSorter.SortContainer(_container);

            if (list == null)
            {
                return(false);
            }
            StringBuilder className = new StringBuilder(256);

            for (int i = 0; i < values.Length && i < list.Count; i++)
            {
                className.Clear();
                NativeApi.GetClassName(list[i], className, 255);
                string classNameStr = className.ToString();
                if (classNameStr.StartsWith(CCCFillManager.EditClassName))
                {
                    ApiSetter.SetText(list[i], values[i]);
                }
                else if (classNameStr.StartsWith(CCCFillManager.ComboBoxClassName))
                {
                    ApiSetter.SetComboBoxSelected(base.HWnd, list[i], values[i]);
                }
            }
            ApiSetter.ClickButton(_finishButton, base.HWnd, null, null);
            return(true);
        }
Exemplo n.º 17
0
 public override bool DoFillWork(object state)
 {
     return(ApiSetter.ClickButton(_okButton, base.HWnd, null, null));
 }
Exemplo n.º 18
0
 public override bool DoFillWork(object firm)
 {
     return(ApiSetter.SetComboBoxSelected(base.HWnd, _comboBoxHandle, firm as string) &&
            ApiSetter.ClickButton(_okBtnHandle, base.HWnd, null, null));
 }
Exemplo n.º 19
0
        private bool FillValue(string className, ref int index, IntPtr handle, FillValue3C value)
        {
            _asyncHandle.Wait();
            string parameterValue = null;

            if (value == null)
            {
                return(false);
            }
            FillParameter3C parameter = _fillParameters[value.Key] as FillParameter3C;

            if (index == -1)
            {
                parameterValue = value.Value;
            }
            else
            {
                string[] values = value.Value == null ? null : value.Value.Split(parameter.Separators[0]);
                parameterValue = (values == null || values.Length <= index) ?
                                 (string.IsNullOrEmpty(value.Note) ? "" : value.Note) : values[index];
            }
            StringBuilder text = null;

            switch (className)
            {
            case CCCFillManager.EditClassName:
                if (ApiSetter.IsEditable(handle, _handle) == false)
                {
                    index--;
                    break;
                }
                ApiSetter.SetText(handle, parameterValue);
                break;

            case CCCFillManager.ComboBoxClassName:
                if (ApiSetter.IsEditable(handle, _handle) == false)
                {
                    index--;
                    break;
                }
                ApiSetter.SetComboBoxSelected(_handle, handle, parameterValue, parameter.IsComboBoxPreciseMatch);
                break;

            case CCCFillManager.ButtonClassName:
                value.Separators = parameter.Separators;
                text             = new StringBuilder(256);
                NativeApi.GetWindowText(handle, text, 255);
                if (text.ToString() == "附件" && value != null && string.IsNullOrEmpty(value.AttachFile) == false)
                {
                    return(ApiSetter.ClickButton(handle, _handle, ListenAttachWindow, value));
                }
                else if (text.ToString() == "编辑")
                {
                    if (string.IsNullOrEmpty(value.OriginString))
                    {
                        return(false);
                    }
                    if (string.IsNullOrEmpty(parameter.EditType))
                    {
                        parameter.EditType = "add";
                    }
                    switch (parameter.EditType.ToLower())
                    {
                    case "add":
                        return(ApiSetter.ClickButton(handle, _handle, ListenAddWindow, value));

                    case "radio":
                        return(ApiSetter.ClickButton(handle, _handle, ListenRadioWindow, value));

                    case "select":
                        return(ApiSetter.ClickButton(handle, _handle, ListenListBoxWindow, value));

                    case "multiselect":
                        value.DoubleClick = true;
                        return(ApiSetter.ClickButton(handle, _handle, ListenListBoxWindow, value));

                    case "text":
                        return(ApiSetter.ClickButton(handle, _handle, ListenTextWindow, value));

                    case "column":
                        return(ApiSetter.ClickButton(handle, _handle, ListenColumnWindow, value));

                    case "multinote":
                        return(ApiSetter.ClickButton(handle, _handle, ListenMultiValueAndNoteWindow, value));

                    default:
                        return(false);
                    }
                }
                else
                {
                }
                break;
            }
            return(true);
        }
Exemplo n.º 20
0
        /// <summary>
        /// 根据参数键值及控件句柄填写参数。
        /// </summary>
        /// <param name="key"></param>
        /// <param name="fillControl"></param>
        /// <returns></returns>
        private bool FillValue(string key, object fillControl)
        {
            IntPtr        current = IntPtr.Zero;
            List <IntPtr> list    = fillControl as List <IntPtr>;

            if (list != null && list.Count == 0)
            {
                return(true);
            }

            if (string.IsNullOrEmpty(key))
            {
                return(true);
            }
            FillParameter3C fillParameter = _fillParameters[key] as FillParameter3C;

            if (fillParameter == null)
            {
                fillParameter = new FillParameter3C()
                {
                    Key = key, Separators = FillParameter3C.DefaultSeparators
                };
                _fillParameters.Add(key, fillParameter);
            }
            FillValue3C fillValue = _pageData[key] as FillValue3C;

            if (fillValue == null)
            {
                Records.Add(new FillRecord(ElementType.Unknown, RecordType.Failed, "数据文件中未定义此参数", key));
                return(true);
            }
            StringBuilder className = new StringBuilder(256);
            string        name      = "";

            if (list != null)
            {
                current   = list[0];
                className = new StringBuilder(256);
                NativeApi.GetClassName(current, className, 255);
                name = className.ToString();
                // 勾选是否适用复选框
                if (name.StartsWith(CCCFillManager.ButtonClassName))
                {
                    if (fillValue.Value == "N/A")
                    {
                        if (ApiSetter.IsDisabled(current) == false)
                        {
                            ApiSetter.SetCheck(current, this.Hwnd);
                            //ApiSetter.ClickButton(current, this.Hwnd, null, null);
                            return(true);
                        }
                    }
                    current = list.Count > 1 ? list[list.Count - 1] : current;
                }
            }
            else
            {
                current = (IntPtr)fillControl;
            }


            if (fillParameter.Type == "5" || fillParameter.Type == "7")
            {
                return(FillCheckBox(fillParameter, current));
            }


            className.Clear();
            NativeApi.GetClassName(current, className, 255);
            name = className.ToString();
            if (name.StartsWith(CCCFillManager.StaticClassName))
            {
                return(true);
            }
            else if (name.StartsWith(CCCFillManager.EditClassName))
            {
                return(FillValue(CCCFillManager.EditClassName, current, fillValue));
            }
            else if (name.StartsWith(CCCFillManager.ButtonClassName))
            {
                return(FillValue(CCCFillManager.ButtonClassName, current, fillValue));
            }
            else if (name.StartsWith(CCCFillManager.ComboBoxClassName))
            {
#if export
                sheet.WriteNextRow();
                sheet.WriteTextCell(1, writer.AddSharedString(key));
#endif
                return(FillValue(CCCFillManager.ComboBoxClassName, current, fillValue));
            }
            else
            {   // 多值填报
                List <IntPtr> sortedControl = ControlSorter.SortContainer(current);
                if (sortedControl == null)
                {
                    return(false);
                }
                else if (sortedControl.Count == 1)
                {
                    return(FillValue(key, sortedControl[0]));
                }
                int valueIndex = 0;
                for (int i = 0; i < sortedControl.Count; i++, valueIndex++)
                {
                    className.Clear();
                    NativeApi.GetClassName(sortedControl[i], className, 255);
                    if (className.ToString().StartsWith(CCCFillManager.ButtonClassName))
                    {
                        FillValue(CCCFillManager.ButtonClassName, ref valueIndex, sortedControl[i], fillValue);
                    }
                    else if (className.ToString().StartsWith(CCCFillManager.ComboBoxClassName))
                    {
#if export
                        sheet.WriteNextRow();
                        sheet.WriteTextCell(1, writer.AddSharedString(key));
#endif
                        FillValue(CCCFillManager.ComboBoxClassName, ref valueIndex, sortedControl[i], fillValue);
                    }
                    else if (className.ToString().StartsWith(CCCFillManager.EditClassName))
                    {
                        FillValue(CCCFillManager.EditClassName, ref valueIndex, sortedControl[i], fillValue);
                    }
                }
            }
            return(true);
        }
Exemplo n.º 21
0
        public override bool DoFillWork(object state)
        {
            FillValue3C fillValue = state as FillValue3C;

            if (fillValue == null || fillValue.Value == null || fillValue.Separators == null || fillValue.Separators.Length < 2 || inputCount == 0)
            {
                return(false);
            }

            foreach (char c in fillValue.Separators)
            {
                fillValue.Value = fillValue.Value.Replace(c, ',');
            }
            List <string[]> values = new List <string[]>();

            string[] array = fillValue.Value.Split(new char[] { ',' }, StringSplitOptions.None);
            string[] group = null;
            for (int i = 0; i < array.Length; i++)
            {
                int mod = (i % inputCount);
                if (mod == 0)
                {
                    group = new string[inputCount];
                    values.Add(group);
                }
                group[mod] = array[i];
            }
            //List<string[]> values = new List<string[]>();
            //foreach (var item in fillValue.Value.Split(fillValue.Separators[1]))
            //{
            //    values.Add(item.Split(fillValue.Separators[0]));
            //}
            bool          result    = true;
            StringBuilder className = new StringBuilder(256);

            for (int index = 0; index < values.Count && current != IntPtr.Zero; index++)
            {
                List <IntPtr> sorted = ControlSorter.SortContainer(current);
                if (sorted != null)
                {
                    string[] parametrValues = values[index];
                    for (int i = 0; i < sorted.Count && parametrValues.Length > i; i++)
                    {
                        NativeApi.GetClassName(sorted[i], className, 255);
                        string classNameStr = className.ToString();
                        if (classNameStr.StartsWith(CCCFillManager.EditClassName))
                        {
                            ApiSetter.SetText(sorted[i], parametrValues[i]);
                        }
                        else if (classNameStr.StartsWith(CCCFillManager.ComboBoxClassName))
                        {
                            ApiSetter.SetComboBoxSelected(base.HWnd, sorted[i], parametrValues[i]);
                        }
                    }
                }
                if (index < values.Count - 1)
                {
                    ApiSetter.ClickButton(addButton, base.HWnd, null, null);
                }
                current = NativeApi.FindWindowEx(container, current, null, null);
            }
            return(result && ApiSetter.ClickButton(saveButton, base.HWnd, null, null));
        }