SMath Studio Forum
»
SMath Studio
»
Questions
»
How to add a region to existing plugin
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
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 (9kb) downloaded 13 time(s).Thank you!
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 2,026 Was thanked: 1153 time(s) in 739 post(s)
|
Originally Posted by: Alex.M 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. |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
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 Code:var buttonImageRegionHolder = new MenuButton("Image", delegate(MenuButtonArgs args)
{
args.CurrentRegion = new ImageRegion();
}
);
this is my last hurdle. For now. Edited by user 23 February 2016 10:14:07(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,703 Location: Italy Was thanked: 1376 time(s) in 901 post(s)
|
Hello Alex, not sure if this works (is made with a converter) C# source: Code:MenuButton button= new MenuButton("OxyPlot", this.AddRegion);
Code: private void AddRegion(MenuButtonArgs args)
{
args.CurrentRegion = new OxyPlotRegion();
}
VB.NET translation: Code:Dim button As New MenuButton("OxyPlot", AddressOf Me.AddRegion)
Code: Private Sub AddRegion(ByVal args As MenuButtonArgs)
args.CurrentRegion = New OxyPlotRegion()
End Sub
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: Davide Carpi Hello Alex, not sure if this works (is made with a converter) C# source: Code:MenuButton button= new MenuButton("OxyPlot", this.AddRegion);
Code: private void AddRegion(MenuButtonArgs args)
{
args.CurrentRegion = new OxyPlotRegion();
}
VB.NET translation: Code:Dim button As New MenuButton("OxyPlot", AddressOf Me.AddRegion)
Code: 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... Edited by user 23 February 2016 16:16:28(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,703 Location: Italy Was thanked: 1376 time(s) in 901 post(s)
|
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. Edited by user 23 February 2016 17:55:27(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,576 Was thanked: 1325 time(s) in 776 post(s)
|
Am I missing something? Do we have one more component for drawing graphs (OxyPlotRegion)? |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,703 Location: Italy Was thanked: 1376 time(s) in 901 post(s)
|
I don't know, I don't see the plugin within the online list, nor in the Extensions Manager. Edited by user 11 October 2024 01:56:54(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
How to add a region to existing plugin
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.