예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     document = new Web_Document(" ");
     listHost = new ListHost();
     listHost = Lib.LoadJsonFileToListHost(Web_Document.filePathJson);
     document.IntListHost(listHost);
 }
예제 #2
0
        private void Button_TestFullTag_Click(object sender, RoutedEventArgs e)
        {
            Web_Document doc = new Web_Document("");

            doc.UpdateDocumentWithNewUrl(this.textBox_Url_Test.Text);

            //TAG.Host = "wikidich";
            //this.TextBox_Result.Text = doc.ToString();
            ListHost ls = new ListHost();

            ls.tag.Add(TAG);
            doc.IntListHost(ls);

            doc.DetectHost(this.textBox_Url_Test.Text);

            String data = doc.GetContentInDocument(Web_Document.IndexOfArray_BookName) + Environment.NewLine;

            data += doc.GetContentInDocument(Web_Document.IndexOfArray_ChapName) + Environment.NewLine;
            data += doc.GetContentInDocument(Web_Document.IndexOfArray_ChapContent) + Environment.NewLine;
            data += doc.GetContentInDocument(Web_Document.IndexOfArray_UrlNext) + Environment.NewLine;
            this.TextBox_Result.Text = data;
        }
예제 #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            HostTag TAG = new HostTag();

            int    index = (this.comboBox_Tag.SelectedItem as ItemComboBox).Value;
            String test  = (this.comboBox_Tag.SelectedItem.ToString());

            TAG = GetHostFromForm();

            test += "  " + (this.comboBox_Type.SelectedItem as ItemComboBox).Value;
            test += "  \"" + this.TextBox_Name.Text + "\"";
            test += "  " + (this.comboBox_TypeToGet.SelectedItem as ItemComboBox).Value;
            test += "  " + Int16.Parse(this.textBox_Index.Text);
            test += "  " + (this.comboBox_Att_Type_Compare.SelectedItem as ItemComboBox).Value;
            test += "  \"" + this.textBox_StrToCompare.Text + "\"";
            test += "  " + (this.comboBox_Att_Type_Get.SelectedItem as ItemComboBox).Value;



            Web_Document doc = new Web_Document("");

            doc.UpdateDocumentWithNewUrl(this.textBox_Url_Test.Text);

            //TAG.Host = "wikidich";
            //this.TextBox_Result.Text = doc.ToString();
            ListHost ls = new ListHost();

            ls.tag.Add(TAG);
            doc.IntListHost(ls);

            doc.DetectHost(this.textBox_Url_Test.Text);

            String data = doc.GetContentInDocument((Int16)index);

            this.TextBox_Result.Text = data;

            this.TextBox_Result.Text += Environment.NewLine + test;
        }