Closing ASPxPopupControl and Reset Login Dialogs - controls

I am creating a login usercontrol. I have added the following buttons: Recover Password, Change Password & Edit Profile.
I am using DevExpress's ASPxPopupControl to host the functions associated with those three buttons.
There are two problems
When the popup is opened I need to be able to close/hide it using a command button
When a user starts using one of the login controls and chooses to close the dialog the next time the dialog is opened it does not start at the beginning.
(e.g. Start the change password dialog, enter some information, close the popup; the information you started with is not cleared)
Any ideas?

Here is a link to help you with closing the popup on a keypress. You can use the Escape key as in this example or code your own.
http://www.devexpress.com/Support/Center/p/Q209168.aspx
For resetting the values, it appears this is manual.
http://www.devexpress.com/Support/Center/p/Q252942.aspx

Related

Cannot complete download from popup when prompting location with saveAs

I've been working on a browser extension allowing users to generate epub files from any webpage.
To use the extension, a user has to click on a toolbar button which opens a popup. On the latter, after specifying a config, the user clicks on "Generate". Here is my issue though:
When I use the download API directly, and specify saveAs to false (i.e the user is NOT prompted where to save the file), then the download is completed as expected and the file saved in some location.
However, when I do set saveAs to true --- which is what I want in the final version --- then once the user has selected the location under which to save the file, the download fails. My intuition is that as soon as the file location window pops up, the popup looses focus and dies, which makes the download impossible to resume.
Is that the explanation? And is there a way to prevent such a problem? I do not find my use case to be much of a stretch, and do not get why popups associated with browser actions are not allowed to loose focus for file selection.
Another weird thing is that I'm pretty confident this problem only appeared recently in firefox, since when I started developing the extension, I had no issue.
My intuition is that as soon as the file location window pops up, the
popup looses focus and dies, which makes the download impossible to
resume.
That's right...
Browser Action Popup is page and once page is closed, async operations will lose their reference. It is best to pass async operations to the background script.
You can use
runtime.sendMessage()
to pass a message to the background script to run the download.
You can also use the async
runtime.getBackgroundPage() to run a function in the background script but the first option works
easier as you dont need to wait for the async response as in runtime.getBackgroundPage()

Group Slack Interactive Message Menus as a Form [duplicate]

I want to develop a feature such a way that user can select multiple options from message menu. Is it possible to select multiple options from the interactive menu at the same time ??
You can currently only select one option. Slack does not support choosing more than one option in a message.
But there are 2 alternatives:
Dialogs
Dialogs are modal and allow you to use up to 10 elements each including select menus. And they have a "submit" and "cancel" button.
This allows you to implement exactly what you are asking, but your selects would be shown in a separate Dialog window and not directly as part of your message. You also need some extra functionality to connect the Dialog with your message, e.g. by having a button in the message that opens the Dialog.
Check out this answer on how to combine slash commands, buttons and dialogs.
Chaining message with selects
Another alternative is to chain selects in multiple messages one after the other for the user. This can be done by replacing the original posted message with a new message after each user interactions.
So after the user selected the first drop down your app shows him the 2nd menu and so on. Finally you would show the user a submit or cancel button. You can of course also add some functionality to the workflow, e.g. have a cancel button for every step.
Check out this post on how to replace the current message after the user clicked on a select.

Rename tab in MobaXterm for session duration

How can we rename tabs in MobaXTerm for the entire session duration? At the moment, I can right-click and rename the tabs, but as soon as I press enter to get command prompt, MobaXTerm resets tab name to its original default. I have tried changing PS1 env variable with no effect. Please help.
I haven't tried this myself but when you create a profile for a new ssh session, there is a tab "Bookmark settings" and within this tab there is a check box named "Lock terminal title." According to the manual:
Lock terminal title
Terminal title will be set to the session name
If you check this option, any attempt by the shell to set tab title will fail.
Uncheck this option if you want to allow the shell to change tab title.
Looks like you need to open every new tab as a New Session (Click on the "Session" button) and then follow what ks2000 suggested (It works for me).
There is limitation in number of sessions created for non-purchased mobaxterm. When you go for edit the session, red coloured message this message will be displayed. Delete unwanted sessions, unlock terminal title, then it will work. Otherwise purchase mobaxterm.
A bit late, but I came across this and wanted to update it.
I found the answer here:
https://stackoverflow.com/questions/29963545/rename-tab-in-mobaxterm-for-session-duration
I wrote a bash function to quickly handle this for me.
set_title() {
PROMPT_COMMAND="echo -ne \"\033]0;$1\a\""
}
set_title "webserver"
If none of the above works, just go to the sessions tab and click on the session you want to rename (just like when you want to rename a file). You should see the following:
After that, enter the preferred name and hit enter. The following window will occur:
Click yes and voilĂ !
THIS IS NOT FOR THE SESSION DURATION BUT PERMANENT

Is it possible to remove window by clicking button?

I am writing an app in which i want a WelcomeWindow.
WelcomeWindow contain some Text , CheckBox Button (with text- Don't want this message again) and one Ok button.
What i want is when my CheckBox state is On like ([checkBox state ]== NSOnState) and if i press Ok button then this WelcomeWindow should be close and
it won't be open again even if i Quit the app and then again run the app.
Is it possible in mac app ?
Any help will be appreciated.
Thanks in advance!!
Yes, Of course. You need to save an info that your app did already pass the welcome window. For instance NSDefaults or Sqlite. It can be stored as a boolean value. Then you just ask for that value in the beginning to display or not display mentioned window.

how to automate the logins on puttycm?

I got puttyCm, I need to log in to my devices for once and let the putty store it..later i can come and enter automatically with out entering the passwords again?
can u show me the way pls?
in addition,
if one device can be reached thru other devices..how to implement it?
You can follow below procedure (I assume that you have already engaged your puttycm with corresponding putty.exe or equivalent):
Just open any of your desired putty window by telnet or ssh (no need to login)
Right click on that window and click 'Configuration'; a window should pop up for same
In its 'Connection' tab on left side you can see check box called 'Enable Login macro mode'; select that
Now click on the tab 'Login Macro' again on left side; you can see Login / Password etc. fill them correctly (if you want to see the password which you type, you can click an EYE symbol next to it; that makes it visible until clicked again)
Once you login, if you want to enable some 'Post-login command' then check that box too; now you can write commands like 'bash' or 'myscript' etc in those command rows
Click 'OK' and verify by opening new windows (ctrl + u) of same ip addresses
I have not worked with puttycm, but my Putty experience tells me that puttyagent that comes with putty is an answer for your question.
Putty-agent stores any private keys you provide to it and uses them for automated authorization. Private-key can be added by means of standard ssh-agent tools like ssh-add or can be browsed to with GUI.

Resources