Exemple #1
0
        private void cbService_SelectedIndexChanged(object sender, EventArgs ea)
        {
            _headers.Clear();
            tvSelector.Nodes.Clear();
            TreeNode root = new TreeNode();

            GnipSources source = (GnipSources)Enum.Parse(typeof(GnipSources), cbSource.Text);

            _settings.source = source;
            Type outputType = GnipStreamProcessor.GetObjectTypeByService(source);

            PopulateTreeWithTheFields(outputType, root);
            TraceHeaders();
            tvSelector.Nodes.Add(root);
            tvSelector.ExpandAll();
        }
Exemple #2
0
        void processor_ErrorHappened(object sender, Exception ex)
        {
            GnipStreamProcessor processor = sender as GnipStreamProcessor;

            if (processor == null)
            {
                return;
            }

            WriteLineToTrace("Error happened:{0}\t{1}", Environment.NewLine, ex.Message);
            WriteLineToTrace("Data fetching has been canceled.");

            processor.EndStreaming();
            SetControlPropertyThreadSafe(pbProgress, "Value", 0);
            SetControlPropertyThreadSafe(bStart, "Text", "Start");
            EnableControls(true);
            _isRun = false;
        }