changing winform properties for different clients - winforms

I have a winforms app and want to customize for differents clients, I need a simple mechanism to create a version for client1 with one commandline app for example. I only want to change the color of the window and of buttons and a smart logo. I dont want to change it manually every time I need a client1 version.

Maybe you can put in your app.config some configuration tags, some properties you need. And then let's say, through your setup process, you modify the configuration based on client desires( that's if I understood correctly.

I don't know what kind of app you have but I had an app that is accessible for 3 different types of users which are admin, receptionist and patient. I used password authentication and inside the forms, I used simple if/else clauses according to authentication types to arrange which user could use which parts of the app. But as far as I understand you need something like an interface in case any other client takes part in the app later.

Related

Microsoft Teams modify Save button in Connector setup page

I am currently working on the setup page for my custom MS Teams Connector.
For inspiration, I was looking into other companies and one particular thing caught my attention.
Teams usually has at the bottom 2 buttons, like here in my setup page:
I have no Problem communicating with them using the #microsoft/teams-js client SKD and could make my page work like it is now. But I got curious how to do it with custom buttons like other Companies.
For example Trello:
Like you can see they moved the buttons up and also have a login button.
I also need to add authentication form my Connector, so I was wondering if its possible to archive a similar layout for my Connector.
For the Setup page I am using web app created with create react app
So my questions are:
Is this possible using react?
If yes how is it done?
I could not find much documentation regarding this topic.
The behavior is by design. Quite a while back we started giving developers more control in the tab configuration flow and allow them to render their own button within the iframe. Everything within that task module is now controlled by the app.

AngularJS: Triangular three way binding -- Project Structure

I am currently working out an admin interface with a Live Preview and I am still not 100% on how to structure it properly.
My page basically consists out of two parts. The Admin Interface and the Live Preview. Obviously, the Admin Interface fills some variables with data and the Live Preview displays this.
Therefore, the Admin Interface needs to bind variables, that the Live Preview will bind for reading.
Furthermore, the Live Preview in the end (if possible) should be re-used as the final product that displays a set of information. All it does is display a single JSON file that is received from the server (when in product mode) and in case of the Live Preview it will need to update the data Live as its edited.
One more note: Both, the Live Preview and the Admin Interface consist of elements like directives again and parts of the Admin Interface need to be loaded dynamically by having a user add a page with a certain type of content.
After researching how modules are handled I came up with the following:
Live Preview is a Module
Admin Interface is a Module
My page includes both modules
Both of them should be connected to something central that provides the ability of editing the data (bound variables?) and reading the data so its updated live.
Ideally, this would be a service, so later on when loading the "Live Preview" as an actual product, can just use the same kind of service which in this case provides the information from our Database instead of a variable in its scope.
Is this a good approach? Is there a way to have a service that on the one hand side can be edited lively like in a two way binding so that my live preview can also pick it up? Is there something I can use instead of the services, like a controller? How should I go on about this?
You are doing everything right. I don't think that it is relevant as to whether the preview and admin panel are their own modules or contained within one. You will find people using module seperation in a wide variety of ways within their Angular apps.
What I think you said that is important and correct is to connect the preview and admin panel via a Service. Other methods of connecting these two (i.e. $rootScope) are costly and bad practice.
If you will be re-using live preview in many locations of your application I would wrap it in a directive.
You should feel confident in your approach, it's a good one.

Need help creating a skeleton for a client portal on DNN

Total DNN noob. I can code some WebForms and MVC, but having no luck finding anything concrete out there about doing what I want in DNN
How would I go about setting up a client portal in DNN? I want to have separate areas for the client, including a main dashboard that aggregates content for the client from the other areas. The other areas would include a matter area (with matter information - some auto generated for client, other information to be input by client), a documents area, an events area, a tasks area, a communications area (for chat, or forum style questions) and a profile area for the client (contact info, invoicing, etc.).
What I'd like is for a client to login and see only their items. An admin would log in and get the same "screens" or "areas", but with aggregated content for ALL users.
I know that's a lot, but I would imagine setting me up with a way to do the overall app and then how to create the areas to navigate to would get me going. I know there are modules for each of those things out there, but a) I wouldn't know how to integrate this into one client app and b) some are cost prohibitive.
Most of what I find focuses on setting up one module. Do I go that route and set up user controls within for the different areas? Or do I create separate little modules and tie them together? This is primarily where I am stuck. I can create something like this with standalone web forms or MVC. Hooking into DNN is where I get stuck.
I appreciate any guidance / samples.
There are a LOT of questions here and many ways that you can go about doing this. You could use third-party modules to handle this but you will need to figure out exactly which ones give you the functionality that you want.
If you are looking to do things custom, this is where it gets a lot easier. DNN for users can manage user identity and roles. Based on what you are saying it seems like you would have some custom modules that store all information based on UserId. By default you only display the information for the current user. However, if the user is in a specific role, say for example "Administrators" you would display all content.
This is pretty easy as with any DNN control that inherits from PortalModuleBase you have the UserId available to you as a property. Then you can use UserInfo.IsInRole("Administrators") to check for admins.

Multi-shell application?

I am new to Prism.
Imagin a scenario where you want to develop a multi-region application, but there should are many types of screens and I want those regions to be in one screen only, whereas, for instance in the HomePage which is the application map (like in QuickBooks, see image bellow), there should be no regions, and the whole layout should be different.
Also I want that the application should be available for registered users only; unregistered users are automatically forwarded to the LoginView, and they're not supposed to see the regions etc.
How are these two aspects achieved?
I think I am going to implement the entire application using View-Based Navigation.

cookies in winforms

I want to save user name and password in a cookie.mine is a win forms application.Please advice how can we do this.
Thanks
In win Forms you should use registry,files,databases.... not cookies, cookies for web applications that usually be displayed in web browsers.
I would suggest using a password protected SQLite database (see System.Data.SQLite) and storing whatever you want there.
Also, do remember to hash your passwords!
This is not supposed to be an answers - more of a comment. Apologies if I posted it in the wrong way:
I expect the person asking the question may be aware that this is not the optimal way to store info in a winforms app. I would also like to know how to do this as a possible way of passing information from a website to a desktop app? For example you want the same app to do different things depending on information pass to the app from the website.
I've found that you can Retrieve Query String Information in a ClickOnce Application (http://msdn.microsoft.com/en-us/library/ms172242.aspx) which allows you to pass information from a site to an app. I want to know if cookies could also be used to do this.
I suspect it would be difficult and not practical in many situations to read info from a cookie in this way. One way I can think of doing this is putting a GUID in a cookie and also hardcoing that GUID into the app and running a find in files over the computer to find it. I realise that's a very ugly method but I would like to know what's possible.
I suppose another way might be to embeded a Webbrowser control in a winforms app and get the Webbrowser control to load a page containing JavaScript which reads that cookie. You would then need some way of passing that back to the .NET code though?
First, we can't use Cookies in WinForm applications.. it's a Web side functionality, but you can do something else..
For instance, once I had to do the same thing... to save the latest user connected to the application. I did it with a database (I prefere database, because txt files are not that safe.. we can erase them by mistake..)
So I suggest to save the username (and password in your case) on the database after every Connection event.
Hope that was usefull.

Resources