How does Battlelog Game Manager work? - c#

I know that it uses a plugin but how does it work in Chrome etc? I can't explain it lol.
Basically I need something very similar to that but for one of my applications. So I have a website and when they visit a certain page I need it to send a function to the plugin I will be making and return some data. I have no clue how I should begin doing anything like this and was wondering if anyone here has any idea?
------------EDIT-------------
To make the question a bit easier is how can I go about creating a plugin for chrome which will allow me to run a application on the user computers like what Battlelog does.

Related

Has there been any progress on mobile device detection in Blazor?

I found various questions regarding this issue, such as this one - here.
Unfortunately, the rudimentary method of checking viewport width etc seems a little blunt force object. I'd prefer a scalpel.
Does anyone have a solid method of distinguishing between mobile and desktop browsers using only C# in Blazor?
My scenario is fairly simple, if the user is operating on a mobile device then I would like them to be redirected to a different page, and for whatever reason I am not able to use JS for this - use your imagination.
Edit: To elaborate on this a little, since I realise the question could do with more detail; I am looking for a solution which doesn't require the page to make custom JS calls from code, and for the C# to work after the page has been loaded. The specific need for a post-load function is not technical, and is so that the detection can be switched on/off by the user after they have loaded the page. I don't know if this is possible, and I suspect from the responses so far that it is not, but my question specifically was whether any further developments had been made on this issue since the question above had been posted.
Edit 2: Further, mobile is broad, I am specifically interested in general information about the device such as touchscreen/pointer, brand (Apple, Samsung etc) and device model.
I'm assuming you're using Blazor Server. If you'd like to redirect a request, I recommend you do it in Middleware. You can use HttpContext to get User Agent and other info, and because it's Middleware, it fires before the Blazor page even starts building.

How to allow a C# UWP app manage another UWP app?

I want to do some things, which I feel are very simple, but I cannot do. I have looked at numerous websites and StackOverflow questions. One question has helped me a bit by pointing me in the right direction, but I feel I need more than just that.
Here is what I want to do (basically):
I would like to make a UWP app that can be managed by another app.
By "managed" I mean:
Should be able to install the app.
Should be able to uninstall the app.
Should be able to check for updates and update the app.
It should also be able to launch the app.
Optional requirements:
While launching the app, I would like to have it set the page of a panel to a certain page. Also fine with it clicking on the navbar and change the panel's page
This would be an example of my app would be like (the one with the panel/nav): Question
I would also like an installer (something like a .exe file or .msi file) for the installing app. Not the .appinstaller that visual studio 19 produces. Something like Inno Setup produces.
Is any of this possible?
If so, please give me some sample code/instructions/links. I would be very thankful for any advice/points in the right direction as well!
If not, please suggest what other language/framework I should use to accomplish these tasks (Is "tasks" the right word?). I don't mind learning anything and have unlimited time. Don't care about the learning curve either. (If I need C++, I will do it. ONLY IF I NEED IT!!!)
Thanks all!
P.S. I know about WPF or WinForms. I don't want to use them because of their age.
As the Rob Caplan said, PackManager class doesn’t support uwp app, it is suitable for desktop app. So maybe you need to create a wpf app and use Desktop bridge to package it into uwp app so that you could use this api. In addition, you could find the sample here about installing appx package, its parent directory Windows-classic-samples/Samples/ also contains other samples you need, such as PackageManagerRemovePackage, etc, please check it.

Run local web application but restrict access to resources

I'll try to keep this coherent and to the point, been coding all day and a little fried right now. I know doing this is also entirely possible, I'm just not entirely how to do it directly.
The idea is I'm working on a program I'd like to make commercial and sell in the future. Currently it's been holding up to testing processes and everything looks good, but now that I'm starting the improve the program's GUI, I'm hitting limitations using Windows Forms (EI, tab control tops not being easily recolor-able, etc, etc), and had a thought... That I could make the GUI look infinitly better if I could import the program into a web page. Using a dot net project makes that relatively easy since I can copy the C# code over and after a bit of tweaking, it should be fairly straight forward to get everything running and then I just need to rewire everything to the web page GUI.
To handle launching the web page, I was contemplating making a program that creates a "harness" (Small graphic program that just runs a command prompt line to initialize the web service and provides a link to the web page being hosted on the local service. This approach works, but the big issue I'm hitting while probing this route is that the "Release" folder generated on the web application isn't fully self contained and in addition to this all resources are visible. (Hard to sell a product if the first person you sell it to can just distribute the source code around)
So ideally at this point, I'm looking to see if anyone can guide me in the right direct. I'm not sure how to go about creating a program that runs an app inside a local browser AND hides/otherwise makes all the code / resources (images, etc) unviewable/inaccessible to anything outside the program.
Sorry if this is a bit rambly, not entirely sure how to actually ask/find what I'm looking for. (There maybe a name for the thing I'm looking for and I've just never heard of it before.)
I would recommend you to use WPF windows presentation foundation, you can make much more user friendly and intuitive interfaces in WPF comparing to windows form.
Developing and trying to sell a desktop program as a website is never recommended, the website is meant to be hosted on a server and let the clients access all of its functionalities within the browser. So I would suggest you to go and search for WPF.
You also mentioned that you are struggling to improve the windows form User interface design and are struggling to design attractive GUI. Well this is not true you can make amazing GUIs with windows form. take a look at this link https://www.youtube.com/watch?v=K9Ps66GoD-k this will greatly help you to improve the existing windows form application design you already have developed.

How to make column download or not dynamically

I have a store website that we want to make available to mobile users. Completely redesigning this site is not an option. The store has a left and right sidebar that is purely informational and is not necessary to purchase items. I have been given the task of "hiding" the sidebars for mobile users. I can easily use CSS to say #rightSidebar {display:none;} but it is graphic heavy and still will download to a user's cell phone extremely slowly.
The store is in ASP.NET C# and the sidebars are ConLibs and I know I can put logic in there to say "if mobile don't do this" but my boss doesn't want that extensive amount of change to the store. (I know. :( ) Is there anything else that I'm overlooking that would let me "hide" the content without it downloading first? I'm no pro in .NET so thought I should ask you folks if there's something I am missing or haven't learned yet to do this. I feel the best method is to modify the ConLib but unfortunately that's not an option for me at this time.
Thanks!

Creating application on Windows platform which enters to the secure area of website

First of all, sorry for my English :)
I'm web developer. Generally coding in PHP.
Recently started to learn C++.
I want to create simple application which will simplfy daily routine works. For ex,Every time when I check my internet banking account, must login to my account via any browser. What I wanna do is, to create mini windows application which will store my login and pass, will login to my account, and show exact page what I see on browser directly after login. Website that I'm talking about is here
The problem, I can't find any tutorial about creating such application. Don't know where to start. Did research but found nothing about this. (Maybe I selected wrong keywords :)) So decided to post question here. I don't need your code, just give me starting point, where to learn to create applications as I described above.
And one more question: Is it important to know website's coding language before building such windows apps? I mean: PHP/C#... etc
Thx in advance
Not sure why you would pick C++ for this type of project, though it's possible, it would be quite tedious. I would recommend looking into Java, perl, ruby, python, or some other language that supports the Selenium Webdriver API. You can also use the mechanize API with Perl, which is also a bit tedious. I've done things like this in the past with success using Selenium (http://seleniumhq.org). Unfortunately, I don't think there is a Webdriver API for C++ as of yet (you could try writing one!), but there are definitely APIs available for the other languages I posted. Check out: http://seleniumhq.org/about/platforms.html#programming-languages.
EDIT
If you're more interested in screen scraping with C++, this question, and some answers within the thread, may prove useful to you as well: https://stackoverflow.com/questions/489522/library-recommendation-c-html-parser

Categories

Resources