dialog

Importing Excel into DataGridView

怎甘沉沦 提交于 2021-01-28 23:56:05
问题 I'm making a program where two databases are merged together.... I can import an excel spreadsheet into a DataGridView with this code: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.xls;Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""; DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb"); DbDataAdapter adapter = factory.CreateDataAdapter(); DbCommand selectCommand = factory.CreateCommand(); selectCommand.CommandText = "SELECT *

Getting TurnState data from DialogContext

大兔子大兔子 提交于 2021-01-28 12:25:24
问题 I am using BotBuilder SDK v4. Here is the explanation below (ignoring some extra code). On my bot's OnTurnAsync I am calling one of my dialog like so. public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken)) { var state = await _accessors.TurnStateAccessor.GetAsync(turnContext, () => new TurnState()).ConfigureAwait(false); var dialogContext = await _dialogs.CreateContextAsync(turnContext).ConfigureAwait(false); await

How to enable-disable an element in dialog object - DLGEnabled

房东的猫 提交于 2021-01-28 12:13:06
问题 Why is the following script not disabling the push button, as it is supposed to do? class ElementEnableTest : UIFrame { void Action( object self ) { self.LookUpElement("StopButton").DLGEnabled(0); result( "button clicked\n" ); }; ElementEnableTest( object self ) { TagGroup tgDialog = DLGCreateDialog( "" ); TagGroup tgButton = DLGCreatePushButton("stop","Action"); tgButton.DLGIdentifier("StopButton"); tgDialog.DLGAddElement( tgButton); self.init( tgDialog ); self.Display( "test" ); }; }; alloc

How can I call a dialog from a webview?

為{幸葍}努か 提交于 2021-01-28 05:26:27
问题 I have a webview and a class with functions that will be used with javascript inside the webview class with functions (WebAppInterface.java): public class WebAppInterface { Context mContext; WebAppInterface(Context c) { mContext = c; } @JavascriptInterface public void closeApp() { ((Activity)mContext).finishAffinity(); } @JavascriptInterface public void refresh() { Intent i = new Intent(mContext, MainActivity.class); mContext.startActivity(i); ((Activity)mContext).finish(); } } How can I call

p:resetInput does not reset the p:dialog when it is reopened

こ雲淡風輕ζ 提交于 2021-01-28 03:18:27
问题 Here is some html I am writing to allow categories to be added using a dialog: <p:dialog id="newCategoryDlg" header="Add New Category" widgetVar="newCategoryDialog" resizable="false"> <h:form id="newCategoryForm"> <p:panelGrid id="displayNewCategory" columns="2" cellpadding="4" style="margin:0 auto;"> <h:outputText value="Category Name :"></h:outputText> <p:inputText value="#{categoryController.newCategory.name}" required="true" requiredMessage="Please Enter a Category ID!" /> <f:facet name=

Using linux 'dialog' command from PHP

大兔子大兔子 提交于 2021-01-28 01:38:00
问题 I'm trying to write a helper script for doing various admin tasks on a server which can only be done from the command line and trying to use the 'dialog' command to display message boxes, inputs, password prompts etc, however, the needs of this task call for me to process the data in PHP. I'm having problems getting the dialog command to work in this way and can't figure out what i'm doing wrong. There's an example here Unfortunately it doesn't work. When you run PHP and exec/backtick/system

Win32 Custom Draw Treeview Control

半世苍凉 提交于 2021-01-28 00:49:34
问题 I'm trying to customize a treeview control using NM_CUSTOMDRAW messages. I simply want to draw every other visible item with a grey color. Here is code to draw: INT CResourceOutliner::On_WM_NOTIFY( HWND hDlg, WPARAM wParam, LPARAM lParam ) { HWND hTree = GetDlgItem( hDlg, IDC_TREE1 ); switch( ( ( LPNMHDR )lParam )->code ) { ... case NM_CUSTOMDRAW: { LPNMTVCUSTOMDRAW pCustomDraw = ( LPNMTVCUSTOMDRAW )lParam; switch( pCustomDraw->nmcd.dwDrawStage ) { case CDDS_PREPAINT: return CDRF

how to dynamically change bootstrap modal data-target click

纵饮孤独 提交于 2021-01-27 05:36:07
问题 I have a website calendar which acts similar to a reservation request. I had this working in Bootstrap 2x but have converted the app to 3.0. Everything seems to be working, but I am trying to figure out how to dynamically change the data-target. If a date is available, a day in the calendar may look like this: <div id="20140226" data-id="20140226" class="NotRequested calDay" data-target="#modalDialog1" data-toggle="modal">26</div> I have a show event that pulls the id of the day div and sets

WIN32 Dialogue Box Throws exception [duplicate]

不羁的心 提交于 2021-01-25 07:56:16
问题 This question already has answers here : Read access violation using m_pRenderTarget with winapi due to non-NULL pointer (2 answers) Closed 2 months ago . I am trying to learn the win32 api using the Microsoft documentation. I have gotten to chapter 4, and I seem to have run into an issue that I am struggling to debug. The dialogue box triggered by the about button throws an exception: Exception thrown at 0x773BDCFF (ntdll.dll) in practice.exe: 0xC0000005: Access violation reading location

WIN32 Dialogue Box Throws exception [duplicate]

白昼怎懂夜的黑 提交于 2021-01-25 07:55:18
问题 This question already has answers here : Read access violation using m_pRenderTarget with winapi due to non-NULL pointer (2 answers) Closed 2 months ago . I am trying to learn the win32 api using the Microsoft documentation. I have gotten to chapter 4, and I seem to have run into an issue that I am struggling to debug. The dialogue box triggered by the about button throws an exception: Exception thrown at 0x773BDCFF (ntdll.dll) in practice.exe: 0xC0000005: Access violation reading location