TwitterParser
Changes
.gitignore 11(+11 -0)
TryTwitter/TryParseWeb/App.config 6(+6 -0)
TryTwitter/TryParseWeb/Form1.cs 134(+134 -0)
TryTwitter/TryParseWeb/Form1.Designer.cs 328(+328 -0)
TryTwitter/TryParseWeb/Form1.resx 126(+126 -0)
TryTwitter/TryParseWeb/Form1Model.cs 94(+94 -0)
TryTwitter/TryParseWeb/Program.cs 22(+22 -0)
TryTwitter/TryParseWeb/Properties/Resources.resx 117(+117 -0)
TryTwitter/TryParseWeb/TryParseWeb.csproj 83(+83 -0)
TryTwitter/TryTwitter.sln 31(+31 -0)
TryTwitter/TryTwitter/App.config 30(+30 -0)
TryTwitter/TryTwitter/packages.config 15(+15 -0)
TryTwitter/TryTwitter/Program.cs 46(+46 -0)
TryTwitter/TryTwitter/TryTwitter.csproj 91(+91 -0)
Details
.gitignore 11(+11 -0)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f303fbf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+
+TryTwitter/.vs/TryTwitter/v15/
+
+TryTwitter/packages/
+
+
+TryTwitter/TryTwitter/bin/
+TryTwitter/TryTwitter/obj/
+
+TryTwitter/TryParseWeb/bin/
+TryTwitter/TryParseWeb/obj/
TryTwitter/TryParseWeb/App.config 6(+6 -0)
diff --git a/TryTwitter/TryParseWeb/App.config b/TryTwitter/TryParseWeb/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/TryTwitter/TryParseWeb/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ </startup>
+</configuration>
\ No newline at end of file
TryTwitter/TryParseWeb/Form1.cs 134(+134 -0)
diff --git a/TryTwitter/TryParseWeb/Form1.cs b/TryTwitter/TryParseWeb/Form1.cs
new file mode 100644
index 0000000..9d13590
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Form1.cs
@@ -0,0 +1,134 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using System.Threading;
+
+namespace TryParseWeb
+{
+ public partial class Form1 : Form
+ {
+ private Form1Model model = new Form1Model();
+
+ public Form1()
+ {
+ InitializeComponent();
+
+ textBox_ScrollDepp.Text = model.ScroolDeep.ToString();
+ textBox_FirstLoadDelay.Text = model.FirstLoadDelay_sec.ToString();
+ textBox_ScrollDelay.Text = model.ScrollDelay_sec.ToString();
+ }
+
+
+ //async void Work()
+ //{
+
+
+
+ // var scroll = await Delay(7000, 50000);
+ // webBrowser1.Document.Window.ScrollTo(0, scroll);
+ // scroll = await Delay(15000, 0);
+ // var res = Find(webBrowser1.Document, scroll);
+ //}
+
+
+ private Task<int> Delay(int delay, int res)
+ {
+ return Task.Run(() =>
+ {
+ Thread.Sleep(delay);
+ return res;
+ });
+ }
+
+
+ private async void button_Start_Click(object sender, EventArgs e)
+ {
+ button_Settings_Click(sender, e);
+
+ button_Start.Enabled = false;
+ //button_Settings.Enabled = false;
+ button_SaveText.Enabled = false;
+ button_SaveXML.Enabled = false;
+
+ textBox_ScrollDepp.Enabled = false;
+ textBox_FirstLoadDelay.Enabled = false;
+ textBox_ScrollDelay.Enabled = false;
+
+ try
+ {
+ model.URL = textBox_URL.Text;
+ webBrowser1.Url = new Uri(model.URL);
+
+ await Delay(model.FirstLoadDelay_mlsec, model.ScrollDelay_mlsec);
+
+ for (int i = 0; i < model.ScroolDeep; i++)
+ {
+ label_Progress.Text = (i+1) + " из " + model.ScroolDeep;
+
+ webBrowser1.Document.Window.ScrollTo(0, webBrowser1.Document.Body.ScrollRectangle.Height);
+ await Delay(model.ScrollDelay_mlsec, model.ScrollDelay_mlsec);
+ }
+
+ var res = model.SaveResult(
+ webBrowser1.Document.Body.InnerHtml);
+
+ label_Result.Text = "Обнаружено: " + res.Count + " Записей";
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Ошибка: " + ex.Message);
+ }
+
+
+ button_Start.Enabled = true;
+ //button_Settings.Enabled = true;
+ button_SaveText.Enabled = true;
+ button_SaveXML.Enabled = true;
+
+ textBox_ScrollDepp.Enabled = true;
+ textBox_FirstLoadDelay.Enabled = true;
+ textBox_ScrollDelay.Enabled = true;
+ }
+
+ private void button_Settings_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ model.ScroolDeep = int.Parse(textBox_ScrollDepp.Text);
+ model.FirstLoadDelay_sec = int.Parse(textBox_FirstLoadDelay.Text);
+ model.ScrollDelay_sec = int.Parse(textBox_ScrollDelay.Text);
+ }
+ catch (Exception ex)
+ {
+ textBox_ScrollDepp.Text = model.ScroolDeep.ToString();
+ textBox_FirstLoadDelay.Text = model.FirstLoadDelay_sec.ToString();
+ textBox_ScrollDelay.Text = model.ScrollDelay_sec.ToString();
+ }
+ }
+
+ private void button_SaveText_Click(object sender, EventArgs e)
+ {
+ if (saveFileDialog1.ShowDialog() == DialogResult.Cancel)
+ return;
+
+ model.ExportText(saveFileDialog1.FileName);
+ }
+
+ private void button_SaveXML_Click(object sender, EventArgs e)
+ {
+ if (saveFileDialog1.ShowDialog() == DialogResult.Cancel)
+ return;
+
+ model.ExportXML(saveFileDialog1.FileName);
+ }
+
+ }
+}
+
TryTwitter/TryParseWeb/Form1.Designer.cs 328(+328 -0)
diff --git a/TryTwitter/TryParseWeb/Form1.Designer.cs b/TryTwitter/TryParseWeb/Form1.Designer.cs
new file mode 100644
index 0000000..4498a89
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Form1.Designer.cs
@@ -0,0 +1,328 @@
+namespace TryParseWeb
+{
+ partial class Form1
+ {
+ /// <summary>
+ /// Обязательная переменная конструктора.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Освободить все используемые ресурсы.
+ /// </summary>
+ /// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Код, автоматически созданный конструктором форм Windows
+
+ /// <summary>
+ /// Требуемый метод для поддержки конструктора — не изменяйте
+ /// содержимое этого метода с помощью редактора кода.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.webBrowser1 = new System.Windows.Forms.WebBrowser();
+ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.textBox_ScrollDepp = new System.Windows.Forms.TextBox();
+ this.textBox_FirstLoadDelay = new System.Windows.Forms.TextBox();
+ this.textBox_ScrollDelay = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
+ this.label_Result = new System.Windows.Forms.Label();
+ this.button_SaveText = new System.Windows.Forms.Button();
+ this.button_SaveXML = new System.Windows.Forms.Button();
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.textBox_URL = new System.Windows.Forms.TextBox();
+ this.button_Start = new System.Windows.Forms.Button();
+ this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
+ this.label_Progress = new System.Windows.Forms.Label();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel3.SuspendLayout();
+ this.tableLayoutPanel4.SuspendLayout();
+ this.tableLayoutPanel2.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.tableLayoutPanel7.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // webBrowser1
+ //
+ this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.webBrowser1.Location = new System.Drawing.Point(3, 3);
+ this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
+ this.webBrowser1.Name = "webBrowser1";
+ this.webBrowser1.Size = new System.Drawing.Size(301, 360);
+ this.webBrowser1.TabIndex = 0;
+ //
+ // tableLayoutPanel3
+ //
+ this.tableLayoutPanel3.ColumnCount = 2;
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel3.Controls.Add(this.label1, 0, 0);
+ this.tableLayoutPanel3.Controls.Add(this.label2, 0, 1);
+ this.tableLayoutPanel3.Controls.Add(this.textBox_ScrollDepp, 1, 0);
+ this.tableLayoutPanel3.Controls.Add(this.textBox_FirstLoadDelay, 1, 1);
+ this.tableLayoutPanel3.Controls.Add(this.textBox_ScrollDelay, 1, 2);
+ this.tableLayoutPanel3.Controls.Add(this.label3, 0, 2);
+ this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel3.Location = new System.Drawing.Point(10, 127);
+ this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(10);
+ this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+ this.tableLayoutPanel3.RowCount = 3;
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel3.Size = new System.Drawing.Size(274, 97);
+ this.tableLayoutPanel3.TabIndex = 2;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label1.Location = new System.Drawing.Point(5, 5);
+ this.label1.Margin = new System.Windows.Forms.Padding(5);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(127, 22);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Глубина (кол-во скролов)";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label2.Location = new System.Drawing.Point(5, 37);
+ this.label2.Margin = new System.Windows.Forms.Padding(5);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(127, 22);
+ this.label2.TabIndex = 1;
+ this.label2.Text = "Задержка первой загрузки страницы (с)";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // textBox_ScrollDepp
+ //
+ this.textBox_ScrollDepp.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox_ScrollDepp.Location = new System.Drawing.Point(140, 3);
+ this.textBox_ScrollDepp.Name = "textBox_ScrollDepp";
+ this.textBox_ScrollDepp.Size = new System.Drawing.Size(131, 20);
+ this.textBox_ScrollDepp.TabIndex = 2;
+ this.textBox_ScrollDepp.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // textBox_FirstLoadDelay
+ //
+ this.textBox_FirstLoadDelay.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox_FirstLoadDelay.Location = new System.Drawing.Point(140, 35);
+ this.textBox_FirstLoadDelay.Name = "textBox_FirstLoadDelay";
+ this.textBox_FirstLoadDelay.Size = new System.Drawing.Size(131, 20);
+ this.textBox_FirstLoadDelay.TabIndex = 3;
+ this.textBox_FirstLoadDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // textBox_ScrollDelay
+ //
+ this.textBox_ScrollDelay.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox_ScrollDelay.Location = new System.Drawing.Point(140, 67);
+ this.textBox_ScrollDelay.Name = "textBox_ScrollDelay";
+ this.textBox_ScrollDelay.Size = new System.Drawing.Size(131, 20);
+ this.textBox_ScrollDelay.TabIndex = 4;
+ this.textBox_ScrollDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label3.Location = new System.Drawing.Point(5, 69);
+ this.label3.Margin = new System.Windows.Forms.Padding(5);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(127, 23);
+ this.label3.TabIndex = 5;
+ this.label3.Text = "Задержка при прокрутке (с)";
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // tableLayoutPanel4
+ //
+ this.tableLayoutPanel4.ColumnCount = 1;
+ this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel4.Controls.Add(this.label_Result, 0, 0);
+ this.tableLayoutPanel4.Controls.Add(this.button_SaveText, 0, 1);
+ this.tableLayoutPanel4.Controls.Add(this.button_SaveXML, 0, 2);
+ this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel4.Location = new System.Drawing.Point(10, 244);
+ this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(10);
+ this.tableLayoutPanel4.Name = "tableLayoutPanel4";
+ this.tableLayoutPanel4.RowCount = 3;
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(274, 98);
+ this.tableLayoutPanel4.TabIndex = 3;
+ //
+ // label_Result
+ //
+ this.label_Result.AutoSize = true;
+ this.label_Result.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label_Result.Location = new System.Drawing.Point(3, 0);
+ this.label_Result.Name = "label_Result";
+ this.label_Result.Size = new System.Drawing.Size(268, 32);
+ this.label_Result.TabIndex = 0;
+ this.label_Result.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // button_SaveText
+ //
+ this.button_SaveText.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.button_SaveText.Location = new System.Drawing.Point(3, 35);
+ this.button_SaveText.Name = "button_SaveText";
+ this.button_SaveText.Size = new System.Drawing.Size(268, 26);
+ this.button_SaveText.TabIndex = 1;
+ this.button_SaveText.Text = "Сохранить как текст";
+ this.button_SaveText.UseVisualStyleBackColor = true;
+ this.button_SaveText.Click += new System.EventHandler(this.button_SaveText_Click);
+ //
+ // button_SaveXML
+ //
+ this.button_SaveXML.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.button_SaveXML.Location = new System.Drawing.Point(3, 67);
+ this.button_SaveXML.Name = "button_SaveXML";
+ this.button_SaveXML.Size = new System.Drawing.Size(268, 28);
+ this.button_SaveXML.TabIndex = 2;
+ this.button_SaveXML.Text = "Сохранить в XML";
+ this.button_SaveXML.UseVisualStyleBackColor = true;
+ this.button_SaveXML.Click += new System.EventHandler(this.button_SaveXML_Click);
+ //
+ // tableLayoutPanel2
+ //
+ this.tableLayoutPanel2.ColumnCount = 1;
+ this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel2.Controls.Add(this.textBox_URL, 0, 0);
+ this.tableLayoutPanel2.Controls.Add(this.button_Start, 0, 1);
+ this.tableLayoutPanel2.Controls.Add(this.label_Progress, 0, 2);
+ this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(10, 10);
+ this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(10);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ this.tableLayoutPanel2.RowCount = 3;
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(274, 97);
+ this.tableLayoutPanel2.TabIndex = 1;
+ //
+ // textBox_URL
+ //
+ this.textBox_URL.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox_URL.Location = new System.Drawing.Point(3, 3);
+ this.textBox_URL.Name = "textBox_URL";
+ this.textBox_URL.Size = new System.Drawing.Size(268, 20);
+ this.textBox_URL.TabIndex = 0;
+ this.textBox_URL.Text = "EnterURL";
+ this.textBox_URL.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // button_Start
+ //
+ this.button_Start.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.button_Start.Location = new System.Drawing.Point(3, 35);
+ this.button_Start.Name = "button_Start";
+ this.button_Start.Size = new System.Drawing.Size(268, 26);
+ this.button_Start.TabIndex = 1;
+ this.button_Start.Text = "Start";
+ this.button_Start.UseVisualStyleBackColor = true;
+ this.button_Start.Click += new System.EventHandler(this.button_Start_Click);
+ //
+ // label_Progress
+ //
+ this.label_Progress.AutoSize = true;
+ this.label_Progress.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label_Progress.Location = new System.Drawing.Point(3, 64);
+ this.label_Progress.Name = "label_Progress";
+ this.label_Progress.Size = new System.Drawing.Size(268, 33);
+ this.label_Progress.TabIndex = 2;
+ this.label_Progress.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.Controls.Add(this.webBrowser1, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel7, 1, 0);
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 1;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(615, 366);
+ this.tableLayoutPanel1.TabIndex = 2;
+ //
+ // tableLayoutPanel7
+ //
+ this.tableLayoutPanel7.ColumnCount = 1;
+ this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel4, 0, 2);
+ this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel3, 0, 1);
+ this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel2, 0, 0);
+ this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel7.Location = new System.Drawing.Point(314, 7);
+ this.tableLayoutPanel7.Margin = new System.Windows.Forms.Padding(7);
+ this.tableLayoutPanel7.Name = "tableLayoutPanel7";
+ this.tableLayoutPanel7.RowCount = 3;
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+ this.tableLayoutPanel7.Size = new System.Drawing.Size(294, 352);
+ this.tableLayoutPanel7.TabIndex = 0;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(639, 390);
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.tableLayoutPanel3.ResumeLayout(false);
+ this.tableLayoutPanel3.PerformLayout();
+ this.tableLayoutPanel4.ResumeLayout(false);
+ this.tableLayoutPanel4.PerformLayout();
+ this.tableLayoutPanel2.ResumeLayout(false);
+ this.tableLayoutPanel2.PerformLayout();
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel7.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ private System.Windows.Forms.WebBrowser webBrowser1;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ private System.Windows.Forms.TextBox textBox_URL;
+ private System.Windows.Forms.Button button_Start;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox textBox_ScrollDepp;
+ private System.Windows.Forms.TextBox textBox_FirstLoadDelay;
+ private System.Windows.Forms.TextBox textBox_ScrollDelay;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label_Result;
+ private System.Windows.Forms.Button button_SaveText;
+ private System.Windows.Forms.Button button_SaveXML;
+ private System.Windows.Forms.SaveFileDialog saveFileDialog1;
+ private System.Windows.Forms.Label label_Progress;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel7;
+ }
+}
+
TryTwitter/TryParseWeb/Form1.resx 126(+126 -0)
diff --git a/TryTwitter/TryParseWeb/Form1.resx b/TryTwitter/TryParseWeb/Form1.resx
new file mode 100644
index 0000000..31fa1e7
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Form1.resx
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>45</value>
+ </metadata>
+</root>
\ No newline at end of file
TryTwitter/TryParseWeb/Form1Model.cs 94(+94 -0)
diff --git a/TryTwitter/TryParseWeb/Form1Model.cs b/TryTwitter/TryParseWeb/Form1Model.cs
new file mode 100644
index 0000000..a118e15
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Form1Model.cs
@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using System.IO;
+using System.Xml.Serialization;
+
+namespace TryParseWeb
+{
+ [Serializable]
+ public class Form1Model
+ {
+ [XmlIgnore]
+ public int ScroolDeep { set; get; } = 10;
+
+ [XmlIgnore]
+ public int FirstLoadDelay_mlsec { private set; get; } = 3000;
+ [XmlIgnore]
+ public int FirstLoadDelay_sec
+ {
+ set { FirstLoadDelay_mlsec = value * 1000; }
+ get { return FirstLoadDelay_mlsec/1000; }
+ }
+
+ [XmlIgnore]
+ public int ScrollDelay_mlsec { private set; get; } = 3000;
+ [XmlIgnore]
+ public int ScrollDelay_sec
+ {
+ set { ScrollDelay_mlsec = value * 1000; }
+ get { return ScrollDelay_mlsec / 1000; }
+ }
+
+
+ public string URL { set; get; }
+ public List<string> Resul { private set; get; } = new List<string>();
+
+
+ public List<string> SaveResult(string HTML_Body)
+ {
+ Resul.Clear();
+
+ for (int i = HTML_Body.IndexOf("TweetTextSize"); i != -1; i = i = HTML_Body.IndexOf("TweetTextSize", i + 1))
+ {
+ StringBuilder res = new StringBuilder();
+
+ for (; HTML_Body[i] != '<' && i < HTML_Body.Length; i++)
+ {
+ res.Append(HTML_Body[i]);
+ }
+
+ var split = res.ToString().Trim().Split('>');
+ res.Clear();
+ for (int j = 1; j < split.Length; j++)
+ {
+ res.Append(split[j]);
+ }
+
+ Resul.Add(res.ToString());
+ }
+
+ return Resul;
+ }
+
+ public void ExportText(string FileName)
+ {
+ using (FileStream fs = new FileStream(FileName, FileMode.Create))
+ {
+ using (StreamWriter sw = new StreamWriter(fs))
+ {
+ sw.WriteLine("URL\n" + URL);
+
+ for (int i = 0; i < Resul.Count; i++)
+ {
+ var elem = Resul[i];
+ sw.WriteLine("[" + i + "]\n" + elem);
+ }
+ }
+ }
+ }
+ public void ExportXML(string FileName)
+ {
+ XmlSerializer serializer = new XmlSerializer(typeof(Form1Model));
+
+ using (FileStream fs = new FileStream(FileName, FileMode.Create))
+ {
+ serializer.Serialize(fs, this);
+ }
+ }
+
+ }
+}
TryTwitter/TryParseWeb/Program.cs 22(+22 -0)
diff --git a/TryTwitter/TryParseWeb/Program.cs b/TryTwitter/TryParseWeb/Program.cs
new file mode 100644
index 0000000..c88dd03
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace TryParseWeb
+{
+ static class Program
+ {
+ /// <summary>
+ /// Главная точка входа для приложения.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/TryTwitter/TryParseWeb/Properties/AssemblyInfo.cs b/TryTwitter/TryParseWeb/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8e22b97
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("TryParseWeb")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TryParseWeb")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
+[assembly: ComVisible(false)]
+
+// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
+[assembly: Guid("2902bbf2-693e-4f64-beef-d82fe2dbfb21")]
+
+// Сведения о версии сборки состоят из следующих четырех значений:
+//
+// Основной номер версии
+// Дополнительный номер версии
+// Номер сборки
+// Редакция
+//
+// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TryTwitter/TryParseWeb/Properties/Resources.Designer.cs b/TryTwitter/TryParseWeb/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..109295e
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// Этот код создан программным средством.
+// Версия среды выполнения: 4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+// код создан повторно.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace TryParseWeb.Properties
+{
+
+
+ /// <summary>
+ /// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
+ /// </summary>
+ // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
+ // класс с помощью таких средств, как ResGen или Visual Studio.
+ // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
+ // с параметром /str или заново постройте свой VS-проект.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TryParseWeb.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Переопределяет свойство CurrentUICulture текущего потока для всех
+ /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
TryTwitter/TryParseWeb/Properties/Resources.resx 117(+117 -0)
diff --git a/TryTwitter/TryParseWeb/Properties/Resources.resx b/TryTwitter/TryParseWeb/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Properties/Resources.resx
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/TryTwitter/TryParseWeb/Properties/Settings.Designer.cs b/TryTwitter/TryParseWeb/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..e39e5be
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace TryParseWeb.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/TryTwitter/TryParseWeb/Properties/Settings.settings b/TryTwitter/TryParseWeb/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/TryTwitter/TryParseWeb/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
TryTwitter/TryParseWeb/TryParseWeb.csproj 83(+83 -0)
diff --git a/TryTwitter/TryParseWeb/TryParseWeb.csproj b/TryTwitter/TryParseWeb/TryParseWeb.csproj
new file mode 100644
index 0000000..45f8d77
--- /dev/null
+++ b/TryTwitter/TryParseWeb/TryParseWeb.csproj
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <RootNamespace>TryParseWeb</RootNamespace>
+ <AssemblyName>TryParseWeb</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Form1.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Form1.Designer.cs">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Form1Model.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="Form1.resx">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
TryTwitter/TryTwitter.sln 31(+31 -0)
diff --git a/TryTwitter/TryTwitter.sln b/TryTwitter/TryTwitter.sln
new file mode 100644
index 0000000..e4253e3
--- /dev/null
+++ b/TryTwitter/TryTwitter.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.136
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TryTwitter", "TryTwitter\TryTwitter.csproj", "{46A8157F-400C-4DFF-B941-748DAE81C93D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TryParseWeb", "TryParseWeb\TryParseWeb.csproj", "{2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {46A8157F-400C-4DFF-B941-748DAE81C93D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {46A8157F-400C-4DFF-B941-748DAE81C93D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {46A8157F-400C-4DFF-B941-748DAE81C93D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {46A8157F-400C-4DFF-B941-748DAE81C93D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2902BBF2-693E-4F64-BEEF-D82FE2DBFB21}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {9D8DC416-B219-4D8F-AC22-13E0875E5B0D}
+ EndGlobalSection
+EndGlobal
TryTwitter/TryTwitter/App.config 30(+30 -0)
diff --git a/TryTwitter/TryTwitter/App.config b/TryTwitter/TryTwitter/App.config
new file mode 100644
index 0000000..3c1227c
--- /dev/null
+++ b/TryTwitter/TryTwitter/App.config
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
+ </startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.1" newVersion="4.1.1.1" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.TypeExtensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
TryTwitter/TryTwitter/packages.config 15(+15 -0)
diff --git a/TryTwitter/TryTwitter/packages.config b/TryTwitter/TryTwitter/packages.config
new file mode 100644
index 0000000..4c2bb29
--- /dev/null
+++ b/TryTwitter/TryTwitter/packages.config
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Nito.AsyncEx.Tasks" version="1.1.0" targetFramework="net47" />
+ <package id="Nito.Disposables" version="1.0.0" targetFramework="net47" />
+ <package id="NitoAsyncEx.Context.StrongName" version="1.1.0" targetFramework="net47" />
+ <package id="System.IO" version="4.3.0" targetFramework="net47" />
+ <package id="System.Net.Http" version="4.3.2" targetFramework="net47" />
+ <package id="System.Reflection" version="4.3.0" targetFramework="net47" />
+ <package id="System.Reflection.TypeExtensions" version="4.3.0" targetFramework="net47" />
+ <package id="System.Runtime" version="4.3.0" targetFramework="net47" />
+ <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net47" />
+ <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net47" />
+ <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net47" />
+ <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net47" />
+</packages>
\ No newline at end of file
TryTwitter/TryTwitter/Program.cs 46(+46 -0)
diff --git a/TryTwitter/TryTwitter/Program.cs b/TryTwitter/TryTwitter/Program.cs
new file mode 100644
index 0000000..b1ab892
--- /dev/null
+++ b/TryTwitter/TryTwitter/Program.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+// REST API
+using Tweetinvi;
+using Tweetinvi.Models;
+using Tweetinvi.Parameters;
+
+// STREAM API
+using Tweetinvi.Streaming;
+using Stream = Tweetinvi.Stream;
+
+// Others
+using Tweetinvi.Exceptions; // Handle Exceptions
+using Tweetinvi.Core.Extensions;
+using Tweetinvi.Core.Public.Parameters;
+// Extension methods provided by Tweetinvi
+using Tweetinvi.Models.DTO; // Data Transfer Objects for Serialization
+using Tweetinvi.Json;
+using Tweetinvi.Logic.Model;
+using Geo = Tweetinvi.Geo;
+using SavedSearch = Tweetinvi.SavedSearch;
+
+
+namespace TryTwitter
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");
+
+ //TweetinviEvents.QueryBeforeExecute += (sender, args) =>
+ //{
+ // Console.WriteLine(args.QueryURL);
+ //};
+
+ var authenticatedUser = User.GetAuthenticatedUser();
+
+ Console.WriteLine(authenticatedUser);
+ }
+ }
+}
diff --git a/TryTwitter/TryTwitter/Properties/AssemblyInfo.cs b/TryTwitter/TryTwitter/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d3c3d6f
--- /dev/null
+++ b/TryTwitter/TryTwitter/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("TryTwitter")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TryTwitter")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
+[assembly: ComVisible(false)]
+
+// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
+[assembly: Guid("46a8157f-400c-4dff-b941-748dae81c93d")]
+
+// Сведения о версии сборки состоят из следующих четырех значений:
+//
+// Основной номер версии
+// Дополнительный номер версии
+// Номер сборки
+// Редакция
+//
+// Можно задать все значения или принять номер сборки и номер редакции по умолчанию.
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
TryTwitter/TryTwitter/TryTwitter.csproj 91(+91 -0)
diff --git a/TryTwitter/TryTwitter/TryTwitter.csproj b/TryTwitter/TryTwitter/TryTwitter.csproj
new file mode 100644
index 0000000..f1d2c94
--- /dev/null
+++ b/TryTwitter/TryTwitter/TryTwitter.csproj
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{46A8157F-400C-4DFF-B941-748DAE81C93D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>TryTwitter</RootNamespace>
+ <AssemblyName>TryTwitter</AssemblyName>
+ <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <Deterministic>true</Deterministic>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Nito.AsyncEx.Tasks, Version=1.1.0.0, Culture=neutral, PublicKeyToken=7247f14397bf67b9, processorArchitecture=MSIL">
+ <HintPath>..\packages\NitoAsyncEx.Context.StrongName.1.1.0\lib\net461\Nito.AsyncEx.Tasks.dll</HintPath>
+ </Reference>
+ <Reference Include="Nito.Disposables, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7247f14397bf67b9, processorArchitecture=MSIL">
+ <HintPath>..\packages\NitoAsyncEx.Context.StrongName.1.1.0\lib\net461\Nito.Disposables.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
+ </Reference>
+ <Reference Include="System.IO.Compression.FileSystem" />
+ <Reference Include="System.Net.Http, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Net.Http.4.3.2\lib\net46\System.Net.Http.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Numerics" />
+ <Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reflection.TypeExtensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Reflection.TypeExtensions.4.3.0\lib\net462\System.Reflection.TypeExtensions.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file