|
There is a good change you didn't deploy one or more .DLL's those referenced .DLL's depends on. With the information you provided there isn't enough information to tell which .DLL(s) are missing dependencies, if any.
I suggest you go down the list of the assemblies you references and get the documentation on each library to see if you have to do something special on the client machine to deploy that library.
|
|
|
|
|
Hi,
I want to get google place predictions with latitude, longitude and address based on Textbox entry in c# server side.
I tried in client side using
var places = new google.maps.places.Autocomplete(document.getElementById('txtPlaces'));
But i want to achieve in Server side C#.
How to achieve this.
If anybody knows, please reply me.
Thanks in advance.
|
|
|
|
|
I haven't tried it, but you might want to start looking at GMaps.Net[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I need a windows phone 7.1 code that can track’ location and the distance it has moved from where I am and also the speed it was on to reach where its current location .
|
|
|
|
|
So when do you get started writing that?
|
|
|
|
|
i just need the basics of GPS speedometer and distance tracker code for a car.
|
|
|
|
|
Sounds like you want someone to write it for you - wrong site. There are many sites where you can buy that service. This is not one of them.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, Im working in C# and trying to get string[] to int when I get an error:
My code:
string htmlCodee = Client.DownloadString("http://tf2casino.cf/prices/key.txt");
string[] htmlCode = htmlCodee.Replace("\r", "").Split('\n');
int low = Convert.ToInt32(htmlCode[1]);
My error:
ERROR: System.FormatException: De indeling van de
invoertekenreeks is onjuist.
bij System.Number.StringToNumber(String str, NumberStyles options, NumberBuff
er& number, NumberFormatInfo info, Boolean parseDecimal)
bij System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo i
nfo)
bij System.Convert.ToInt32(String value)
bij SteamBot.SimpleUserHandler.PriceUpdate() in c:\Users\Gebruiker\Documents\
Bot\KeyBot\SteamBot\SimpleUserHandler.cs:regel 136
bij SteamBot.SimpleUserHandler.OnLoginCompleted() in c:\Users\Gebruiker\Docum
ents\Bot\KeyBot\SteamBot\SimpleUserHandler.cs:regel 107
bij SteamBot.Bot.<handlesteammessage>b__5(LoginKeyCallback callback) in c:\Us
ers\Gebruiker\Documents\Bot\KeyBot\SteamBot\Bot.cs:regel 436
bij SteamKit2.CallbackMsgExtensions.Handle[T](ICallbackMsg msg, Action`1 hand
ler)
bij SteamBot.Bot.HandleSteamMessage(ICallbackMsg msg) in c:\Users\Gebruiker\D
ocuments\Bot\KeyBot\SteamBot\Bot.cs:regel 416
bij SteamBot.Bot.BackgroundWorkerOnDoWork(Object sender, DoWorkEventArgs doWo
rkEventArgs) in c:\Users\Gebruiker\Documents\Bot\KeyBot\SteamBot\Bot.cs:regel 89
6
(Sorry for random NL text between it)
-Greetings, Jonathan
|
|
|
|
|
Start by using the debugger and looking at the data you have downloaded from the file: what exactly does it contain?
Then look at the array content post-split: what is in the second array element, exactly?
The chances are that the data is not what you expect, and the "second line" does not contain just a number.
But we can't check that for you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I saw the file, and i suppose you get these 2 strings:
"15.66"
"15.88"
Those strings hold double value, and you get exception because of that.
Greetings
|
|
|
|
|
Hi,
I have frmMain which is an MDI Container and (frmCustomer & frmOrders) which are MDI child
On frmMain I have panelHeader.
I want to hide panelHeader every time frmCustomer or frmOrders are shown and then show it back when MDI child is closed.
so what I want is if an MDI child is shown (MDI Child > 0) then panelHeader visibility to be false else it should be true.
How can I dot this please?
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Toggle the Visibility-property in the appropriate event.
That might mean having a window-focus event recounting how much of those windows are approrpriate (OfType<frmcustomer> and..) and update the status.
What have you tried?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Ive create a method that will handle keydown event
it has a lot of "if" statment and it say i has a high complexity and its scores 33
is there way to decrease its complexity
actually the method is not finish
here is the code
private static void FlyouCommandEvent(object sender, KeyEventArgs e)
{
var fd = (FlyoutDialog)sender;
if ((e.KeyCode == Keys.A || (e.Alt && e.KeyCode == Keys.A)) && fd.CanExecuteCommand(Helpers.FlyoutCommandAbort))
{
fd.ExecuteCommand(Helpers.FlyoutCommandAbort);
}
else if (e.KeyCode == Keys.Escape && fd.CanExecuteCommand(Helpers.FlyoutCommandCancel))
{
fd.ExecuteCommand(Helpers.FlyoutCommandCancel);
}
else if ((e.KeyCode == Keys.I || (e.Alt && e.KeyCode == Keys.I)) && fd.CanExecuteCommand(Helpers.FlyoutCommandIgnore))
{
fd.ExecuteCommand(Helpers.FlyoutCommandIgnore);
}
else if ((e.KeyCode == Keys.N || (e.Alt && e.KeyCode == Keys.N)) && fd.CanExecuteCommand(Helpers.FlyoutCommandNo))
{
fd.ExecuteCommand(Helpers.FlyoutCommandNo);
}
else if ((e.KeyCode == Keys.N || (e.Alt && e.KeyCode == Keys.N)) && fd.CanExecuteCommand(Helpers.FlyoutCommandNone))
{
fd.ExecuteCommand(Helpers.FlyoutCommandNone);
}
else if (e.KeyCode == Keys.Enter && fd.CanExecuteCommand(Helpers.FlyoutCommandOK))
{
fd.ExecuteCommand(Helpers.FlyoutCommandOK);
}
else if ((e.KeyCode == Keys.R || (e.Alt && e.KeyCode == Keys.R)) && fd.CanExecuteCommand(Helpers.FlyoutCommandRetry))
{
fd.ExecuteCommand(Helpers.FlyoutCommandRetry);
}
else if ((e.KeyCode == Keys.Y || (e.Alt && e.KeyCode == Keys.Y)) && fd.CanExecuteCommand(Helpers.FlyoutCommandYes))
{
fd.ExecuteCommand(Helpers.FlyoutCommandYes);
}
}
any suggestion is highly appreciated
thank you
modified 17-Jul-15 4:47am.
|
|
|
|
|
there is switch....catch option is availabel as alternate option of if condition
|
|
|
|
|
Thank you so much, but i guess switch cant handle expressions. Correct if I am wrong.
|
|
|
|
|
There's a heck of a lot of code going on here, and it certainly appears as though you're violating SRP here. Rather than doing things like this, I would look to implement separate classes that do what you need to do - each class would then decide whether it was the one that handled the case. There's even a name for this, as a pattern; it's called the Chain Of Responsibility. So, you would end up with something like this:
public abstract class HandlerBase
{
private IHandler successor;
public void SetSuccessor(IHandler successor)
{
this.successor = handler;
}
public virtual void HandleRequest(KeyEventArgs e)
{
if (CanHandleRequest(e))
{
return;
}
if (successor != null)
{
successor.HandleRequest(e);
}
}
public abstract bool CanHandleRequest(KeyEventArgs e);
public abstract void HandleRequest(FlyoutDialog fd);
}
public class FlyoutAbort : HandlerBase
{
public virtual bool CanHandleRequest(KeyEventArgs e)
{
return (e.KeyCode == Keys.A || (e.Alt && e.KeyCode == Keys.A)) && fd.CanExecuteCommand(Helpers.FlyoutCommandAbort);
}
public abstract void HandleRequest(FlyoutDialog fd)
{
fd.ExecuteCommand(Helpers.FlyoutCommandAbort);
}
}
public class FlyoutCancel : HandlerBase
{
public virtual bool CanHandleRequest(KeyEventArgs e)
{
return e.KeyCode == Keys.Escape && fd.CanExecuteCommand(Helpers.FlyoutCommandCancel;
}
public abstract void HandleRequest(FlyoutDialog fd)
{
fd.ExecuteCommand(Helpers.FlyoutCommandCancel);
}
} Then, in your main class, you simply do this:
private FlyoutAbort flyoutAbort;
private FlyoutCancel flyoutCancel;
private void InitializeChain()
{
flyoutAbort = new FlyoutAbort();
flyoutCancel = new FlyoutCancel();
flyoutAbort.SetSuccessor(flyoutCancel);
} Finally, all you need to do to handle the request (if it can be handled that is), is call:
flyoutAbort.HandleRequest(e);
|
|
|
|
|
Nice one, let see what I can do. Thank you so much.
|
|
|
|
|
Its all works now. Thank you so much.
|
|
|
|
|
Off topic with regards to your question but is your key testing code correct?
I assume the intention of the following code is to allow A or Alt-A
if ((e.KeyCode == Keys.A || (e.Alt && e.KeyCode == Keys.A))
The first condition does not test for modifier keys so would be true for A with any combination of modifiers keys (including none). Due to shortcut evaluation the second condition will be evaluated only if the first is false, that is if the Key is NOT A and I'm sure you can see the problem with that. Even if it was evaluated the condition does not exclude additional modifiers so Ctrl-Alt-A would be allowed.
The solution is to test the key and the modifiers separately. Specifically the modifiers test should be for none or just Alt.
if ((e.KeyCode == Keys.A) && (e.Modifiers == Keys.None || e.Modifiers == Keys.Alt))
Hope that helps, Alan.
|
|
|
|
|
Oh I didn't realize that. Thank you so much
|
|
|
|
|
I have this:
List<long> checkedIds = Sensors.Where(x => x.IsChecked).Select(x => x.ID).ToList();
var filterArgs = new
{
Ids = checkedIds,
DateRangeStart = FilterRangeStart,
DateRangeEnd = FilterRangeEnd
};
myWorker.RunWorkerAsync(filterArgs);
How do I get the values in the myWorker_DoWork?
private void myWorker_DoWork(object sender, DoWorkEventArgs e)
{
}
If it's not broken, fix it until it is
|
|
|
|
|
I really hate using anonymous types because they just make your code harder to debug and understand. I strongly suggest replacing the anonymous type with an actual class. I see no reason why you need to use a anonymous type here.
Anonymous types are good for use inside the method where it's defined, not really for passing around to other methods.
The reason being is that you have to define your anonymous type all over again just so you can cast the value back to that type. That's doubling your work and introducing another opportunity to introduce bugs into your code. This is especially true in this case because if you change the type definition, you have to do it in multiple places. YUK!
|
|
|
|
|
You're right
If it's not broken, fix it until it is
|
|
|
|
|
Whilst I agree you should really use a concrete class for anything that leaves the context in which it was created, to answer the question you could use this
private void myWorker_DoWork(object sender, DoWorkEventArgs e)
{
dynamic arg = (dynamic) e.Argument;
Console.WriteLine(arg.DateRangeStart);
}
|
|
|
|
|
hi i want to have text(textbox8) show on form 1 (frmLogin)
shown on form2(files) textbox (textbox1)
my code: textbox1.Text = textbox8.text ,,, error,,,,name(textbox8) login form does not exist in current context
|
|
|
|