|
Hi, usually I am good in using Google... but so far I did not find any solution for this particular problem. And unfortunately your link is also just the standard MSDN page on how to load a resource with CanvasBitmap. But the documentation does not mention how to share ONE CanvasBitmap across TWO or more CanvasControls.
Sorry, still searching an answer for my question. Or maybe this not possible...?
Cheerio
|
|
|
|
|
Hi,
I developed a program for impaired persons which makes use of DirectSound, originally in VS 2008, now ported to 2013.
The program works fine on 32 bit Windows from XP to 10, but it throws a 'bad format' exception for Microsoft.DirectX.DirectSound .dll on any 64 bit machine.
While this might perhaps be understandable for the 2008 version, it looks rather weird to me for VS 2013 on windows 8.1.
I also tried to compile for the x86 platform, but to no avail.
Since a lot of people using my program have switched from 32 to 64 bit machines, I badly need an answer which I was not able to find on the web.
Have a happy New Year
|
|
|
|
|
Bad Image Format errors are just about always caused by an architecture mismatch between your code and the .DLL you're trying to load. In other words, either your code is 32-bit and trying to load a 64-bit .DLL or your code is 64-bit and trying to load a 32-bit .DLL.
|
|
|
|
|
Merry Christmas to all, I expose my problem, I'm opening a view (with a datagrid inside) and with the same relaycommand also load the data, the problem is when I go to close it and then reopen it I remain in the data memory existed before.
This is my code on ViewModel:
CloseWindowCommand = new RelayCommand<BustaMainView>(CloseWindow);
OpenBustaMainView = new RelayCommand<BustaMainView>(OpenWindow);
BustaMainView w;
public void OpenWindow(object parameter)
{ w = new BustaMainView(); w.Show(); this.GetdatiBusta(); }
public void CloseWindow(object obj)
{
w.Close();
}
public void GetdatiBusta()
{
foreach (var item in _serviceProxy.GetBusta())
{
BustaOservable.Add(item);
RaisePropertyChanged("GetDatiBuste");
}
modified 26-Dec-14 0:26am.
|
|
|
|
|
Do you want it to stay inside the memory or not?
If so, that is because your object is not created inside any function and is a global variable causing it to be available throughout the execution. To remove it from the memory, dispose it (close it) as soon as you're done working with it. A simple way of doing this will be to set the instance of w to null .
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
sir
how youtubr embed code upload using database...and display on asp.net page .....
beacuse when i want to delete and update.....from sql database
|
|
|
|
|
Your question is unclear! Please try to improve your English...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
provide more explanation of your requirement with your source code.
|
|
|
|
|
Hello everyone I have a problem, I have to add two textbox float, and put the result in another textbox without using codebehind the two textboxes are bindate to their property. Thank you all in advance for the help
|
|
|
|
|
Ihave make:
Model:
public double Ricambi
{
get { return _Ricambi; }
set { _Ricambi = value; RaisePropertyChanged("Ricambi"); }
}
public double Manifattura
{
get { return _Manifattura; }
set { _Manifattura = value; RaisePropertyChanged("Manifattura"); }
}
public double Totale
{
get { return Manifattura + Ricambi; }
set{_Totale = value; RaisePropertyChanged("Totale"); }
}
View:
<TextBox Height="24" Canvas.Left="100" TextWrapping="Wrap" Canvas.Top="246" Width="89" Text="{Binding Busta.Ricambi,Mode=TwoWay}" />
<TextBox Height="24" Canvas.Left="100" TextWrapping="Wrap" Canvas.Top="291" Width="89" Text="{Binding Busta.Manifattura,Mode=TwoWay}"/>
<TextBox Height="24" Canvas.Left="100" TextWrapping="Wrap" Canvas.Top="335" Width="89" Text="{Binding Busta.Totale, Mode=TwoWay}"/>
If I insert the data in the textbox Ricambi and manifattura in theory should be the Totale automatically updated but this only happens if I type some numbers. Why?
|
|
|
|
|
To get "Totale" to update as the other properties change, you need to add RaisePropertyChanged("Totale") statements to both the setters for "Manifattura" and "Ricambi". e.g.
public double Manifattura
{
get { return _Manifattura; }
set { _Manifattura = value;
RaisePropertyChanged("Manifattura");
RaisePropertyChanged("Totale"); }
}
In this case, the "setter" in "Totale" makes no sense and contradicts the "getter".
Alternatively, set the "value" of "Totale" in BOTH the other properties: e.g.
public double Manifattura
{
get { return _Manifattura; }
set { _Manifattura = value;
RaisePropertyChanged("Manifattura");
Totale = Manifattura + Ricambi;
}
... and change the "getter" in "Totale" to return "value".
|
|
|
|
|
hanks to all of you have been to me for help and best wishes happy holidays
|
|
|
|
|
how to host the asp.net website with database and which file we have to hosted on the server and like that how to mention the connection string with in the web.config.and how the asp.net will interconnected with database
balu
|
|
|
|
|
|
Since you're asking about ASP.NET, I would like you to go to this very link and surf it thoroughly.
http://www.asp.net/hosting[^]
Secondly, did you try to search or Google for this problem? I am sure, there are more than hundreds of solutions and services present for you, at your own very budget ready for you to use them. I remember, when I wanted a service I was able to get a service after choosing a service from more than hundreds over hundreds services that fit my budget and requirements.
Good luck!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
hi,
i am trying to update my application while using my .msi installation file through command line. my question is how do i use my .msi file to reinstall the application? through command line?
i tried msiexec.exe with /p and /update and /i already
but it shows me error that the patch package is not valid
please help.
|
|
|
|
|
|
hi,
thanks for the reply. i think i found out why.
originally i was trying to distinguish my application installer so that if a higher version comes the major update can take place.
but i dont think the default msi installer can support that. i am gonna try wix or install shield.
|
|
|
|
|
I guess a custom action can handle your requirement.
|
|
|
|
|
I have a game app that has a window in it and was designed to be interacted with using only the keyboard. I find it very difficult to do this and was wondering if it was possible to write an app that would allow me to use the mouse on this first app to control it?
I'm thinking, if this is possible at all, that my small app would detect mouse clicks on the game app and feed into its keyboard buffer the keys it 'thinks' it is receiving from the keyboard.
Is this possible at all?
Thanks...
|
|
|
|
|
|
hi,
i am running a service in a window 7 computer and using it to run a msi installer in silent mode. the problem is that i want it to show a prompt to the user when the installation succeeded. is this possible?
|
|
|
|
|
neodeaths wrote: is this possible? Easiest way to do so is by writing a normal windows-application that checks for a "done" flag. You can set the flag from the service, in a database of your choice - or an XML file or similar. Have the application check the file and display a status if required.
Services do not run as user-applications; they're started before a user logs in, and may be running when there's no user to view the dialogs. A small application that starts in the normal user-space would be the easiest way to communicate.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello to all I can not understand how to recover from model year when the property is not mistakes, I use this class for validation:
public class ValidatableModel : INotifyDataErrorInfo, INotifyPropertyChanged
{
private ConcurrentDictionary<string, List<string>> _errors = new ConcurrentDictionary<string, List<string>>();
public event PropertyChangedEventHandler PropertyChanged;
public void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
ValidateAsync();
}
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
public void OnErrorsChanged(string propertyName)
{
var handler = ErrorsChanged;
if (handler != null)
handler(this, new DataErrorsChangedEventArgs(propertyName));
}
public IEnumerable GetErrors(string propertyName)
{
List<string> errorsForName;
_errors.TryGetValue(propertyName, out errorsForName);
return errorsForName;
}
public bool HasErrors
{
get { return _errors.Any(kv => kv.Value != null && kv.Value.Count > 0); }
}
public Task ValidateAsync()
{
return Task.Run(() => Validate());
}
private object _lock = new object();
public void Validate()
{
lock (_lock)
{
var validationContext = new ValidationContext(this, null, null);
var validationResults = new List<ValidationResult>();
Validator.TryValidateObject(this, validationContext, validationResults, true);
foreach (var kv in _errors.ToList())
{
if (validationResults.All(r => r.MemberNames.All(m => m != kv.Key)))
{
List<string> outLi;
_errors.TryRemove(kv.Key, out outLi);
OnErrorsChanged(kv.Key);
}
}
var q = from r in validationResults
from m in r.MemberNames
group r by m into g
select g;
foreach (var prop in q)
{
var messages = prop.Select(r => r.ErrorMessage).ToList();
if (_errors.ContainsKey(prop.Key))
{
List<string> outLi;
_errors.TryRemove(prop.Key, out outLi);
}
_errors.TryAdd(prop.Key, messages);
OnErrorsChanged(prop.Key);
}
}
}
}
This is Model:
public class Busta : ValidatableModel
{
int _BustaID;
string _DescrizioneBusta;
int _NegozioID;
public string _nomeCliente;
[Key]
public int ID { get; set; }
[Required]
[CustomValidation(typeof(Busta), "unicoBustaID")]
public int BustaID
{
get { return _BustaID; }
set { _BustaID = value; RaisePropertyChanged ("BustaID"); }
}
[Required]
[CustomValidation(typeof(Busta), "nullNegozio")]
public int NegozioID
{
get { return _NegozioID; }
set { _NegozioID = value; RaisePropertyChanged("NegozioID"); }
}
[StringLength(20)]
public string NomeCliente { get; set; }
[MaxLength(20)]
[Required]
public string DescrizioneBusta
{
get { return _DescrizioneBusta; }
set { _DescrizioneBusta = value; RaisePropertyChanged("DescrizioneBusta"); }
}
public static ValidationResult unicoBustaID(object obj, ValidationContext context)
{
var user = (Busta)context.ObjectInstance;
if (user.BustaID <= 0 )
{
return new ValidationResult("Codice errato", new List<string> { "BustaID","" });
}
return ValidationResult.Success;
}
public static ValidationResult nullNegozio(object obj, ValidationContext context)
{
var user = (Busta)context.ObjectInstance;
if (user.NegozioID <= 0)
{
return new ValidationResult("Selezionare Un Negozio", new List<string> { "NegozioID", "" });
}
return ValidationResult.Success;
}
}
Then I wanted to make in the ViewModel to recover if the properties of the Model has no Envelope errors but I just always deactivated the button:
SaveCommand = new RelayCommand<Busta>(SalvaBusta,CanSave);
public bool CanSave(object parameter)
{
if (Busta.HasErrors == false )
return true;
else
return false;
}
|
|
|
|