Как работать с всплывающими C# подсказками в Project Maker?

BAZAg

Client
Регистрация
08.11.2015
Сообщения
1 760
Благодарностей
2 399
Баллы
113
Здравствуйте!
Когда-то в 2016 году пользователь sibbora продавал за 300 рублей перевод подсказок ZennoPoster на русский язык (тема).
Дальше в 2019 тему подхватил radv, когда разместил во внеконкурсных статьях тему по работе с подсказками с рекламой продажи шаблона-переводчика за 1000-1500 рублей.
Потом в 2020, персональный кодер Маломальский разместил русские подсказки для версии 5.34 себе в подпись - бесплатно (прикрепил архив к этому сообщению, вдруг со времени пропадёт оттуда).
Собственно, чтобы получить русские подсказки для кода нужно просто перевести и заменить несколько xml файлов (ZennoLab.CommandCenter.xml, ZennoLab.Emulation.xml, ZennoLab.InterfacesLibrary.xml, ZennoLab.Macros.xml) которые находятся в папке с программой ZennoPoster.

Эти же файлы используются (на сколько я понял) для генерации справки и размещены в сети (например тут или весь список тут).
Так вот, в подсказках, из данных файлов используются только поля summary, param, returns.
Но, не менее интересным есть поле example.
Собственно сам вопрос в том, как в окне редактирования кода посмотреть поле example из документации?
Может есть какая-то комбинация Ctrl+кнопка, которая вставила бы пример кода с документации (или хотя бы отобразила его) или сразу отправила бы в браузере на страничку в wiki где находится этот пример?
Или данное поле example в файлах xml существует только для генерации онлайн документации, и самом Зеннопостере, ПроджектМейкере никак не используется?
Подумал, что может есть такая возможность - тогда поле example можно было бы использовать как вставку сниппета без перехода в онлайн справку, чтобы понять как вызывать тот или иной метод...

Пример узла xml с документации:
<member name="M:ZennoLab.CommandCenter.HtmlElement.DrawToBitmap(System.Boolean,System.String)">
    <summary>Supports rendering to the bitmap.</summary>
    <param name="isImage">
        <para>Type: <see cref="!:http://msdn.microsoft.com/en-us/library/system.boolean.aspx">System.Boolean</see></para>
        <para>true if the tag of this of the element is <strong>"img"</strong>, otherwise, <strong><em>false</em></strong>.</para>
    </param>
    <param name="hash">
        <para>Type: <see cref="!:http://msdn.microsoft.com/en-us/library/system.string.aspx">System.String</see></para>
        <para>The parameter use only in demo version. Default value is <b>String.Empty</b>.</para>
    </param>
    <remarks>If the html element has the tag <strong>"img"</strong> and the method's parameter is true, then this method executes faster.</remarks>
    <returns>
        <para>Type: <see cref="!:http://msdn.microsoft.com/en-us/library/system.string.aspx">System.String</see></para>
        <para>The image as a string value.</para>
    </returns>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.DrawPartToBitmap(System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">DrawPartToBitmap Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.DrawPartAsBitmap(System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean)">DrawPartAsBitmap Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.DrawAsBitmap(System.Boolean)">DrawAsBitmap Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.FindChildByAttribute(System.String,System.String,System.String,System.String,System.Int32)">FindChildByAttribute Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.FindChildById(System.String)">FindChildById Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.FindChildByName(System.String)">FindChildByName Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.FindChildByTag(System.String,System.Int32)">FindChildByTag Method</seealso>
    <seealso cref="M:ZennoLab.CommandCenter.HtmlElement.FindChildByXPath(System.String,System.Int32)">FindChildByXPath Method</seealso>
    <example>
        The following code example demonstrates uses of the <see cref="M:ZennoLab.CommandCenter.HtmlElement.DrawToBitmap(System.Boolean,System.String)">DrawToBitmap</see> method
        <code title="Example" description="" lang="C#">
            // find element by attribute
            HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
            
            // draw to bitmap element, this element is not image and does not contain image
            string toBitmap1 = he.DrawToBitmap(false);
            
            // find element by attribute
            he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("a", "href", "http://lessons.zennolab.com/ru/index", "regexp", 0);
            
            // draw to bitmap element, this element is image or contains image
            string toBitmap2 = he.DrawToBitmap(true);</code><code title="Example2" description="" lang="PHP">
            // find element by attribute
            $he = $instance-&gt;GetTabByAddress("page")-&gt;GetDocumentByAddress("0")-&gt;FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
            
            // draw to bitmap element, this element is not image and does not contain image
            $toBitmap1 = $he-&gt;DrawToBitmap(false);
            
            // find element by attribute
            $he = $instance-&gt;GetTabByAddress("page")-&gt;GetDocumentByAddress("0")-&gt;FindElementByAttribute("a", "href", "http://lessons.zennolab.com/ru/index", "regexp", 0);
            
            // draw to bitmap element, this element is image or contains image
            $toBitmap2 = $he-&gt;DrawToBitmap(true);
        </code>
    </example>
    <requirements>
        <para>
            <strong>Target Platforms:</strong>
            <em>Desktop:</em> Windows XP SP3 and older. <em>Server:</em> Windows Server 2003 and older.</para>
    </requirements>
</member>
 

Вложения

  • 126,1 КБ Просмотры: 12

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)