void uiPreset_DebugEvent(object sender, EventArgs e)
        {
            UIMapPreset uiPreset = sender as UIMapPreset;

            this.Dispatcher.Invoke(() =>
            {
                foreach (UIElement uiE in this.UIMapContent.Children)
                {
                    if (uiE is UIMapCamera)
                    {
                        UIMapCamera uiCamera = uiE as UIMapCamera;
                        if (App.DataCamera[uiCamera.Postion].id == uiPreset.Preset.Camera[0].camera_id)
                        {
                            if (uiCamera.alert)
                            {
                                uiCamera.Alarm(false);
                            }
                            else
                            {
                                uiCamera.Alarm(true);
                            }

                            break;
                        }
                    }
                }
            });
        }
 private void uiAlarm_AlertEvent(object sender, Tuple <Alarm, bool> e)
 {
     if (e.Item1 != null)
     {
         foreach (Camera_Preset preset in e.Item1.Cameras)
         {
             foreach (UIElement uiE in this.UIMapContent.Children)
             {
                 if (uiE is UIMapCamera)
                 {
                     UIMapCamera uiCamera = uiE as UIMapCamera;
                     if (preset.camera_id == App.DataCamera[uiCamera.Postion].id)
                     {
                         if (e.Item2)
                         {
                             if (uiCamera.Goto((uint)preset.Postion))
                             {
                                 uiCamera.Alarm();
                             }
                         }
                     }
                 }
             }
         }
     }
 }