All Answers

0 votes

thank you 🙂

Cristian

0 votes
In reply to: Theme mixin

Hi Guadalupe,

There is a workaround but it’s not that easy to do and use. Maybe it’s easier to do it another way.

I understand you want to use two different appearances on two different TreeViews. Can you please send a screen shots of each appearance so we can evaluate easier alternatives?

0 votes

Please Check this  link may be you get better solution

https://stackoverflow.com/a/17857601/4247829

  • Sabir Khalil answered Aug 1, 2018 - 10:56 pm
  • last active Aug 1, 2018 - 11:11 pm
0 votes

Funny thing, I could reproduce the same bug in winforms just by pressing Esc on the first row without even editing, it clears the entire row. Will be fixed in Wisej in the upcoming build.

  • Luca answered Aug 1, 2018 - 9:04 pm
0 votes

I can reproduce for the first row. Good find and thank you for the sample. It’s WJ-9109 with high priority.

  • Luca answered Aug 1, 2018 - 6:06 pm
0 votes
In reply to: DataGridView scrolling

No. It scrolls by full row units in order to support variable row heights and virtual scrolling. Cannot be changed at the moment.

  • Luca answered Aug 1, 2018 - 4:50 pm
1 vote

Hi Kevin,

There is a GitHub examples repository and also the GitHub extensions repository.

If I understand your question correctly you want to do what’s in the GoogleMaps example that was updated recently with the following description

Use GoogleMaps reverse Geolocation: get Coords from address and vv..

Type a incomplete address and get it’s coordinates. Then get it’s full postal address. That’s the sample. But you can use reverse geocoding the way you prefer. A GeocoderResult object is returned every time and it carries all the information, even lots of information the sample doesn’t show (yet).

Reverse Geocoding is a brand new functionality of the GoogleMaps extension. To use it, please use the DLL in the example above or build from source, using the source code at Wisej.Web.Ext.GoogleMaps.

0 votes

Pdf files may be web optimized and loaded in ranges. Meaning that the viewer only loads the first page and then loads the pages as requested by the viewer.

The native pdf viewer (Adobe) supports and it appears to be supported by pdfjs too. It requires some extra work in the handler in case your app serves the content. Otherwise IIS handles range requests for you if you serve the web optimized pdf file as a full URL.

Another solution may be to hide the pdf viewer when minimized and replace with an image of your choosing – I haven’t tried it.

See:

 

Easy Handling of Http Range Requests in ASP.NET

https://github.com/mozilla/pdf.js/issues/8422

 

  • Luca answered Aug 1, 2018 - 4:11 pm
1 vote

In your Javascript code, in the place_changed event, call a WiseJ web method in and pass in the fields or object. Then you can populate the textboxes in C# or VB.

Javascript:

App.frmMyForm.ReceivePlace(place.geometry.location);

 

.NET:

<WebMethod>
Public Function ReceivePlace(ByVal obj)
‘Passed in from PAC javascript, place a marker on the map.
Dim dblLat As Double = CDbl(obj.lat)
Dim dblLng As Double = CDbl(obj.lng)

See also https://wisej.com/docs/html/JavaScriptObjectModel.htm

0 votes

After much battling this appears to work, question is will it return the right responses to the correct clients?

  private void textLat_TextChanged(object sender, EventArgs e)
{
if (textLat.Text != “”)
{
Staffgeolocation.PositionChanged -= Staffgeolocation_PositionChanged;
    using (var nullWriter = new StreamWriter(Stream.Null))
{
var newRequestUri = new Uri(@context.Request.Url.GetLeftPart(UriPartial.Authority).ToString() + “/PPapiHandler.ashx”);
var newRequest = new HttpRequest(“”, newRequestUri.ToString(), newRequestUri.Query);
     var newResponse = new HttpResponse(nullWriter);
var newContext = new HttpContext(newRequest, newResponse);
newContext.Handler = obj;
newContext.Items.Add(“Sent”, “Message Sent”);
     obj.ProcessRequest(newContext);
     textResult.Text = newContext.Items[“Sent”].ToString();
    }
}
}
0 votes

Hi Luca

Many thanks for your help.

How do I set the HttpContext that my Handler requires?

Tried

context = HttpContext.Current; Set on the client Page

PPapiHandler obj = new PPapiHandler();
obj.ProcessRequest(context);

But this does not work because the fields within the context such as the response type cannot be changed by the handler.

I have tried all I can think of. The issue is generating a client context (that can be edited by the ASHX handler), that can be sent to the ASHX Handler so the response is received by the client.

Commands such as context.Response.ContentType = “text/plain”; fail because the HTTP headers are fixed.

As usual there is always a ‘Magic’ part for anything like this that you can’t guess.

The order of events needs to be

  1. client gets geo Location – OK
  2. geo location event is discontinued once location obtained
  3. Handler is called to get available shifts from third party
  4. Handler is called with chosen shift to update third party (that coincides with the geo location)

The issue is getting the VS generated handler to work by just returning a simple text message to start with.

  • Ewan Walker answered Jul 31, 2018 - 11:39 am
  • last active Aug 1, 2018 - 1:01 pm
0 votes

I may need some more advice!

I merged my API and Wisej projects (as described), ran it in VS2017 and everything works perfectly … pushing a message from within the Wisej app produces the expected event in all Wisej clients, and pushing a via the API also produces the expected event in all Wisej clients.

However I have now deployed this to the production (IIS) server, and while pushing a message from within the Wisej app produces the expected event in all Wisej clients, pushing a via the API does not produce the expected event in any Wisej clients.

I suspect this will be resolved with a simple IIS/site config tweak … can you advise?

Thanks in advance,
Neil

0 votes
In reply to: Theme mixin

HI Guadalupe,

In fact the Tree appearance is using the definition in the mixin file. Try the one I attach. The problema is a bit different: you can not set the AppearanceKey on a TreeNode. This means that your definitions “mytree-file” and “mytree-folder” aren’t used anywhere.

TreeNode is a Component and not a Control. As Wisej is now, only Controls have the AppearanceKey  property.

I’ll check whether there is a workaround.

0 votes

Hi, I got it working, re install.

Thanks for your prompt reply

David

 

  • David answered Aug 1, 2018 - 5:37 am
0 votes

Thanks Luca, that was the guidance I needed.  It was all rather painless.

In case it helps others …

(App.Wisej is the UI project, App.API is an ASP.Net ApiController created using the default Microsoft supplied template) …

App.Wisej: Installed the Microsoft.AspNet.WebApi Nuget package
App.Wisej: Installed the MultipartDataMediaFormatter.V2 Neget package
App.Wisej: Created an Api folder
App.Wisej: Moved all the cs files from App.API except Global.asax.cs into Api folder and added these to the project
App.Wisej: Updated Global.asax.cs with the App.API Application_Start code lines

Cheers,
Neil

0 votes

I didn’t realize the etag method falls back on the server. I added relevant file extensions to IIS Output caching, however, I can’t get the .qs.js or wisej.js file to cache on IIS, because the extension is followed by a version number (ie, qx.js?v=1.5.9.0  )

The other file extensions with no ? after it work fine.

I tried the “Cache different versions of a file based on query string variables” and entered * as a wildcard, but it didn’t work.

 

 

 

 

0 votes
In reply to: Theme mixin

This is the simple sample, where I need to have two tree view with different appearance.

0 votes
In reply to: Theme mixin

Hi Guadalupe,

There is a mixin example in GitHub. This example overrides how standard controls look, their appearance; it overrides an appearance by using the same appearance name. Otherwise you have the to explicitly set the control’s AppearanceKey on the Properties property grid or like this

Snippet

this.comboBox.AppearanceKey = "My-ComboBox";

 

Please note the appearance name is case sensitive.

All the appearance name on your mixin file are custom names like “my…”. In order to use the mixin file as it is you have to set the AppearanceKey on each control. Otherwise you have to change the appearance names. Please note that as explained in the README.md file,

2. The appearance name doesn’t always match the control name. The appearance name for the ListBox control is “list”. (…)

I suggest you use ThemeBuilder to make sure about the appearance name of each control.

By the way, the README.md file will be updated to clarify this matter

  • Tiago (ITG) answered Jul 31, 2018 - 5:52 pm
  • last active Jul 31, 2018 - 6:16 pm
0 votes

Hi Ewan,

The Wisej.Web.Ext.GoogleMaps extension on GitHib was updated to support reverse geocoding.

The GoogleMaps example on GitHub was also updated and shows how to use the new feature. This sample now uses the Geolocation extension to find the browser’s current location coordinates: you can get the current coordinates and then get the postal address.

  • Tiago (ITG) answered Jul 31, 2018 - 11:54 am
  • last active Jul 31, 2018 - 2:30 pm
0 votes

You can’t share statics across app domains. Each web site in IIS runs in a separate AppDomain. Multiple AppDomains can be hosted in the same Application Pool, which is a single process.

You can host the api together with the wisej application. Wisej is only loaded by the html page through the wisej.wx script. Otherwise it’s just an aspnet handler. You can have as many web api, handlers, pages, ashx, aspx, routes, etc. all in the same project. If you move your api controller into the same site in IIS you can share statics easily.

 

HTH

  • Luca answered Jul 31, 2018 - 12:32 am
Showing 7001 - 7020 of 11k results