All Answers

0 votes

Hi

Trying to use a wisej.Web.HtmlPanel’ in oHtml form so image is in a browser panel and then can do a copy to clipboard..

Close bu it won’t render image but HTML is good? Ideas?

private void ViewImage(string ImageFile= @”\\svr1\Overview 0.jpg”)
{
try
{
FileInfo oFileinfo = new FileInfo(ImageFile);
string imageHtml = “file:” + oFileinfo.FullName.Replace(“\\”, “/”).Replace(” “, “%20″);

//e.g. file://svr1/Overview%200.jpg
string strhtml = @”<html> <body><center><hr><img src=” + “\”” + imageHtml + “\”><hr> </body></html>”;

frmPopupHtmlBox oHtml = new frmPopupHtmlBox(strhtml, “Viewing: ” + oFileinfo.Name);

oHtml.ShowDialog();
// Need to be able to copy image to clipboard etc
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

 

  • David answered Nov 23, 2021 - 12:52 pm
  • last active Nov 23, 2021 - 12:54 pm
0 votes

Hi Gerhard,

When you use Application.Download, Wisej generate a temporary link for your download. Isn’t your filename. Check the attachment.

If you want to shortless link you can use this trip:

  •  Create folder on your like “files”
  •  Place yours files into this folder eg. my_file.txt
  • Finally your link will be stite_url.com/files/my_file.txt

Happy coding,

Kevin (ITG)

 

 

 

  • Kevin answered Nov 23, 2021 - 11:51 am
0 votes

Trying to work out how to create an extension so we can Copy text and images to clipboard | charisTheo.io also an examples here Copy an Image or a Text to Clipboard in Javascript

 

  • David answered Nov 23, 2021 - 5:06 am
0 votes

This is what I have for now.  Column height may be different depending on your theme.

 

public static bool IsVerticalScrollbarOn(this Wisej.Web.ListView lv)
{
//get total row height, if higher than lv.height + column height, return true
int itemHeightTotal = 0;
for (int i =0; i < lv.Items.Count; i++)
{
itemHeightTotal += lv.Items[i].RowHeight;
}

int columnHeight = 33;
int totalHeight = columnHeight + itemHeightTotal;

return totalHeight > lv.Height;
}

0 votes

Is this the “toast” when the app goes offline?  Is it supposed to look like this? May be a CSS / theme issue?

  • Andrew Niese answered Nov 23, 2021 - 12:56 am
  • last active Nov 23, 2021 - 12:58 am
0 votes

Your app domain must have Full Access to the temp folders. It’s usually /Windows/Temp. The ASP.NET temp folder and App_Web_rfkooigp.dll seem strange to me. In any case, the default app domain works. If you create a new one make sure it has full access to the temp and to the project folder, which is usually the default.

  • Luca answered Nov 22, 2021 - 11:36 pm
0 votes

Gustavo, this code Luca gave me 2 years ago.  I was just about to write another post about it — my main purpose is to handle Android “power saving mode” that suspends background network data.  So you power off the screen and your WiseJ app breaks.  This code seems to work 75% of the time now.  Let me know how it works for you.

 
<script>
Wisej.onNetworkError = function(type, error, code)
{
if (!Wisej.__showingAlertBox) {

var box = new wisej.web.AlertBox().set({
message: “Trying to reconnect to the server…”,
icon: “warning”,
alignment: “topCenter”,
showProgressBar: true,
showCloseButton: false,
autoCloseDelay: 30000
});
box.addListenerOnce(“disappear”, function () {
Wisej.__showingAlertBox = null;
});

Wisej.__showingAlertBox = box;
Wisej.Platform.hideLoader();
Wisej.Platform.blockRoot(true);

box.show();
}

Wisej.Core.refresh(function () {
Wisej.__showingAlertBox.destroy();
Wisej.Platform.blockRoot(false);
});
}
</script>

0 votes

I’m also getting this:

 

System.UnauthorizedAccessException: ‘Access to the path ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\fixitycs\13398187\99b2c52c\App_Web_rfkooigp.dll’ is denied.’

0 votes

Hey, thanks for the quick reply!

 

You’re right, that’s probably not the best solution to my problem, the real issue is that when the connection comes back the user loses their work, the application restarts instead of just refreshing. When I reload the page I don’t lose the form data but when the connection comes back I do, is there a better option to fix this?

Thanks

0 votes

Hi Gustavo,

In order to achieve what you want, you’ll have to override a JS method in Wisej.

You can do that by adding the following to Default.html.

<script>

Wisej.onLoad = function() {

Wisej.Core.reload = function () {};

}
</script>

However, it is really advised that you leave the reload function as is. It’s necessary to reload the state. What if the user clicks a button that adds a row (for example) and while the server is processing the client loses connection, then when the connection comes back the user doesn’t see that the row was added.

All in all, disabling the reload when the connection is re-established would certainly break the app’s behavior.

 

HTH,

Alaa

0 votes

Hi Eric,

The TreeViewComboBox exposes the TreeView object. The events are BeforeCheck/AfterCheck on the TreeView and the single TreeNode elements.

You can find more information here:

https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview#beforecheck

https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview#aftercheck

There is a before and after event because you can cancel the check in BeforeCheck.

The catch is that there is no event directly routed to the TreeViewComboBox, you need to use the TreeViewComboBox.TreeView property.

 

HTH,

Alaa

0 votes
In reply to: WJ 2.5 Office Viewer

Hi Alaa,

I attach project (download from wisej). I have understand that the problem si the “Source”, must be an full qualified url

But I don’t understand why file stream don’t work

best

0 votes
In reply to: WJ 2.5 Office Viewer

Hi Cristian,

The office viewer cannot work in debug mode in localhost because the viewer runs on microsoft servers and they need to have a public url to the document itself.

HTH,

Alaa

0 votes
In reply to: WJ 2.5 Office Viewer

Hi Cristian,

Can you please provide us with a small sample?

Thank you,

Alaa

0 votes

Hi Levie,

sorry for my late reply, the notification email don’t arrives.

your code works, but I need to know it the user has hidden the dataset client side

best

0 votes

Thanks, I’ve tried this approach but this is for controls. I’ve basically created a canvas which draws shapes and handles mouse events to move and resize shapes. The shapes are not controls.

I did find out that setting the background color of a panel to transparent it actually is transparent. This might mean I can throw away my legacy code and just use panel or any other control. I can place these over an image and still be able to see trough the panels and see the underlying image. This would not be possible in Winforms.

Thanks !

  • Vincent answered Nov 20, 2021 - 3:30 pm
0 votes

You can only send text to the browser’s clipboard. See https://docs.wisej.com/api/wisej.web/general/wisej.web.clipboard#setclienttext-text. There is no other way because the only way to set the browser’s clipboard is to create a hidden textarea, set the text and execute the copy command. You could convert an image to a data url, or use a plugin that does that.

  • Luca answered Nov 19, 2021 - 10:26 pm
0 votes
  • Luca answered Nov 19, 2021 - 9:20 pm
0 votes
In reply to: Invalid Server License

You copied the correct server license key into web.config right?

If the key is not specified in web.config, Wisej will look for the key in three additional places:

  • File System Folder (Environment.SpecialFolder.CommonApplicationData),
  • Project Folder,
  • TempPath (Path.GetTempPath()),

If it doesn’t find the key in any of these places it will show the error.

HTH,

Levie

0 votes

If I go through every LinkLabel on the form, and change all the ActiveLinkColor properties to ‘Red’ using the designer, the property changes from ‘Red’ to 255,0,0.

Then, it throws the error on LinkColor.Get()

Did WiseJ at some point change the way the property was read? Because the LinkLabels are all encoded by color name (WiseJ default), but using the designer it sets them to RGB.

Showing 3061 - 3080 of 11k results