示例#1
0
        public async void DeleteCamera(string id, string videoStreamArn, string dataStreamName, string eventSourceUUID, string streamProcessorName, CameraView cv)
        {
            ProgressDialogController controller = await this.ShowProgressAsync("Please wait...", "");

            controller.SetIndeterminate();
            controller.SetCancelable(false);

            controller.SetMessage("Deleting event source mapping");
            await Task.Run(() => Models.Lambda.DeleteEventSourceMapping(eventSourceUUID));

            controller.SetMessage("Deleting data stream");
            await Task.Run(() => Models.DataStream.DeleteDataStream(dataStreamName));

            controller.SetMessage("Deleting video stream");
            await Task.Run(() => Models.VideoStream.DeleteVideoStream(videoStreamArn));

            controller.SetMessage("Deleting stream processor");
            await Task.Run(() => Models.StreamProcessorManager.DeleteStreamProcessor(streamProcessorName));

            controller.SetMessage("Deleting database record");
            await Task.Run(() => Models.Dynamodb.DeleteItem(id, Models.MyAWSConfigs.CamerasDBTableName));

            await controller.CloseAsync();

            cv.LoadCamerasData().ConfigureAwait(false);

            notifyIcon.Visible = true;
            notifyIcon.ShowBalloonTip(1000, "Deleted", "Camera deleted Successfully", System.Windows.Forms.ToolTipIcon.Info);
        }
示例#2
0
        private void ButtonMenuCameras_Click(object sender, RoutedEventArgs e)
        {
            MenuPage.Content = cameraView;
            lblTitle.Content = "CAMERAS";

            ButtonMenuCameras.Background = Brushes.MediumSeaGreen;
            cameraIcon.Foreground        = Brushes.White;
            cameraLable.Foreground       = Brushes.White;

            ButtonMenuPeopleIn.Background = null;
            historyIcon.Foreground        = Brushes.MediumSeaGreen;
            historyLable.Foreground       = Brushes.MediumSeaGreen;

            ButtonMenuHome.Background = null;
            homeIcon.Foreground       = Brushes.MediumSeaGreen;
            homeLable.Foreground      = Brushes.MediumSeaGreen;

            ButtonMenuAllPeople.Background = null;
            refIcon.Foreground             = Brushes.MediumSeaGreen;
            refLable.Foreground            = Brushes.MediumSeaGreen;

            ButtonMenuReaders.Background = null;
            readerIcon.Foreground        = Brushes.MediumSeaGreen;
            readerLable.Foreground       = Brushes.MediumSeaGreen;

            ButtonMenuAdmins.Background = null;
            adminIcon.Foreground        = Brushes.MediumSeaGreen;
            adminLable.Foreground       = Brushes.MediumSeaGreen;

            ButtonMenuActivityLogs.Background = null;
            logsIcon.Foreground  = Brushes.MediumSeaGreen;
            logsLable.Foreground = Brushes.MediumSeaGreen;

            cameraView.LoadCamerasData().ConfigureAwait(false);
        }