bool install = await DisplayAlert("Version " + jsonVersion + " available", "New version of application available. Please, update for new features. \n" + " \n " + "What's new in this release:\n \n" + releaseNotes, "Install Now", "Later");
How can i manage the height of the alert.
There is no customization for xamarin forms display alerts. If you want a customization I think you have to use a DependencyService and call OS Alert. or use nuget like this.
https://github.com/rotorgames/Rg.Plugins.Popup
Related
I am currently working on a web add-in that processes, modify and then sends the email.
I'm attached to the ItemSend event: <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="validateBody" />. This validate the body and then sends it.
The problem I have is that processing the email might take up to 40 seconds and I don't want the user to be blocked for that amount of time.
I was wondering is there a way to minimize the compose window and still run the processing function and the close that minimized window once its done?
I know that the add-in only works on the current item so when I send the email I can still access the other pages but once the email is trying to send itself and close the compose window nothing happens.
This is the function that sends the email:
async function sendInBackGround(htmlArr, message = "") {
const subject = await getEmailSubject();
const messageDiv = "<div>" + message + "</div>";
for (const htmlArrObject of htmlArr) {
debugger;
var request = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
' <soap:Header><t:RequestServerVersion Version="Exchange2010" /></soap:Header>' +
' <soap:Body>' +
' <m:CreateItem MessageDisposition="SendOnly">' +
' <m:Items>' +
' <t:Message>' +
' <t:Subject>' + subject.value + '</t:Subject>' +
' <t:Body BodyType="HTML"><![CDATA[' + htmlArrObject.html + messageDiv + ']]></t:Body>' +
' <t:ToRecipients>' +
' <t:Mailbox><t:EmailAddress>' + htmlArrObject.recipient + '</t:EmailAddress></t:Mailbox>' +
' </t:ToRecipients>' +
' </t:Message>' +
' </m:Items>' +
' </m:CreateItem>' +
' </soap:Body>' +
'</soap:Envelope>';
Office.context.mailbox.makeEwsRequestAsync(request, (asyncResult) => {
console.log(request);
if (asyncResult.status === "failed") {
console.log("Action failed with error: " + asyncResult.error.message);
}
else {
console.log("Message sent!");
mailboxItem.close();
}
});
}
}
When I send the item and wait on the compose window for the process to be done, the asyncResult has a status and a value that are defined. But when I change windows while the process is running, for example I go on an other compose window and start writing another email, the asyncResult object has a status of succeeded but the value returned is undefined.
Can someone help?
I was wondering is there a way to minimize the compose window and still run the processing function and the close that minimized window once its done?
No, there is no way with web-based add-ins. You can post your feature request/suggestion to the Tech Community Page. Don't forget to choose the appropriate label(s). Feature requests on Tech Community are considered when the team go through the planning process.
As a side note, you can implement the required functionality with COM based add-ins nowadays. For example, you may consider developing a VSTO add-in instead, see Walkthrough: Create your first VSTO Add-in for Outlook for more information.
i'm building an FMX app for Win32 (one form only) with C++ Builder. I'd like the program to remember where it's form was located on the users screen and it's size (it is resizeable) for the next time the user runs it.
Can someone point me in the right direction?
thanks,
relayman
UPDATE: Thanks Sam. I did what you said but wrote the position info to an SQLite db instead of text file. The db has a table named "pos" with 5 integer fields. 4 are the positions and 1 is named "item" and is just to facilitate my update query (I'm not sql expert by long shot). Note, the code below needs try/catch improvements and some tests to make sure form coordinates are valid.
This code is in the form OnShow event:
TFDQuery *query2;
query2 = new TFDQuery(NULL);
query2->Connection = Form1->FDConnection1;
query2->SQL->Text = "SELECT * FROM pos";
query2->Open();
Form1->Left = query2->FieldByName("left")->AsInteger;
Form1->Top = query2->FieldByName("top")->AsInteger;
Form1->Width = query2->FieldByName("width")->AsInteger;
Form1->Height = query2->FieldByName("height")->AsInteger;
query2->Close();
query2->DisposeOf();
This code is in the form OnClose event:
TFDQuery *queryUPDATE;
queryUPDATE = new TFDQuery(NULL);
queryUPDATE->Connection = Form1->FDConnection1;
queryUPDATE->SQL->Text = "UPDATE pos set left = '" + IntToStr(Form1->Left) + "', top = '" + IntToStr(Form1->Top) + "', width = '" + IntToStr(Form1->Width) + "', heigth = '" + IntToStr(Form1->Height) + "' WHERE item = '1'";
queryUPDATE->ExecSQL();
queryUPDATE->Close();
queryUPDATE->DisposeOf();
OnClose save the position, with, height, state, ... into an INI file. OnCreate restore all that info
i am new to the telerik reporting. i am using the following expression in my report,
= Fields.EmailPromotion +" " + "Y"
i want to show emailpromotion in color RED and "Y" in color green.can some one please tell me how to do this using the expression . any help will be appreciated.
i am using report designer R2 2017.
To achieve different styles within the same text box you will need to switch from TextBox to HtmlTextBox. Then you need to go to the "Expression..." editor for the HtmlTextBox and then switch from "Design View" to "Html view". Once you are in "Html View" enter the following expression:
="<span style='color: #ff0000'>" + Fields.EmailPromotion + "</span> "
+ "<span style='color: #00ff00'>Y</span>"
Hope this helps.
I'm using Umbraco 7 and i dynamically add proprieties to a tab called
Master & Detail Last Section
using this logic var x = 0;
foreach (var item in multiUrlPickerDyn)
{ var tab = dt.PropertyTypeGroups.LastOrDefault(t => t.Name == "Master & Detail Last Section");
var pt = dt.getPropertyType(item.Name + "m" + x) ?? dt.AddPropertyType(sidebar, item.Name + "m" + x, item.Name + " 'Master'");
pt.PropertyTypeGroup = tab.Id;
pt.Save();
pt = dt.getPropertyType(item.Name + "d" + x) ?? dt.AddPropertyType(sidebar, item.Name + "d" + x, item.Name + " 'Details'");
pt.PropertyTypeGroup = tab.Id;
pt.Save();
x++;
}
the proprieties are added and i can see them in the back office and everything is cool
but when i but content in them and publish it but it does not show up in the front end
it shows only after i rebuild my project the the list item shows before build but the content does not
after i rebuild every thing shows up does anyone know why ?
please help me i'm stuck
i was searching at the wrong direction was error getting the data from the back office
i was using
#Umbraco.Field(item.Name + "m" + x) wont work on run time
use this
var currentNode = umbraco.presentation.nodeFactory.Node.GetCurrent();
#currentNode.GetProperty(item.Name + "m" + x).Value;
UPDATE
this answer and this approach is all wrong don't add anything dynamic at run time its a bad practice yo can make the user add documents type from the Umbraco back office and using Currentpage.child list them in the view as an umbraco newbie im really sorry for asking and answering while im not that good.
I am opening a popup window from CRM 2011 for Outlook. The problem is I need the user to be able to print. If you do it from IE the browser print menu is available but from Outlook it is not. You just get a plain window. Hitting the Alt key does nothing when a popup opens from Outlook. None of the openStdWin() options seem to actually work from Outlook.
FYI I'm trying to print Dashboards (why MS left that out is beyond me). The solution we came up with is the following code hooked to a ribbon button. Then the user uses the built-in browser print functionality and the dashboard can be printed. But not from Outlook it seems. Any suggestions? (before anybody suggests it our client thinks print-screen is unacceptable)
function printCurrentDashboard() {
if (Xrm.Page.context.isOutlookClient()) {
var pTarget = document.getElementById('dashboardFrame').src;
openStdWin(window.location.protocol + '//' + window.location.host + pTarget, 'test', 800, 600, 'menubar=yes,toolbar=yes,channelmode=no,directories=yes,fullscreen=no,location=yes,status=yes,titlebar=yes');
}
else {
var pTarget = parent.document.getElementById('dashboardFrame').src;
window.open(window.location.protocol + '//' + window.location.host + pTarget);
}
}
Try using openStdWinWithFeatures vs openStdWin.