How to add a region to existing plugin

How to add a region to existing plugin - Сообщения

#1 Опубликовано: 14.02.2016 18:54:52
Alexander O. Melnik

Alexander O. Melnik

127 сообщений из 494 понравились пользователям.

Группа: Moderator

Hi All,

I figured I might as well cash-in on the knowledge I got while working on Image Region, and to add a region for my excel_IO plugin.

Now how can I do this? Can a plugin have both smath functions (excel_IO()) and a region support?

Please provide as much guidance as you can - I could use all of it and than some!

Currently all I have is this Class1.vb file.

Class1.zip (8 КиБ) скачан 73 раз(а).

Thank you!
#2 Опубликовано: 15.02.2016 04:53:59
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote

Can a plugin have both smath functions (excel_IO()) and a region support?



The Maxima plugin is an example. I don't know the implementation details, but the plugin comes with a set of functions like Maxima(), MaximaLog()... and two interactive plot regions, where you can move, zoom and rotate the diagram with the mouse and with a settings menu opening upon double click.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 23.02.2016 02:10:59
Alexander O. Melnik

Alexander O. Melnik

127 сообщений из 494 понравились пользователям.

Группа: Moderator

My issue is that i have written XLSXupdate in VB.NET and every other region plugin is in c#.

Can you guys help me with a specific error implementing the region in VB.NET?

I am trying to convert this code from C# to VB.NET

var buttonImageRegionHolder = new MenuButton("Image", delegate(MenuButtonArgs args)
            {
                args.CurrentRegion = new ImageRegion();
            }
                );

this is my last hurdle. For now.
#4 Опубликовано: 23.02.2016 06:32:17
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Alex,

not sure if this works (is made with a converter)

C# source:
MenuButton button= new MenuButton("OxyPlot", this.AddRegion);
        private void AddRegion(MenuButtonArgs args)
        {
            args.CurrentRegion = new OxyPlotRegion();
        }

VB.NET translation:
Dim button As New MenuButton("OxyPlot", AddressOf Me.AddRegion)
		Private Sub AddRegion(ByVal args As MenuButtonArgs)
			args.CurrentRegion = New OxyPlotRegion()
		End Sub
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Alexander O. Melnik 23.02.2016 10:10:00
#5 Опубликовано: 23.02.2016 10:09:58
Alexander O. Melnik

Alexander O. Melnik

127 сообщений из 494 понравились пользователям.

Группа: Moderator

Wrote

Hello Alex,

not sure if this works (is made with a converter)

C# source:

MenuButton button= new MenuButton("OxyPlot", this.AddRegion);
        private void AddRegion(MenuButtonArgs args)
        {
            args.CurrentRegion = new OxyPlotRegion();
        }

VB.NET translation:
Dim button As New MenuButton("OxyPlot", AddressOf Me.AddRegion)
		Private Sub AddRegion(ByVal args As MenuButtonArgs)
			args.CurrentRegion = New OxyPlotRegion()
		End Sub



Thank you Davide, it worked (unlike the code from many other converters I tried to use). I also learned something in a process which is good :-)

What is the converter you are using? Would be handy for me to get a hold of it...
#6 Опубликовано: 23.02.2016 11:51:07
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Good

For simple conversion the online Snippet Converter of SharpDevelop is useful

The code above was produced by Instant VB (Free Edition), it converts the whole project (if the project is not too big); the few times I've used it, it worked fine.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Alexander O. Melnik 23.02.2016 11:53:00
#7 Опубликовано: 10.10.2024 00:34:20
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Am I missing something? Do we have one more component for drawing graphs (OxyPlotRegion)?
Russia ☭ forever, Viacheslav N. Mezentsev
#8 Опубликовано: 10.10.2024 02:09:58
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

I don't know, I don't see the plugin within the online list, nor in the Extensions Manager.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений