All Answers

0 votes

Hi Kizaemon,

Your only solution would be to use the workaround.

The behavior is the same for WinForms and Wisej.NET, where if you modify the designer code everything would be reserialized and all the changes would be lost or modified.
That’s the reason for the “do not modify the contents of this method with the code editor.* comment there!

HTH,
Alaa

0 votes

Hi Frank,

 

thank you very much.

 

A simple project is attached.

Please see Page1 of the eMaster main app.

 

The resources in the eResources library are generated using PublicResXFileCodeGenerator, and so are visible by the referencing libraries.

 

The Select Resource dialog box does not allow selecting images from referenced projects, only from local resources.

As mentioned before, the designer then forcefully embeds the image into local resources.GetObject(…)

Not sure how much efforts there will be to allow the Select Resource dialog box enumerate referenced libraries for resources.

 

For now, as work-around, I put the image assignment manually outside of the designer into Page constructor, just after InitializeComponent.

public Page1()
{
InitializeComponent();
this.pictureBox2.Image = global::eResources.ComputerFile.Computer_File_011;
}

Kizaemon

0 votes

Hi Kizaemon,

can you please wrap up a small sample as you suggested. This will speed up the process on our side and we´ll take a closer look at it.

Thanks in advance,
Frank

0 votes
In reply to: DataRepeater Filtering

Hi Dino,

the ColumnFilter extension operates on the DataGridView rows while in your scenario the filtering should rather happen on the list you´re binding too.
So in that case you´d need to create your own filtering method that iterates through the colum and collects all data.

We offer professional consulting in handy hour packages. Please contact salesATwisej.com if you are interested in that.

Best regards
Frank

0 votes

Hi Alaa,

thank you your code works perfectly, I have see page++ and page– too!!!

I understand how you find ‘PDFViewerApplication.zoomIn’ but I don’t understand how do you have find this

‘this.__objectEl.__element.contentWindowI’d like to understand.

best

Cristian Zerbinati

0 votes

Hi Frank

Thanks for your prompt reply, in the interim I implemented the double-click feature for all mouse buttons in C# managed code

void WireUpEvents()
{
this.MouseMove += new MouseEventHandler(MouseMoved);
this.MouseClick += new MouseEventHandler(MouseClicked);
this.MouseDoubleClick += new MouseEventHandler(MouseDoubleClicked);

if (t == null)
{
t = new Timer();
t.Interval = 350;
t.Tick += T_Tick;
t.Enabled = false;
}
}

private void T_Tick(object sender, EventArgs e)
{
t.Enabled = false;  //Timeout
}

public void MouseClicked(object sender, MouseEventArgs e)
{
MouseBth = e.Button;

if (MouseBth != MouseButtons.Left)
{
if (t.Enabled == true)
{
//If time since last click is low, its a double click
MouseDoubleClicked(sender, e); //note: doesn’t cause override so,
OnMouseDoubleClick(e); // Call override manually
}
else
{
//Start monostable on first click
t.Enabled = true;
}
}
Debug.Print($”Mouse Click – {e.Button.ToString()} # {e.Clicks }”);
}

public void MouseDoubleClicked(object sender, MouseEventArgs e)
{
MouseBth = e.Button;
Debug.Print($”Double Click – {MouseBth.ToString()} # {e.Clicks }”);
}

protected override void OnMouseDoubleClick(MouseEventArgs e)
{
//Now this works for all mouse buttons, not just the left one
var task = _GetTaskUnderMouse(e.Location);
if (task != null)
{
OnTaskMouseDoubleClick(new TaskMouseEventArgs(task, _mChartTaskHitRects[task], e.Button, e.Clicks, e.X, e.Y, e.Delta));
}

base.OnMouseDoubleClick(e);
}

  • David answered Sep 24, 2022 - 10:54 pm
0 votes

Hi David,

while what you see is normal behaviour and by design in browsers
(see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button)
I still logged it as an enhancement request. Issue number is #3025 for your reference.

We´ll let you know when this is available.

Best regards
Frank

0 votes

We are not ready to make the transition to 3.x in this moment due the app its heavily dependant on Entity Framework.

It is fine to use the old Entity Framework with Wisej 3.1.2.

You can stay on net48, do not need to migrate to dotnet Core.

 

0 votes

Hi Cristian,

In addition to my previous answer, I have attached a sample that replicates your goal.

You’ll find a “hidden” toolbar, see viewer.css at the end of the file level.
And the functionality to zoom in and out of the document using Wisej.NET’s buttons.

Unfortunately, due to the size limit here, you’ll have to add the missing pieces of the Pdf.js source code into the sample.

HTH,
Alaa

0 votes

Hi Richard,

How exactly are you using the embedded resources?
Can you please wrap up a small sample?

TIA,
Alaa

0 votes

Hi Cristian,

You’ll need to use the Eval(“some_script_or_function_name”) or Call(“function_name”) to execute or call JavaScript functions from within Wisej.NET.

For more info, please check out this link here: Wisej.NET Documentation | Application – JavaScript

HTH,
Alaa

0 votes

Hi Frank,

ViewerType Mozzilla on Firefox browser

I have download the source of pdfjs-2.6.347 and in the pdfviewer I have insert the path of the viewer in “ViewerURL” property.

It works, but I need to call function from wisej

best

0 votes

Hi Cristian,

which PDFViewerType/Browser are you using?

Best regards
Frank

0 votes

Hi Gerhard,

You’ll have to add an alias to System.Windows.Forms.

Simply go to References>Assemblies> Select System.Windows.Forms

In the properties window, you’ll see an Alias property, you’ll have to assign some alias to it, you can change it to “swf” for example.

I have attached a screenshot!

HTH,
Alaa

0 votes

Hi Alaa

Great. Works as expected,

I set the minimumSize of the DropDownControl, not the UserComboBox.

Regards

 

 

 

 

 

0 votes
In reply to: Deployment IIS .NET 6

Hello again,

As Alaa pointed out, it was the order of the handlers. The publishing process had added the uncommented aspNetCore handler at the end.
<add name=”aspNetCore” path=”*” verb=”*” modules=”AspNetCoreModuleV2″ resourceType=”Unspecified” />
whereas the commented-out aspNetCore handler from the original wisej-provided web.config was on top. After I mover the uncommented handler on top, it worked.

A side effect I’m seeing now is the following. I have three wisej applications under my default web site. The test6 one runs ok. However, the other two show a popup message (attached) with the message:
Wisej failed to initialize for the following reason: Access to the path ‘C:\Windows\TEMP\Wisej 3\Applications\5.189.149.167-80\ Wisej.Platform.QXDesktop.json’ is denied..
If I go to the temporary folder indicated by the message, I see several files, which I suppose are extracted automatically by the application. From the path to the folder, I suppose there is one folder created for each website-port combination. This one was probably created by the “test6” application, since in the security of the folder I see a “test6” user (the Application Pool I suppose). It sounds like the other two applications do not have permissions to do any work in that folder. I suppose that the right behaviour would be that each application created its own temporary folder.

Best,
Alex

0 votes

Nope, does not work …

0 votes

Hi Andrew,

To achieve your goal, you’ll have to move the script from the “PageSource” HTML file to the application’s Default.html file, or add it to the HtmlPanel’s InitScript property.

You can think of the HtmlPanel as a sandbox, even if you call the “this.App.Window1.HelloWorldFromHTMLSource()” method from firing the click event you’ll get “this.App” is not defined on the Console.

It’s a security measure, so you’ll have to define all the scripts from the beginning in Default.html.

You can check out these forum posts for more details:
https://wisej.com/support/question/firedataevent-from-innerhtml-of-htmlpanel
https://wisej.com/support/question/get-filled-html
https://wisej.com/support/question/topaz-wisej-integration

Or better yet, you can actually integrate your javascript library as a widget!
You can check out the documentation for more info through this link: Wisej.NET | Widget

I have also attached a modified version of your sample for you to try!

HTH,
Alaa

0 votes

Hello Frank. Thank you for helping with this question. I have attached a short example project to show the problem I am having. When you run the project if you click on the ‘Call javascript in Initscript’ button it will call a javascript function which is defined in the InitScript attribute of the aspNetPanel and that javascript function will show an alert and then call a method in the Form class that will show a MessageBox. This all works.

But the next button ‘This is PageSource javascript – Call a C# method’ doesn’t work as I expect. It calls a javascript function which is defined in the page linked to the PageSource attribute of the aspNetPanel. The javascript function shows an alert (which we see) and then calls a method in the Form class – but the call doesn’t happen, the javascript fails silently. This is my problem – I would like to be able to call a C# method from javascript in the PageSource file. (I am using the PageSource file because in my real project I have to include a 3rd party javascript library which provides some functionality that returns a value and I need to get that value back to my C# code, the 3rd party javascript library works with a PageSource file so I thought that was the best way to go, if there is another way of doing this (not with an aspNetPanel, not in PageSource etc.) then I am open to any ideas).

Also in the example project there is an HTMLPanel which has some javascript in the html file that is in the HtmlSource attribute. I can’t get the button in that panel to call the javascript function – maybe this is a different problem ? If you click the ‘Call Method’ button it doesn’t seem to call the MakeCall javascript function (maybe this a problem with my limited knowledge of html/javascript).

Thanks for your help

Andrew

1 vote

Hi Marcelo,

You’ll have to define the MinimumSize of the DropDownControl of your choice.
You can copy the Size value of the UserControl and assign it to the MinimumSize property.

HTH,
Alaa

Showing 2221 - 2240 of 11k results