The type or namespace name 'frmAbout' does not exist in the namespace 'DevExpress.Utils.About' - devexpress

Just upgraded to DevExpress 18.1.5, and my app won't compile because DevExpress.Utils.About.frmAbout doesn't resolve. Did DevExpress replace this with something else?
private void iAbout_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
DevExpress.Utils.About.frmAbout dlg = new DevExpress.Utils.About.frmAbout("~");
dlg.ShowDialog();
}

DevExpress response:
Yes, we have reworked our frmAbout dialog in version 18.1. Now you can show the dialog using our DevExpress.Utils.About.AboutHelper class as follows:
DevExpress.Utils.About.AboutHelper.Show(DevExpress.Utils.About.ProductKind.DXperienceWin, new DevExpress.Utils.About.ProductStringInfoWin(DevExpress.Utils.About.ProductInfoHelper.PlatformWinForms));

Related

VS2022 extensions command initial checked state

I have a VS extensions command based on the default template. It has CommandFlag's TextChanges and TogglePatternAvailable. Depending on a config setting its initial state should be checked, however, this does not appear to be possible.
This is what I want to see on the first load:
I've tried setting Checked to true in the constructor of the command after creating the menu item:
menuItem1 = new OleMenuCommand(ExecuteCommand1, _, BeforeQueryStatus, new CommandID(CommandSet, Command1Id));
menuItem1.Checked = true; // This does not work
I've also tried using the BeforeQueryStatus to change the initial checked state, but it does not seem to be called when opening the Tools menu. Could this be a bug???:
private void BeforeQueryStatus(object sender, EventArgs e)
{
ThreadHelper.JoinableTaskFactory.Run(async delegate
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);
menuItem1.Checked = true;
});
}
Clicking the menu item once does trigger BeforeQueryStatus and the state is checked after that, proving that the code does work.
How can I set the initial checked state of the menu item to true depending on a config setting, so in code?
In the end I managed to get it to work by adding the ProvideAutoLoad attribute to my Package. It is unclear if this is the correct way to do this. The pacakge class now looks like this:
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[Guid(PackageGuidString)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string, PackageAutoLoadFlags.BackgroundLoad)]
[ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExists_string, PackageAutoLoadFlags.BackgroundLoad)]
public sealed class MyPackage : AsyncPackage { ... }

How to Mute volume on Button Clicked in MediaManager Plugin xamarin forms

How to Mute volume on Button Clicked in MediaManager Plugin xamarin forms
Below is my function
private void MuteClicked(object sender, EventArgs e)
{
if (CrossMediaManager.Current.VolumeManager.Mute)
{
CrossMediaManager.Current.VolumeManager.Mute = false;
muteBtn.Text = "Mute";
}
else
{
CrossMediaManager.Current.VolumeManager.Mute = true;
muteBtn.Text = "Unmute";
}
}
Button name is Changing but not affecting Volume
The current version (0.4.5) available via Nuget only contains placeholders for the volume controls.
Either your download the last version from the GIT repository ( https://github.com/martijn00/XamarinMediaManager ) or you wait for the next release.
I know it's an old thread but since there were no new release for the MediaPlayer and this is still the top result for this problem, you can use the unofficial nuget (https://www.nuget.org/packages/MediaManager.Unofficial/) witch is just a fork of the version 0.4.5 with some adjustments.
I just tried it and the Mute (which is now Muted) works, like the volume too.
Regards

Evernote, sample "Hello World" code error using Visual Studio 10 WebForm

I am using a Visual Studio 2010 WebForm application to post a simple note to EverNote using the sample code for "Hello world. Here is the Code:
private void btnSubmit_Click(object sender, EventArgs e)
{
ENNote myPlainNote = new ENNote();
ENSession.SetSharedSessionDeveloperToken(
"My Developer
Token","https://www.evernote.com/shard/s308/notestore");
myPlainNote.Title = "My First Notes";
myPlainNote.Content = ENNoteContent.NoteContentWithString("Hello
World!);
ENNoteRef myPlainNoteRef =
ENSession.SharedSession.UploadNote(myPlainNote, null);
}
I get "Object reference not set to an instance of an object" on the last line. I would really appreciate if someone could guide this newbie to resolve this issue.
UploadNote requires a second parameter to indicate in which notebook you want the new note created.
You can pass it an ENNotebook; for example, you could get such an object like this:
List<ENNotebook> myNotebookList = ENSession.SharedSession.ListNotebooks();
ENNotebook desiredNotebook = myNotebookList.Find(i => i.Name == "The name of my desired notebook");
You should also be able to pass a second parameter of null to add the note to your default notebook.

Microsoft Translator Api in asp.net

I developed an asp.net web application which translate the text into the multiple language through the Microsoft Translator API.
I have also downloaded the TranslatorContainer.cs file in my project. After selecting the language the following exception coming:
An exception of type 'System.Data.Services.Client.DataServiceQueryException' occurred in System.Data.Services.Client.dll but was not handled in user code
Following is my code:
protected void DDLLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
Uri TranslatorUri = new Uri("https://api.datamarket.azure.com/Bing/MicrosoftTranslator/v1/Translate", UriKind.Absolute);
TranslatorContainer TC = new TranslatorContainer(TranslatorUri);
string Key = " nQbC5yt6BtCCvXRXQIW11mR1gzkxi8n1K1cTl9b/uvM";
TC.Credentials = new NetworkCredential(Key, Key);
Translation TranslatedText = TC.Translate(TxtTranslate.Text, DDLLanguage.SelectedValue,"en").Single();
LblTranslatedText.Text = TranslatedText.Text;
}
My Event Viewer Shows:
Windows cannot load classes registry file. DETAIL - The system cannot find the file specified.

Changing Databases in Crystal Reports for .NET

I have a problem which is perfectly described here (http://www.bokebb.com/dev/english/1972/posts/197270504.shtml):
Scenario:
Windows smart client app and the CrystalReportViewer for windows.
Using ServerFileReports to access reports through a centralized and disconnected folder location.
When accessing a report which was designed against DB_DEV and attempting to change its LogonInformation through the CrystalReportViewer to point against DB_UAT, it never seems to actually use the changed information.
It always goes against the DB_DEV info.
Any idea how to change the Database connection and logon information for a ServerFileReport ????
Heres code:
FROM A PRESENTER:
// event that fires when the views run report button is pressed
private void RunReport(object sender, EventArgs e)
{
this.view.LoadReport(Report, ConnectionInfo);
}
protected override object Report
{
get
{
ServerFileReport report = new ServerFileReport();
report.ObjectType = EnumServerFileType.REPORT;
report.ReportPath = #"\Report2.rpt";
report.WebServiceUrl = "http://localhost/CrystalReportsWebServices2005/ServerFileReportService.asmx";
return report;
}
}
private ConnectionInfo ConnectionInfo
{
get
{
ConnectionInfo info = new ConnectionInfo();
info.ServerName = servername;
info.DatabaseName = databasename;
info.UserID = userid;
info.Password = password;
return info;
}
}
ON THE VIEW WITH THE CRYSTAL REPORT VIEWER:
public void LoadReport(object report, ConnectionInfo connectionInfo)
{
viewer.ReportSource = report;
SetDBLogon(connectionInfo);
}
private void SetDBLogon(ConnectionInfo connectionInfo)
{
foreach (TableLogOnInfo logOnInfo in viewer.LogOnInfo)
{
logOnInfo.ConnectionInfo = connectionInfo;
}
}
Does anyone know how to solve the problem?
I know this isn't the programatic answer you're looking for, but:
One thing that helps with this sort of thing is not creating your reports connected to the database directly, but first you create a "Data Dictionary" for Crystal Reports (this is done in the Report Designer). Then you link all of your reports to this dictionary which maps the fields to the proper databases.
Done this way, you only have one place to change the database schema/connection info for all reports.
Also, in your report designer set the report to not cache the results (sorry I don't remember the exact option). Reports can either have their initial results included or not.
Don't you have to browse all the "databaseTable" objects of the report to redirect the corresponding connections? You'll find here my VB version of the 'database switch' problem ...
In your CrystalReportViewer object you should set
AutoDataBind="true"

Resources