Exemplo n.º 1
0
 public void css_compile()
 {
     try
     {
         compiler = new Compiler(text.start);
         compiler.css_comile(Kind_word.End);
     }
     catch (Exception_end) { }
     catch (Exception_error) { }
     css_check(text, compiler);
     text.canvas.selects.show(get_position());
 }
Exemplo n.º 2
0
        public void html_compile()
        {
            compiler = new Compiler(text.start);
            try
            {
                compiler.html_compile();
            }
            catch (Exception_end) { }
            catch (Exception_error) { }
            switch (word.type)
            {
                case Type_value.Tag_name:

                    foreach (Tag_element tag in Tag_element.Base_tags[word.item.name].tags)
                    {
                        text.canvas.selects.add(new Select(tag.name, tag.explain, Kind_select.Tag));
                    }
                    break;
                case Type_value.Tag_attribute:
                    foreach (Tag_attribute attribute in Tag_element.Base_tags[word.item.name].attributes)
                    {
                        text.canvas.selects.add(new Select(attribute.name, attribute.explain, Kind_select.Tag_attribute));
                    }
                    break;
                case Type_value.Tag_attribute_value:
                    foreach (Tag_value value in Tag_element.Base_tag_attributes[word.item.name].values)
                    {
                        text.canvas.selects.add(new Select(value.name, value.explain, Kind_select.Tag_value));
                    }
                    break;
                case Type_value.Tag_close_name:
                    text.canvas.selects.add(new Select(word.item.name, "", Kind_select.Tag));
                    break;
                default:
                    css_check(text, compiler);
                    break;
            }
            text.canvas.selects.show(get_position());
        }
Exemplo n.º 3
0
 public void css_check(Text text, Compiler compiler)
 {
     switch (word.type)
     {
         case Type_value.Style_attribute_tag:
             foreach (Tag_element element in Tag_element.Base_tags.Values)
             {
                 text.canvas.selects.add(new Select(element.name, "", Kind_select.Tag));
             }
             break;
         case Type_value.Style_attribute_id:
             foreach (Tag_element element in compiler.ids.Values)
             {
                 text.canvas.selects.add(new Select(element.id, "", Kind_select.Id));
             }
             break;
         case Type_value.Style_attribute_name:
             foreach (Tag_element element in compiler.names.Values)
             {
                 text.canvas.selects.add(new Select(element.nm, "", Kind_select.Name));
             }
             break;
         case Type_value.Style_attribute_class:
             foreach (Tag_element element in compiler.classes.Values)
             {
                 text.canvas.selects.add(new Select(element.cls, "", Kind_select.Css_class));
             }
             break;
         case Type_value.Style_attribute_att:
             foreach (Tag_attribute att in Tag_element.Base_tags[word.item.name].attributes)
             {
                 text.canvas.selects.add(new Select(att.name, "", Kind_select.Tag_attribute));
             }
             break;
         case Type_value.Style_tag_attribute_value:
             foreach (Tag_value value in Tag_element.Base_tag_attributes[word.item.name].values) {
                 text.canvas.selects.add(new Select(value.name, "", Kind_select.Tag_value));
             }
             break;
         case Type_value.Style_attribute_value:
             foreach(Css_attribute att in Css_attribute.attributes.Values) {
                 text.canvas.selects.add(new Select(att.name, "", Kind_select.Style_value));
             }
             break;
     }
 }