예제 #1
0
        public override void Decrypt(byte[] buffer, int offset, int length, IConsolidator output)
        {
            if (this._unpackBuffer == null)
            {
                this._unpackBuffer = new byte[65536];
            }
            int length1 = this.Decrypt(buffer, offset, length, this._unpackBuffer, 0);

            output.Enqueue(this._unpackBuffer, 0, length1);
        }
예제 #2
0
        /// <summary>
        /// Calls the static method of ConsolidationHelper and update the matrix-fields.
        /// </summary>
        /// <param name="sender">Start-Consolidation-Button is the sender.</param>
        /// <param name="e">Current event.</param>
        /// <author>Christopher Licht</author>
        private void StartConsolidationClick(object sender, RoutedEventArgs e)
        {
            HashSet <Field>  listOfFieldsWhichFulfilledSelectedOptions = new HashSet <Field>();
            HashSet <String> listOfSelectedEvents = new HashSet <String>();
            HashSet <Field>  listOfMatrixFields   = new HashSet <Field>();
            int andOrSelection = -1;

            _listOfSelectedOptions = new HashSet <String>();

            andOrSelection = AndRadioButton.IsChecked == true ? 0 : 1;

            foreach (String selectedListViewItem in ConsolidationListBox.SelectedItems)
            {
                _listOfSelectedOptions.Add(selectedListViewItem);
            }

            foreach (String selectedEvent in EventListBox.SelectedItems)
            {
                listOfSelectedEvents.Add(selectedEvent);
            }

            foreach (var matrixField in MainWindow.MatrixSelection.MatrixFields)
            {
                listOfMatrixFields.Add(matrixField);
            }

            if (andOrSelection == 0 && (_listOfSelectedOptions.Count < 2))
            {
                ModernDialog.ShowMessage("Your selected operator is AND. Please select two options minimum from the available options.", "Attention", MessageBoxButton.OK);
            }
            else
            {
                ConsolidatorSettings.AddOrUpdateKey("SelectedOptions", _listOfSelectedOptions);
                ConsolidatorSettings.AddOrUpdateKey("SelectedEvents", listOfSelectedEvents);
                ConsolidatorSettings.AddOrUpdateKey("NumberOfEvents", (int)NumberOfEventsSlider.Value);
                ConsolidatorSettings.AddOrUpdateKey("AndOrSelection", (int)andOrSelection);

                IConsolidator   consolidator            = ConsolidatorFactory.CreateConsolidator <StandardConsolidator>(listOfMatrixFields);
                HashSet <Field> listOfConsolidateFields = consolidator.Consolidate();

                if (listOfConsolidateFields.Count == 0)
                {
                    ModernDialog.ShowMessage("No results were found.", "Consolidation", MessageBoxButton.OK);
                }
                else
                {
                    MatrixVisualizationGrid.ItemsSource = null;
                    MatrixVisualizationGrid.ItemsSource = listOfConsolidateFields;
                }
            }
        }
예제 #3
0
 public override void Encrypt(byte[] buffer, int offset, int length, IConsolidator output)
 {
     output.Enqueue(buffer, offset, length);
 }
예제 #4
0
 public abstract void Encrypt(byte[] buffer, int offset, int length, IConsolidator output);