iSpyApplication.AddCamera.LoadAlertTypes C# (CSharp) Method

LoadAlertTypes() private method

private LoadAlertTypes ( ) : void
return void
        private void LoadAlertTypes()
        {
            ddlAlertMode.Items.Clear();
            int iMode = 0;

            var items = new List<string>();
            if (Helper.HasFeature(Enums.Features.Motion_Detection))
            {
                foreach (string s in _alertmodes)
                {
                    ddlAlertMode.Items.Add(LocRm.GetString(s));
                    items.Add(s);
                }
            }

            //provider specific alert options
            switch (CameraControl.Camobject.settings.sourceindex)
            {
                case 7:
                    ddlAlertMode.Items.Add("Virtual Trip Wires");
                    items.Add("Virtual Trip Wires");
                    break;
            }

            foreach (String plugin in MainForm.Plugins)
            {
                string name = plugin.Substring(plugin.LastIndexOf("\\", StringComparison.Ordinal) + 1);
                name = name.Substring(0, name.LastIndexOf(".", StringComparison.Ordinal));
                ddlAlertMode.Items.Add(name);
                items.Add(name);
            }

            int iCount = 0;
            if (CameraControl.Camobject.alerts.mode != null)
            {
                foreach (string name in items)
                {
                    if (name.ToLower() == CameraControl.Camobject.alerts.mode.ToLower())
                    {
                        iMode = iCount;
                        break;
                    }
                    iCount++;
                }
            }

            if (ddlAlertMode.Items.Count>0)
                ddlAlertMode.SelectedIndex = iMode;
        }
AddCamera