All Answers

0 votes

Hi Tim,

we’re currently not aware of any generic issues with the responsive properties.
One thing to keep in mind is that the Anchor property itself is also responsive, i.e. is remembered for each profile.
What happened to me in the past is that I accidentally changed some anchor settings while moving around elements.
You can turn off the little anchoring helpers from the Wisej.NET designer toolbar to avoid this:

anchor

 

 

 

Apart from this a sample of what you’re trying to achieve and where it fails would be of great help to further track down that issue and see if there is something to fix or improve on our end.

Best regards
Frank

0 votes

This isn’t a Wisej specific issue- .NET Core doesn’t support web.config.
Wisej.NET reads its own settings using the ConfigurationManager class.
Configuration Manager documentation: https://learn.microsoft.com/en-us/dotnet/api/system.configuration.configurationmanager?view=net-8.0

0 votes

So, there are two things you need to do here:

1. Detect that the client quit
There is absolutely no way to specifically detect a browser being closed in javascript. Closing the browser tab, closing the entire browser, navigating away, or shutting down the computer are identical operations as far as the server is concerned. However, I would say all of these fall under “the client quit”, so it should work just fine.

You can detect when the client quits by attaching an event handler to the ApplicationExit event.
Note that ApplicationExit will fire when the session expires, which will happen after sessionTimeout * 2 (in default.json). If you have a high session timeout then it may take long before the session expires.

I’ve attached a sample using Wisej that creates a file (log.txt) when the ApplicationExit event fires. (Note that the sample uses Wisej, but you can also use ApplicationExit in PPJ Web). Also note that if you run the sample from Visual Studio it won’t work. The ApplicationExit event fires when you close the browser. But when running via Visual Studio, the program stops running when you close the browser and thus the code in the ApplicationExit event handler does not run. If you deploy the test application to a server (for example, IIS) then you will notice that the log file is generated shortly after the browser is closed. The server continues running after the browser is closed and that’s how it’s able to run the code in the ApplicationExit event handler. In the sample, I’ve set the session timeout to 2 seconds (via default.json), so the log file will be generated pretty quickly.

You may also find it helpful to read the documentation on session management: https://docs.wisej.com/docs/concepts/session-management

2. Run some code to abort the printing procedure.
In your case, you don’t want to create a text file on ApplicationExit, you want to abort a printing procedure.
To figure that out, you’ll need to refer to the Crystal Reports documentation, as that’s a third party software not developed by us: https://help.sap.com/docs/SAP_CRYSTAL_REPORTS

  • Julie(ITG) answered May 8, 2024 - 9:30 pm
  • last active May 20, 2024 - 2:49 pm
0 votes
In reply to: Reports in wisej3.5

As Stimulsoft is a third-party software that we don’t develop, you’ll have to explore their documentation for more guidance on that specific part. https://www.stimulsoft.com/en/documentation

Looks like Stimulsoft does have some YouTube tutorials, I would start there: https://www.youtube.com/user/stimulsoftvideos

Steps:

1.Follow the Stimulsoft tutorials/documentation, up to generating a PDF of the report.

2. Display the PDF in Wisej using the PDFViewer. You have some options:
2a. Render the report to a pdf file. Display the pdf file in the PDFViewer, assigning it via the variable PdfSource. If you look at the demobrowser code this is the method that is used.

The code looks like this: pdfViewer1.PdfSource = "Files/Wisej.pdf";
2b. Render the report to a stream and assign the stream to pdfViewer.PdfStream

Relevant Wisej samples+ documentation:

PDFViewer documentation: https://docs.wisej.com/api/wisej.web/content/pdfviewer

You can see an example of the PDFViewer in the demobrowser here: https://wisej-demobrowser.azurewebsites.net/#Containers/PdfViewer/Features

The entire code of the demobrowser is on github. Here is the PDFViewer demo part of the code. Look at the file Features.cs specifically (both look at it in the designer and look at the code): https://github.com/iceteagroup/wisej-demobrowser/tree/main/Demos/Containers/Wisej.DemoBrowser.PdfViewer

-Julie

0 votes

Dear Frank,

In fact, I use the same version of Wisej. If I open a project, close it, then call it again, an error appears on the designer page, so I have to close Visual Studio, then call it again, so the error doesn’t appear,  so according to this it is very annoying if I call another project (same version of Wisej) will always show this same error too.

  • rdytop answered May 16, 2024 - 6:49 am
  • last active May 16, 2024 - 7:06 am
0 votes

Hi Lautop,

do both Solutions use the exact same Wisej.NET versions? If not, you need to close all Visual Studio instances before opening your other solution, otherwise it might be holding some shadow references of assemblies that interfer with the designer.

Best regards
Frank

0 votes
In reply to: ChartJs Format numbers

If you can do it in ChartJS via JavaScript, then you can do it in Wisej. So it should be possible.

As for what javascript to write, check out this StackOverflow post: https://stackoverflow.com/questions/25880767/chart-js-number-format

Note that some of the examples have you set the “options” of the ChartJS widget. You can read the Wisej documentation on widget options here: https://docs.wisej.com/api/wisej.web/content/widget#options

Other useful Wisej documentation:
https://docs.wisej.com/docs/concepts/javascript
https://docs.wisej.com/docs/controls/content/widget

 

 

You also mention setting the locale. You can try the ToLocaleString() method: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString

Here’s an example of using ToLocaleString with the Eval function. (Eval lets you call javascript code from C#. In this case, the javascript code is  var x= 123456.789; x.toLocaleString('en-US'); )

Application.Eval("var x= 123456.789; x.toLocaleString('en-US');", (r) => { AlertBox.Show(r.ToString()); });

And here’s an example with EvalAsync:
var result = await Application.EvalAsync("var x= 123456.789; x.toLocaleString('en-US');");
AlertBox.Show(result);

0 votes

I’m (the application is) actually printing (to pdf and then zipping and then downloading) about 2000 reports. I would like, after each report, to ensure the client did not quit and printing the next one only in this condition. Can the client update a token on the server each x seconds (via javascript ?) so that the server could test the existence of it and abort the long printing operation if not ?

 

TIA

Mirko

0 votes

Thank you, Frank. I’ll wait for your fix.

In the meanwhile, I thought about creating a new appearance, let’s say “invalidUpload” and set the AppearanceKey = “invalidUpload” when upload1.Value == null.

Since you started playing with the upload control, may I suggest a Label property for it? In a sense it is an input control…

Best,
Alex

0 votes

We do not have a VS extension supporting Python.

However, Wisej supports all .NET languages, which includes Python, so you can code your Wisej application in Python if you want. The designer only supports C# and VB.NET (technically we have a version for COBOL and F# as well)- so you won’t be able to use the designer if you code your application in Python.

You would need to use IronPython which uses managed code. IronPython generates IL code, which the .NET runtime translates to native code and then executes. https://ironpython.net/

Another option would be to use an interop like Python.NET, which allows you to call Python code from C# and C# code from Python: https://pythonnet.github.io/

For more information on managed code (IronPython) vs interop (Python.NET), read this: https://learn.microsoft.com/en-us/dotnet/standard/managed-code

-Julie

  • Julie(ITG) answered May 13, 2024 - 4:33 pm
  • last active May 13, 2024 - 4:33 pm
0 votes

Hi Alex,

you actually uncovered 2 issues that we are now working on:

  • Invalid state for Upload control is missing from the Themes
  • Client side implementation for Invalid/InvalidMessage is missing for the Upload control

Both issues will be fixed for the 3.5.7 release.
I’ll keep you updated.

Best regards
Frank

0 votes
In reply to: Upload a file

Hi Francesco,

you’re getting the filename(s) in e.Files of the Uploaded Event.

Sample
https://github.com/iceteagroup/wisej-examples/tree/3.5/UploadFiles

Documentation
https://docs.wisej.com/api/wisej.web/content/upload

Best regards
Frank

0 votes

HI Francesco, use the ToolBox Updater on Wisej Designer Toolbar, chose “Update Toolbox” (or “Aggiorna Toolbox” if your Visual Studio is in Italian) and then you have a “static” Wisej Net Component

 

 

1 vote

Hi Francesco, from Nuget you install the runtime component of Wisej.NET. Your problem comes from the designer environment. Please check the designer version you have installed using the icon on Wisej.NET designer Toolbar. The last release of Wisej.NET Designer can be found at https://docs.wisej.com/docs/releases/whats-new-in-3.5 (Julie already give you the link). Currently the Designer Version is 3.5.6.10.
So download the VSIX and install. If you already have the 3.5.6.10 versione please uninstall it from Visual Studio Extension and reinstall.

 

0 votes

Hi Frank,
In the screenshot you can see what I did, i.e. added the “invalid” state to the “upload” appearance. I did that by editing the .theme file in VS. As you can see, when I open it in the Theme Builder, I can see the addition in the Editor part, but nothing in the tree view. Isn’t this suspicious?

Alex

0 votes

I created a new empty project – everything works.
I inserted the Forms from the old project: everything works.
I open a Form: everything works.
I close the Form and reopen it: Wisej toolbox disappeared.
I close the project and reopen it and after the third time the Wisej toolbox appears.
What’s the problem, inserting Forms from another identical project? I didn’t do anything else.
My computer is new, I installed everything March 5, 2024 and no other problems with VS2019 other than Wisej.
I can’t work with an unstable system, I’m just sorry I wasted my money.

0 votes

Hi Frank,

I’m using Material-3. Yes, I have tried adding a new state named “invalid” to the upload appearance, and putting into it the contents of the textbox invalid state. I have also tried to make the textfield component of the upload appearance inherit from the textbox instead of textfield – don’t know if this is correct. None of these two changes made a difference.

Alex

0 votes

Instead of item.SubItems[i] = new ListViewItem.ListViewSubControlItem(item, control);
you need to do this: item1.SubItems[i].Control = new Button();

Code sample:

// Add Items to the ListView
ListViewItem item1 = new ListViewItem("Item 1");
item1.SubItems.Add("Subitem 1");
ListViewItem item2 = new ListViewItem("Item 2");
item2.SubItems.Add("Subitem 2");
listView1.Items.Add(item1);
listView1.Items.Add(item2);
//Set the Control of the first subitem of item1 to be a button with the text "button text"
item1.SubItems[0].Control = new Button("button text");

I’ve also attached a simple project showing a button in a ListView as the Control of a SubItem.

Relevant documentation:

ListView
ListViewItem
ListViewSubItem

-Julie

0 votes

Hi Alex,

what theme are you using? Did you try copying over the theme settings for the invalid state of the textbox to the upload section?

Best regards
Frank

0 votes

Please also check this setting in Visual Studio:

toolbox

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best regards
Frank

 

Showing 781 - 800 of 11k results