Click here to Skip to main content
12,697,545 members (26,805 online)

Comments by johannesnestler (Top 200 by date)

   
remove the binding Redirect from your app.config and set the autogeneratebindings-flag in Project file to false (like described on MSDN)
johannesnestler 3 days ago View
   
so when you say you want to print "listview items" (you didn't say the data, a Report or something else), and you found the handy .NET function which can print every visualtree in WPF, and you say you don't want this approach, so what is it what you want? Maybe just tell us what's your problem with that and what errors you experienced... Anyway why not create a document, out of your data represented by the ListView-Items, likeyou "want" and print this?
johannesnestler 21-Nov-16 8:47am View
   
you are welcome - everthing clear now and working? (I changed your code out of my head in Notepad...), Feel free to ask futher questions...
johannesnestler 18-Nov-16 6:32am View
   
oh no man - please see my solution...
johannesnestler 17-Nov-16 6:00am View
   
I'd quetion your requirement too - a forced long running app on a phone is not a good idea. Maybe you can give us some hints what you want to achieve, so maybe a better solution can be found?
johannesnestler 17-Nov-16 5:56am View
   
exactly what I spotted
johannesnestler 14-Nov-16 8:25am View
   
sorry for german link - you may better use this one: https://en.wikipedia.org/wiki/Windows_CE
johannesnestler 14-Nov-16 8:24am View
   
you are joking, right? If not, you may want to have a look at https://de.wikipedia.org/wiki/Microsoft_Windows_CE, newest Version of CE would be compact 7 but most companies did the transions to the newer "embedded versions"...
johannesnestler 14-Nov-16 7:51am View
   
You may be right, but you don't know what he need's to do, having a lot of background with CE specific applications and "Software companies" creating them, I'd say someone "lost" the code (maybe the Company died). :D
johannesnestler 5-Nov-16 12:38pm View
   
great answer :D
johannesnestler 3-Nov-16 10:31am View
   
you mean your homework is fun? So just for fun, try to do it yourself - then come back here to the Question&Answer forum and post what you have written (you didn't ask a question now, so no problem if you ask none then) - maybe then it will be fun for us readers here too! :P
johannesnestler 3-Nov-16 7:56am View
   
I don't get what you are trying to tell... we compare times only here - what you mean with "date part". You asked how to check time-overlaps...
johannesnestler 2-Nov-16 10:04am View
   
try MVVM pattern...
johannesnestler 2-Nov-16 10:02am View
   
get the return value from Save call and see if you get the expected '1' (that you list has now one element was done by add call, has nothing todo with save - so check this first.) After that I'd say what Richard meant sounds reasonalbe (you overwrite it somehow - so check your surrounding Code)
johannesnestler 26-Oct-16 6:13am View
   
oh you poor... bad naming is first indicator of bad programming, I'd question the sense of UI-Automation testing on such applications (e.g setting up parameters and getting results should be testable without the UI - e.g. in a MVVM pattern with UnitTests for the ViewModels...). Just my 2c - sorry that I can offer no help...
johannesnestler 26-Oct-16 6:07am View
   
you don't mix up delegates with the .Net event-mechansim (which uses them), do you?
johannesnestler 24-Oct-16 10:41am View
   
would be nice if you vote for solution, or tell us you have solved it...
johannesnestler 24-Oct-16 10:37am View
   
I don't want to read your whole code - better try debug yourself - but a quick look suggests you do no double lock checking - so while aquiring the lock other code may run, no? Anyway, I can't see the point of your whole implementation, what you do here is to sync with the Dispatcher - why bother to derive from ObservableCollection in the first place? just sync the calls with the Dispatcher (you do that anyway in the end if I saw it correctly) - just my 2 c - as I said didn't read your whole code, so maybe I'm wrong...
johannesnestler 24-Oct-16 10:21am View
   
So you want to implement your own Explorer-window? try some googling to get an idea what's involved e.g. https://gargmanoj.wordpress.com/2009/03/27/wpf-101-a-simple-windows-explorer-like-directory-browser/ or http://www.codeproject.com/Articles/21248/A-Simple-WPF-Explorer-Tree - But I'd recommend to rethink your requirement - I'd create a specifc datatemplate for your list-items (Pictures?), read file Information (e.g. from drop source)and present this to the user, you will also need a thumbnail creation-tool/API/code and perfomance maybe an issue - all in all: sounds not like fun...
johannesnestler 24-Oct-16 10:13am View
   
Have you ever considered to use EnityFramework (which has this comparison: automatic and built-in)
johannesnestler 24-Oct-16 9:10am View
   
I have no clue what you are talking about??? "I want a class" .... we don't want define a class of fixed Parameters??? Please try to formulate your problem without assuming we can read your mind - and try to use common technical terms - i never heard of a "class of fixed Parameters"... Start with answering "what's your Problem"? Create a class? a form? a database?
johannesnestler 20-Oct-16 6:50am View
   
so your Problem is not to create a database-driven application to montior employee status, but to read the data from the electronics?
johannesnestler 20-Oct-16 6:46am View
   
pattern is can be the same for winforms - just a little more work to implement... I like to use it, because undo-/redo can be centralized quite easy. but have a look what CPallini recommendet...
johannesnestler 20-Oct-16 6:08am View
   
does your Code work now? why change it? - just don't re-parse the selected value all the time during the loop (do it once outside)
johannesnestler 20-Oct-16 5:16am View
   
Task timeout? i'd say what times out is your underlaying Connection from whatever dc is (have a look at your API)
johannesnestler 20-Oct-16 4:58am View
   
just a comment: I'd strongly recomend you overthink your naming-conventions - maybe to something more .NET-ish? I get eye-cancer when I read your code ;)
johannesnestler 20-Oct-16 4:54am View
   
So this one sentence is now your Problem description. What I'd do:
1. Read formu/QA rules
2. Describe the problem from programmer to programmer - easiest with code, no?
3. Try to find out what's going on with your scrolling, by finding help from nice people like me, who find it nice to help others ;)

Don't:
* Bump your "question"+
* Ignore the QA rules
* Post your "question" as solution
* Assume other can see your screen or read your mind
* Waste your and our time...
johannesnestler 19-Oct-16 10:16am View
   
Deleted
the markup won't show nice here - so here is the whole window file I created for you again:
<window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApplication2" xmlns:system="clr-namespace:System;assembly=mscorlib" x:class="WpfApplication2.MainWindow" mc:ignorable="d" title="MainWindow" height="350" width="525">

<window.resources>
<!--Because we need to convert the visibility enum value to a boolean (the IsSelected property of the TreeViewItem) we need a converter - let's use the default one, we create a window-level resource out of it-->
<booleantovisibilityconverter x:key="BooleanToVisibilityConverter">


<grid>

<treeview>
<!--Define an ItemTemplate like you wish for you tree nodes (could use different ones, for different kind of nodes by setting a DataType for the DataTemplate)-->
<treeview.itemtemplate>
<datatemplate>

<!--As example we use a combination of a TextBlock and a Button stacked horizontally (add margins and so on to get a nicer look)-->
<stackpanel orientation="Horizontal">
<textblock text="{Binding}">
<!--here is the trick: Every added item (in this example just strings) will be wrapped in a TreeViewItem by the Treeview, so we bind the visibility of the button
to the IsSelected property of its "upper" TreeView, the use the converter we defined earlier to convert the boolean value to a meaningful Visibility enum value -->






<treeviewitem>

<!--Just some sample items (in real you will most likely use ItemsSource property to bind data-->
<system:string>bla
<system:string>bla
<system:string>bla
<system:string>bla
<system:string>bla
johannesnestler 19-Oct-16 9:14am View
   
If this was me I wouldn't assume everything is OK - you clearly missing some basics - back to the books (or MSDN)!
Do you know now what was the real problem (hint: it was not relase configuration - you can edit this configuration like you want - it was the flag "optimize Code" wich happens to be set on the default release configuration in VS (look at the your project settings/build tab)
johannesnestler 19-Oct-16 8:52am View
   
So with XML we mean a well formed XML document - lot's of code availabe to deal with this - you don't have XML here so you have to write your own parser - why did you think it was a good idea to treat this as XML in the first place (because it looks like XML from far away?
johannesnestler 19-Oct-16 8:25am View
   
interesting question, but why ask it here? - what you do during programming work if you don't know: Try it! or read MSDN: https://msdn.microsoft.com/en-us/library/dd264739.aspx (have a look at 'overload resolution' at the bottom of the page)
johannesnestler 19-Oct-16 8:15am View
   
you think this is a good question to find help? I assume with "unstable" you mean a problem - so what's the problem?
johannesnestler 17-Oct-16 9:12am View
   
Reason for my vote of 1 \n You may tried, but I see no argument you came up with that "restore goto's reputation" in high-level control flow - other commenters said it... I just want to add that your "in the field/production... and quick solution..." argument is the beginning of evil for most codebases- your code will "die" quickly if first thing you through out under pressure is best practices... So just leave goto where it belongs to: low-level code (as jump instruction) for everything high-level use more "controlled" jumps (you listed them) - period. Btw. I have coding rules in place that wouldn't allow a goto in a codefile for my developers (never had to discuss it, in all years no one needed it or wanted to break the rule). Maybe one reason I'd accept: If you have to port some (very) old c-style code/algorithm to C# (maybe unsafe compiled) which uses goto, you can use goto in C# too - I think this is the only reason they included the keyword in the language - compatibillity with old C/C code..
johannesnestler 12-Oct-16 7:42am View
   
Reason for my vote of 5 \n upvoted after concerns have been discussed, and the solution can be seen in the bigger picture by readers
johannesnestler 10-Oct-16 13:52pm View
   
Reason for my vote of 3 \n interesting idea and code, though I have some doubts about the original problem... because I think the abstraction between view and model - the ViewModel is the essential part of MVVM, so I have some problems with your argument about "your design"
johannesnestler 6-Oct-16 8:02am View
   
that sounds a little odd - Administrator has less rights to do the work than a normal user? Can you name any application where you have seen a behavior like that? If I come up which such 'WTF requirements' I always step back and question what I'm doing... just my 2c...
johannesnestler 4-Oct-16 9:46am View
   
5ed - But, I would always suggest marshal to UI thread from timer not the other way round. That OP wanted a timer in a Background thread is a STRONG HINT he wanted to use something like System.Timers.Timer but didn't know about it...
johannesnestler 19-Sep-16 7:54am View
   
so you do not have a proper deployment system (installer or anything similar) in place, but think about pinning a link to your app at the start-menu... You see what's wrong with your approach?
johannesnestler 15-Sep-16 10:17am View
   
but why don't you let the database generate the key?
johannesnestler 15-Sep-16 10:13am View
   
post your real code - then we see further -this doesn't compile. With that kind of accuracy at work you do better something else then programming...
johannesnestler 14-Sep-16 14:02pm View
   
A question is a sentence with a questionmark at the end... Come on, after all the comments here - sit down and spend 15 minutes to give context and formulate a seriouse question if you want help. Otherwise read the documentation of this asterisk manager thing (whatever this is, from your Code I assume some socket-based command API?), normaly these things come with a manual...
johannesnestler 14-Sep-16 9:37am View
   
let the database generate your key! - so this problem will resolve itself, or remove the key Attribute (or convention) from your model-Code (not recommend that) and handle the keys on your own - but again: DONT!
johannesnestler 13-Sep-16 14:07pm View
   
your are absolutly right about tutorials... ;)
But good that you could solve your problem. I work with wix created installers for some time now, many things needed some fiddling and reading of the examples again and again - but most times only once - if you get how to do it, it seems easy later (How to start services, multilanguage-support, work with registry and custom dialogs, bootstrappers, ...) For me the main reason to use it (other than it's free) is source-control support (because of the simple textfiles) vs. Binary installers where you just see it's changed (on source control)...
johannesnestler 8-Sep-16 8:27am View
   
@ idea with process-id: this ID is unique for every process - so 10 instances of Notepad = 10 different process id's..
johannesnestler 8-Sep-16 8:25am View
   
I don't get what you do with the timer here? start-stop inside a Loop? Can you please explain us what you want to do - because for me your (timer-) code makes no sense... you mentioned (other comments) that your problem is with this timer, but then you say that dublicate Windows are open (another problem, you didn't write correct code for this, other solutions already showed you)...
johannesnestler 7-Sep-16 10:38am View
   
amen
johannesnestler 7-Sep-16 10:35am View
   
When I read your question (or statement, you didn't ask any question - that is a sentence with a questionmark at the end ;-) I thought "Wow, sounds interesting, how is he possibly doing this?" - now I find out you don't have a solution for the basic feature of your app. Sorry, but If I find out how to do that, I will make my own app...
johannesnestler 7-Sep-16 10:31am View
   
Decision for a specific installer technology is difficult to make. It's even more difficult to give specific advice how to handle your Problem because of the different existing solutions for each installer-tech. So maybe tell us about which installer-tech you want to use (or which are on your "list") - so you can ask the experts for the specific tech for a solution. E.g. I use wix ( https://www.firegiant.com/wix/tutorial/ ) - I would probalbly solve this with a custom action and custom dialog form...
johannesnestler 7-Sep-16 10:25am View
   
which program? what is your question again? Even if you ignore the Forum rules, it's you who want help - so I expect you to put at least some effort in formulating your question - even this comment is longer...
johannesnestler 30-Aug-16 13:47pm View
   
funny idea and sounds doable. I think about a VPN Connection, don't know if this could work though... Like karsten I had used DynDNS to make a "fixed" IP from outside my network in the past...
johannesnestler 2-Aug-16 9:34am View
   
Hi Bill!
You are right - it's just a small part of securing your app - but I think it's not the right place to go into this topics here to deep (could say a lot about it...). Anyway Step 1 is "don't make the next card predictable" - think about a real life game - looking to your opponents cards is one kind of cheating, but knowing which card will be drawn next is another level of cheating - don't you agree?
Anyway, I never saw a reason for "shuffling" in the card games I implemented - that was the point I was trying to make. But maybe OP is just doing some homework - if so, your solution is a good fit.
Kind regards Johannes
johannesnestler 29-Jul-16 4:15am View
   
you didn't mention any programming in your question... but I'd start with FileSystemWatcher https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=vs.110).aspx
johannesnestler 26-Jul-16 9:54am View
   
examples are for simplicity - I use EntityFramework and OData with a separate DAL - I hope you don't expect Enterprise-Level code in examples and tutorials...
So if you application is "big enough" go for your usual layering I'd say!
johannesnestler 26-Jul-16 9:50am View
   
can you please explain you scenario in more Detail? What you mean with dynamically generated? But if you just mean to create a "working project-file" without VS - it's a plain XML-file - Make a project in VS and have a look at the project-file in a text- or XML-Editor and have a look at the schema docu: https://msdn.microsoft.com/en-US/library/5dy88c2e.aspx
johannesnestler 26-Jul-16 9:45am View
   
What you mean with "not visible"? What you mean with config... "missing"?
So you verified your code compiles and runs (without any WCF context)?
I'd go back a step and rule out all common/possible error sources. Start a simple Hosting, start by calling the Service with WcfTestClient or similar test-app to see if ABC is correct and Service is callable (no networkproblems whatever).
If I have to guess - I'd say serialization Problem (check all your datacontracts-what did you Change?)...
johannesnestler 8-Jul-16 5:12am View
   
ahhhh.... so what's the Problem again? Can ýou please (plz, plz) try to formulate your question/Problem a little better?
johannesnestler 30-Jun-16 9:51am View
   
so what's the problem then - to model a spehere?
johannesnestler 27-Jun-16 10:24am View
   
I tested the exact Code from the blog example OP linked - it didn't work, even with the PInvoke calls instead of System.IO...
johannesnestler 23-Jun-16 9:02am View
   
same as other - don't understand what you want - could do some guesswork of course... anyway..
Sometimes if I have a complicated problem, I try to explain it to someone completly unrelated to tech or the problem domain (like my wife), which forces my to put everthing in easy conceptual terms and a logical order. Then it often happens that I suddenly "see" a possible solution just through "formulating" the problem in another way as I think normally (in tech-terms or Code). Maybe try the same here: Sit down, and take us (here on CP) trough your problem/requirement and your thought process, show what you tried.. So we can come up with some solution together - and the common reader here will give a lot better Feedback/ideas then my wife ;) (sorry darling)
johannesnestler 22-Jun-16 9:32am View
   
open your C# book again (or open an old C++ one where this operator is also used)? No offending, but I just think for basic language syntax questions like this one, it's better to open a book or tutorial or the great MSDN reference where it all is explained in deepth with examples... Shure there are some more esorteric language features where it could make sense to ask the community for advice, but in this case I think you will learn a lot more by the official language reference on MSDN (maybe also read about the other Operators you may never have seen?) - just my 2c
johannesnestler 2-Jun-16 10:34am View
   
What a question... sry man, but better do some tutorial and read a book about C# and/or OOP - People give good answers here but your are just wasting your and their time. But maybe you don't want to learn, just have to know for a Course or whatever - I can understand that. So my short answer is - never use a public field - always use a public property, Keep all fields private to the class. My current project's codebase is not so big, just a few 100k lines of code, but you will never see any pulbic field even if it would have 100M lines of code ;)
johannesnestler 2-May-16 10:38am View
   
Reason for my vote of 5 \n I'm the typed langauge type of programmer, so I like rants against untyped languages type-mess ;)
johannesnestler 14-Apr-16 8:20am View
   
cool - would be interested - don't overcomplicate things if not needed - depends how often do you expect such changes that an automatic solution is satisfied
johannesnestler 14-Apr-16 8:18am View
   
just to mention: your idea now would just solve the Attribute Problem, what you do if new columns are added to the database and core-classes? You have to manually Change your model code anyway - a Generator should generate the whole class - all properties, attributes, Interface implementations, ... better invest some time in that, than in your "fragile" reflection code - reflecting on not referenced types - won't go into that anymore....
johannesnestler 14-Apr-16 8:13am View
   
not as far as I know (I'm quite experienced .NET developer) - only TypeDescriptor can be used - but then you have to use also TypeDescriptor to obtain the attributes later (normal reflection wont see them, automatic "Tools" using TypeDescriptor would "see" them - e.g. PropertyGrid control). What can be done is emitting IL code and attributes to that - but then you Limit yourself to IL-only for this part. (Would be much more effort +complicated code)
johannesnestler 14-Apr-16 8:09am View
   
about reference - do whatever you think is clever - I don't agree because: You HAVE A DEPENDENCY and there is a good reason to express this by giving a reference to the WebApp IF you relay on it anyway.... Desing principle not to add a reference you need sounds a little (...) - also the Project name "Core" would lead me to the opposite "prinicple" - always add a reference to it ;)
johannesnestler 14-Apr-16 8:05am View
   
So I would just generate the model classes from the information in the core classes. Have a look at an OR-Mapper like EntityFramework, how they do it (with T4 templates). As I said it would be easiest to use a Generator for the whole class if deterministic enough (should be true for simple model-classes)...
johannesnestler 14-Apr-16 7:36am View
   
if you question yourself why you don't get answers to your question - I can answer that! - learn to ask questions first!
read http://www.codeproject.com/KB/FAQs/QuickAnswersFAQ.aspx
johannesnestler 22-Mar-16 11:09am View
   
just a thought: I build a new multiuser system at the moment, and went for a lock-free "optimistic concurrency" approach, very good scaling and perfomance so far. no need for "lock-Messages" and all those nasty problems you get if you use a "locking strategy" (deadlocks?). just my 2c...
johannesnestler 22-Mar-16 10:42am View
   
Oh man - this kind of question will not bring you any further...there are no shortcuts to get an understanding of any programming "topic" - work through(!) any decent EF Asp.net-With-Data tutorial (web is full of them, but please goolge yourself). So if you can't work out "the essence" from these tutorials you should maybe use the plain MSDN documentation to work through it. But maybe you can eleborate what you mean with "builtin", cause you are using a FRAMEWORK wich has some functionality builtin - or what did you expect?
I don't know what you know, or where you got stuck -but things should be quite simple... Create an context, add/remove/attach/update the objects in the context, call Save and that's it...
johannesnestler 22-Mar-16 10:33am View
   
maybe you could use Xaml Animations (if you create a UWP,WPF or Silverlight, Phone-XAML, ... - App) and Forget about the maths... - you may want to have a look at at the UWP Example library where you can find animations, transitions build into the samples. Slide effects are very easy to create (just Change the Location, margin, or withd properties over time with animations). But even if you don't do an UWP (but other XAML-app), you can find some good ideas there. Oh - now I see you taged C++ - so what I've written will not be useful for you. But when I think about doing such things in C++ I get flashbacks from my old C++ days - brrrr. So hopefully you are using somekind of "Framework" - DirextX or so?
johannesnestler 17-Mar-16 11:26am View
   
sesssssssssssssion?
johannesnestler 17-Mar-16 11:21am View
   
hmm - so you constructed your XML "by Hand" - a little complicated, but why not.. what stops you to do the same, but write to a csv format (or more complicated an xls)? With "more readable" - you mean "better representation" in Excel? - or about what "reader" are you talking?
johannesnestler 17-Mar-16 11:13am View
   
better read any tutorial on this with a step by step instruction, such answeres are hard to give because we don't know what you know. There are so many tutorials for basic CRUD with EF out there, find one for your version of EF (what's wrong with the article you linked? I found this link there (but didn't look at the code): http://www.codeproject.com/KB/database/EFWinForms/EF6Winforms.zip
johannesnestler 17-Mar-16 11:09am View
   
which query-provider are you using? linqtosql, entityframework?
johannesnestler 17-Mar-16 10:30am View
   
that sounds like absolute nonsense - better explain us what you want to achieve - so we can try to help you with your real problem (the problem that lead you to an "idea" like this). In your example it looks like you want to construct a list of lists of all "possible" (????) strings, so not only "ALL" but many lists with "all possible" strings????
johannesnestler 17-Mar-16 10:25am View
   
I don't see any bolded code.. - but after a quick look I'd guess you can not scroll because your stack-panel will give the listview whatever size it wants, to get the scrolling it needs to be "limited", so just set a maxsize on the ListView, or use a grid with fixed rows/colums instead of the stackpanel, etc...
johannesnestler 17-Mar-16 10:19am View
   
what Folder? you mean you can not open your workbook? Sure, how should Excel know about your uri-pack syntax? give it a proper FILE-PATH and it will work...
johannesnestler 14-Mar-16 11:07am View
   
you are technically IMPLEMENTING interfaces in C# and not INHERITING them, so just forget about your "inner C++ Alarm bells", this problem doesn't apply to C#, cause no real multiple inheritance is possible. - sure, in an example like Kornfeld Eliyahu Peter showed you may get the impression you are "inheriting" because of the syntax used to express that a specific class fullfills an interface. If the interfaces would have conflicting methods/member names you can use explicit Interface implementation to avoid that conflicts...
johannesnestler 3-Mar-16 7:34am View
   
I think you have to learn the basics about the inner workings of .NET first, before you can seriously think about "memory" optimization tricks. The good thing in .NET - you normally don't have to. Don't get me wrong, I assume you come from another prgramming domain where such things are/were important (C++?), and therefore you ask this. If you really want to "know" I would suggest you try to experiment with different code and then look at the intermediate language output. e.g properties will generate methods (set/get) and use vtable memory and so on.. - so my point is: If want to "know" about your (custom) .NET memory Management - you have to dive into a lot of (mostly academic) concepts - and .NET was build to free your mind from these... So if you really need to "know" then better do your Project in another language, or write unsafe (-compiled) .NET-code where you control memory for your self. That's the reason I don't see any value in your question - and to find the "correct" style in an "offer" of different grades of syntactic sugar, has nothing to do with memory or perfomance... (you understand that "Properties" are just syntactic sugar in the first place to avoid writing and calling all These get and set functions we used to do in C++)... So code like this:
using System;

namespace PropertyMemoryTest
{
class Program
{
static void Main(string[] args)
{
var withproperty = new WithProperty();
Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(withproperty));
var variable = new WithVariable();
Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(variable));
Console.ReadKey(true);
}
}

struct WithProperty
{
public int Property { get; set; }
}

struct WithVariable
{
public int Variable;
}
}
Won't tell you which is "better" from (total)memory consumption/perfomance , but I think you will agree that the version with property has much more complex IL code. So get over "Micro-optimization" thinking, and think about other thins like maintenance or extensibillity - you will always go for the property vs. "the variable", even if that means double memory consumption (calculate modern RAM cost to the cost an work hour)... jus my 2 c - happy coding!
johannesnestler 2-Mar-16 4:10am View
   
I can not think of any mechanism to do that...
johannesnestler 11-Feb-16 9:23am View
   
Wich UI Technology are you using - for me it sounds as WPF would be a perfect fit. Can Play Video, animate "controls" - have you tried?
johannesnestler 14-Jan-16 10:19am View
   
Before this question can be answered, just tell us what QueryProvider you want to use. (e.g. OR-Mappers are queryproviders for LINQ). You mentioned DataContext - so I'd assume you mean EntityFramework - but .NET 3.5? Wich version of EF are you using? My opinion? EF + LINQ is great, I don't miss such queries in my code, no SQL anymore...
johannesnestler 13-Jan-16 12:24pm View
   
great you solved it!
johannesnestler 13-Jan-16 10:58am View
   
I think you mix up styles with templates here. It's easy to extend and overwrite styles, because there is a basedon attribute you can use (and also override "Default styles", these are styles with no name, but just the type given - so it will apply to all elements (Downstream) of that type without explicitly assigning it. Templates have to be recreated and can't be based on each other.... Confusion may come from the fact, that normally new templates are set through styles...
johannesnestler 15-Dec-15 10:56am View
   
no answer but chances are high you do something wrong: somethings come to my mind you can look for:
* Did you use strong (normal) references where you should have used WeakReference?
* Do you subscribe to handle events of long living objects (the Provider will hold a reference to every subscriber) wich then can't be GCed (may be solved by unsubscribing if handler is not needed any more)
* Do you load other resources on each Navigation which are then refernced by other parts of the System (maybe a static "global" property or something)
* Do you use any unmanaged "things" which may leak memory?
johannesnestler 15-Dec-15 10:43am View
   
Hi I want to read some good questions here!, plz ffwd me a qstn
(avoid abbrevations?)
johannesnestler 9-Dec-15 8:38am View
   
Yes, I think this would be much more efficent and clean...
johannesnestler 3-Dec-15 9:46am View
   
I'll suggest an approach: Sit down, write a clear specification (in words) what you want to do. Analyse what you have now, and what you expect as the final result. Find a good example with values. Then update your question with the clear problem description and the example.
johannesnestler 1-Dec-15 6:58am View
   
;) - Ok...
johannesnestler 30-Nov-15 10:28am View
   
but there are embedded databases, SQLlite, SQLCompact, Firebird... a Little tip for Textfiles maybe: you can serialize a dataset to XML in an automatic way - no need to write or parse the XML manually - have a look into https://msdn.microsoft.com/en-us/library/system.data.dataset.writexml(v=vs.110).aspx - so the rest of your code could stay more or less the same (you didn't separate your data-access code from UI, as far as I can see - so better follow CHill60 recommendation for your next project)
johannesnestler 30-Nov-15 10:19am View
   
Good links, but your "obvious problem" analysis seems a bit faulted. First OP states that he get's "unable to install" error. - so no, his parameter-Syntax isn't wrong, I'd say...
this is not compilable: procStartInfo.Arguments = installutil /i /c "C:\\Users\\kk\\Desktop\\Winservice\\sampleService.exe"
You may meant something like this? procStartInfo.Arguments = "installutil /i /c \"C:\\Users\\kk\\Desktop\\Winservice\\sampleService.exe\"" - a quoted path inside the Argument string - but in OP's case not needed because he has no spaces in his path - sure good code looks not like this - but that's not OP's problem at hand.
johannesnestler 30-Nov-15 10:01am View
   
what is the code you Show here - is it the ControlTemplate for your CustomControl (not UserControl!) or what? -> then use template bindings to set the relevant size properties to the sizes of some inner elements - e.g your grid.... But as Sergey said - you will be lost if you don't know the basics about styling and ControlTemplates... sorry for that - but your use of the term ResourceDictionary is a hint you are a WPF beginner. In WPF "everything" can be a resource and many resources can be collected in a ResourceDictionary. Your prolbem is related to styling or a control template - I can't tell because you didn't show the relvant code - the drawing of ellipses itself isn't your problem...
johannesnestler 30-Nov-15 7:32am View
   
what's the Problem you have writing this code?
johannesnestler 20-Nov-15 7:54am View
   
Go for WPF - but learn the concepts first - WPF "thinking" is quite different from WindowsForms "thinking", also have a look at the MVVM pattern - best used with WPF...
johannesnestler 19-Nov-15 8:11am View
   
wich Folder Icons do you mean - the one you see in Explorer? or some Icon files you are zipping? Missing Folder Icons should have nothing to do with your code, but your System configuration, I'd say...
johannesnestler 29-Oct-15 10:33am View
   
which finally? please show all relevant code, and just tell us where you want't to jump (out) on which condition. Break brings you out of the inner most Loop (which you should know or be able to read on MSDN). Otherwise use setting a flag variable (some boolean), and check inside the Loop if your flag variable signals to "jump out", or on any other (outer) loop level.
johannesnestler 21-Oct-15 7:02am View
   
seems to be a Problem inside your flowdocument, so why do you Show the code to open a file?
johannesnestler 29-Sep-15 9:22am View
   
so you run on Windows CE? - if yes 16 bit Colors and no real transparence is availabel (only masking). From my experience - use the correct (what the target system supports) image-format during design, save Memory, enhance perormance and see what you get. My tip from years of experience with CE 4- 6.5 and .net CF development - try to create a UI design without gradients and transparency in the first place - and if you realy have to "simulate" it - at least use the correct Color depth - 16 bit images do also not have an Alpha channel of course. But maybe add some context (target System, your code, ...) to the question. My commenent after vague guessing what you are trying to do is even longer than your question... And if you are nto able to ask a "good" question, you won't get "good" answers.
johannesnestler 21-Sep-15 8:25am View
   
wich conversion? wich Kind of setup (msi, InstallShield, wix...), what Debug folder. How about giving us some context, so we can try to help?
johannesnestler 10-Sep-15 5:23am View
   
any questions or problems while implementing?
johannesnestler 2-Sep-15 9:28am View
   
I don''t understand... but why not just ask your "Team mate"?
johannesnestler 11-Aug-15 11:02am View
   
just had a quick look at your code, I think you just have to re-create the channel if it's in faulted state.
johannesnestler 7-Aug-15 7:14am View
   
you said the solution from the link didn't work for you - so you are SURE you don't have authentication problem, correct? - really? ;-)
johannesnestler 30-Jul-15 8:49am View
   
just create a snippet...
johannesnestler 29-Jul-15 10:51am View
   
What data-access tech are you using, please use Tags and improve your question.
johannesnestler 29-Jul-15 10:31am View
   
Server and Client could mean everything. From your question I'd guess you talk about Wcf-Services? But better not guessing, please update your question and Tag it with the technologies you want to use - Client and Server are Terms that could mean a thousends things in IT industry and programming.
johannesnestler 15-Jul-15 3:55am View
   
I think Mika got your one-line question, no need to repeat it. So read his anwer again? Create a Wcf-Service to read your "data" - could mean talking to database - you didn't mention. Create a "Client" and connect it to your Wcf-Service. You don't know how? -> read the tutorial. If you want a "better" answer, sit down and write a better question (maybe invest 10 min effort...)
johannesnestler 9-Jul-15 8:15am View
   
yes, I thought the same, why not define it as uniqueidentifier in the first place, after reading the question again I saw MySql-Database....
johannesnestler 9-Jul-15 8:07am View
   
convert the GUI to an image? Do you mean to take a "screenshot"? of your GUI?
johannesnestler 9-Jul-15 8:04am View
   
I don't understand your problem. Why do you have to think about network adapters? It's WCF - Configure your endpoints - done... You said that with either Connection (LAN or 3G) you can get data from your Service - that's what I would expect too. I could understand that there is a "Problem" if you dont't get data in one case. But your service communication works in both cases?
johannesnestler 7-Jul-15 6:46am View
   
You don't have a window in a window here. You have just a grid with a visual tree (it happens to be the content of your window). What mean's close for your grid, just hide or replace the Content with null or something else.. Or use PopUp or ChildWindows...
Difficult to go with Windows-Forms "thinking" into a WPF Project. Tip: Have a look at MVVM pattern and how to avoid code-behind...
johannesnestler 17-Jun-15 11:05am View
   
maybe learn to ask specific questions? If you are a "beginner" those concepts are not so "important" in a managed langauge where you don't have to think about memory management for trivial tasks. It's for shure good to have an understanding of those concepts, but asking a question about this Topics like "this", indicates you should take Sergeys advice serious, get a book, do some exercise...
johannesnestler 8-Jun-15 10:41am View
   
OP is talking about a Windows-Service not a Web-Service...
johannesnestler 3-Jun-15 10:24am View
   
what "Designer Items"? Please give us some context, formulte what problem you have and ask more specific questions. Maybe show some code...
johannesnestler 3-Jun-15 7:13am View
   
So what's the problem? Any Basic tutorial will show you how to do that...
johannesnestler 1-Jun-15 9:47am View
   
do you use a library to read and write(!) "Excel" files on CE? What you mean with "Excel"- files? xls? When I was programming for Windows CE 5/6 it wasn't possible to do any office-automation on CE Clients without expensive 3rd party components... just curiouse how you handle that?
To your Problem: "file not found" is quite obviouse - what other "methods" would you expect (- we don't even know your current "method") to work. If you can't find your file, nothing will help... So what do you mean "debugged and still the same"? Debug means - go through your code step by step and have a look if everything meets your expectations. Is the path correct (you know how the paths work on WinCE, do you?), is the file there, and so on...
johannesnestler 28-May-15 8:29am View
   
So it seems I was correct on my assumption that your virtualization isn't working at all. So your implementation must have a bug. But I know nothing about your code - did you have a look at the code arround your Caching - did you find some "smell"?
johannesnestler 26-May-15 9:37am View
   
I'm glad you solved it, sometimes another pair of eyes helps ;-)
johannesnestler 26-May-15 9:35am View
   
so your data-virtalization isn't working at all? Seems to me like 37000 rows fit into memory and after that you are out of memory. So your virtualization technique should hold a lot less items in memory at any given time - I'd say you have a bug and your vitualization is either wrong or not working. So how many items do you "think" you Cache? Is your code to release/recycle the cached items correct... Hard to give an advise but these are the areas I would look first.
johannesnestler 26-May-15 9:30am View
   
Sorry I have better things to do than write code like

Viewport3D viewport = new Viewport3D();
viewport.Camera = new PerspectiveCamera(); ...

..this is what I thought when you asked for "C# code", please try for yourself should be easy. All type and property names are the same in C# as in XAML...
johannesnestler 26-May-15 8:50am View
   
the code you linked to splits a large Image into many small ones, each containing one part of the Image, so I thought maybe you are just using an Image too small. and all the other pictureboxes are painted with nothing... was just my first thought, sorry for not beeing helpful
johannesnestler 26-May-15 8:45am View
   
so something is wrong with your "data virtualization", it seems you are holding to much item's in Memory. This contradicts your need for virtualization, your implementation seems to have a bug... But which?
Your description of the problem is a little confusing to me: "stops about 37k lines...", how many item's does your virtual cache contain??? 37k?
johannesnestler 26-May-15 8:40am View
   
so how big is your test Image, is it to small?
johannesnestler 21-May-15 7:33am View
   
You have to understand how Linq-Providers (Linq to Entities in your case), and how Expression-trees work... anyway in your case just prepare the converted datetime object outside the Expression and use that (captured) variable inside the Linq-Expression.
johannesnestler 21-May-15 7:29am View
   
"don't want to use serialization!???
What should that mean? Whatever a "Project" is in your application. Represent it as a file (either by some binary Format, or text-based Format (XML...)). Save the file and load it. If you don't use "serialization", just do it the hard way and "parse" or "load" your file yourself and extract the needed data. Conclusion: do yourself a favour - use Standard mechanisms: Either serialize an object-graph to a file or use XML. If security is a concern (only in my application)use encrpytion.
johannesnestler 8-May-15 6:33am View
   
why not click once - easy to configure and works - just wondering?
johannesnestler 30-Apr-15 8:40am View
   
did you solve it?
johannesnestler 30-Apr-15 8:39am View
   
did you solve it?
johannesnestler 28-Apr-15 10:46am View
   
your "installer" should handle this, no? I don't get why you are showing this code - it's not related to your "Problem" of deleting a file during a "uninstall". Maybe give us some hint what kind of installation/uninstallation process you use.
johannesnestler 28-Apr-15 10:41am View
   
I would ask why you want to hold 3500 Images in memory? Better use a different approach. Just construct a list of FileInfos (or just the paths) for all the Images. Then load/unload them on demand while "sliding" (whatever that means in your application) - if the user views the images in a kind of "list" maybe consider "virtualizing" it, so that you only hold the visible Images in memory...
johannesnestler 24-Apr-15 4:33am View
   
this could mean anything.. Define "remind", "those" and "Event"
"remind" could mean send sms or pop-up message on a users Computer on a Network, ...
"those" - users?, groups? Server?
"event" - repeating?, once? which Information to present (in which way?)...
johannesnestler 22-Apr-15 10:43am View
   
I don't understand what's your problem. Can you try to describe your scenario better?
Do you just want to call the Service from your "DAL", or should the "DAL" be a WCF-Service you can call from client side?
If you know how to "reference" your WCF-Service so you can call it, I can't imagine what hinders you to do the same from another roject (your new class-library)?
johannesnestler 22-Apr-15 6:55am View
   
what problem's do you have?
johannesnestler 13-Apr-15 10:38am View
   
this question is way to common. Common answers won't help...
Common answers:
How to... by programming (create concept, formulate your requirements, start programming, seek help for problems you can't solve on your own - docu, Internet, MSDN...)
Playlist concept... could mean anything. A playlist is a list of media to be played ;-)
Integration with window(s) media Player in WPF... ???
You see? So please try to formulate more specific questions...
johannesnestler 13-Apr-15 10:30am View
   
until decimal separator isn't a dot...
johannesnestler 27-Mar-15 7:40am View
   
what is "Windows 7 live cd"? some kind of embedded Windows 7?
johannesnestler 27-Mar-15 5:59am View
   
so what's your problem? reading the text file in? split it? handle window logic? what?
johannesnestler 27-Mar-15 5:57am View
   
First: Decouple your joystic logic from your forms code, put the methods to handle the joystic in a separate class. Modify your forms code to use that class. Use the new class from LabView and Forget about the Form there...
johannesnestler 26-Mar-15 10:44am View
   
what you mean by '"can't access" and "functionality"?
johannesnestler 26-Mar-15 6:47am View
   
sorry didn't see that. See my answer
johannesnestler 25-Mar-15 11:19am View
   
What kind of docking are you talking about? Some special tab-control? Do you mean "window" instead of WPF? - "undock WPF" doesn't make sense....
johannesnestler 25-Mar-15 11:17am View
   
Hi, in a WCF Service Project under "WCF-Options" you find a Checkbox like "Activate XSD as typedefinition language" (don't know the exact wording in english). If enabled you can add a XSD file to your Service Project and you get a generated class corresponding to your xsd. Should be simple...
johannesnestler 25-Mar-15 8:10am View
   
by programming I'd say... but I would better go with WPF, but that depends.. Define "like"...
johannesnestler 25-Mar-15 8:09am View
   
what's the question again? ... how to run?
johannesnestler 19-Mar-15 12:15pm View
   
so at first it worked? after some while the updating process produced the bug? Can you "tell" from what Version it didn't work anymore?
I suspect some IT infrastructure changes or changes in your deployment code/configuration...
johannesnestler 19-Mar-15 9:59am View
   
Reason for my vote of 1 \n MVVM without mentioning Commands?
Article states many wrong things - MAXX mentioned it, your answers to his comments are disturbing....
johannesnestler 18-Mar-15 11:51am View
   
your "before proof" is incorrect. see solution 3 why...
johannesnestler 12-Mar-15 8:11am View
   
Deleted
have you ever added the menuitems to a menu? and what is "this"? a window?
johannesnestler 6-Mar-15 7:13am View
   
I think Griff is very patient and helpfull to you, but If I consider the time it costs you reading and posting question you could have read chapter one on C# programming of any tutorial too. "how to declare variables and variable-scopes..." Sorry but this QA won't help you mutch, if you are not willing to learn. Even assuming that you could go for such a complicated "Task" like programming without any knowledge is "strange" in my opinion. Would you consider doing a heart-surgery with zero knowledge about medicine?
johannesnestler 6-Mar-15 6:55am View
   
I think this question should be deleted...
johannesnestler 18-Feb-15 8:31am View
   
It's clear what you want, but what's the Problem. Sounds simple. Read the XML and build your strings from the nodes...
johannesnestler 16-Feb-15 12:43pm View
   
I suggested to move the blocking calls to another thread too... But maybe I didn't formulate it good enough - thanks for your comment and the provided solution...
johannesnestler 16-Feb-15 10:34am View
   
In the end, yes. Because you will have to sync the results with your GUI but not blocking it...
johannesnestler 16-Feb-15 9:14am View
   
I try to create some example code for you... please wait a little
johannesnestler 16-Feb-15 9:11am View
   
another user of var who confused himself? what type is var in your Expression? solution: an integer. it will never be null, and I think your DeleteDutyPointStatus wants the id an not some count - correct?
johannesnestler 16-Feb-15 8:53am View
   
ah, forgot to mention, you should really spend a day on the Basics (no offense it's just obvious you come from another domain) - read about String.Format on MSDN could help constructing the communication-strings and have more readable code
johannesnestler 16-Feb-15 8:50am View
   
didn't read any further after string input_data = SerialPort.ReadExisting();
you read in a local variable (maybe hiding a class-member?) this is not the same variable you use in while(input_data.EndsWith(string_end) == false. So a clear "beginner mistake". To synchronize your calls you could use Tasks with continuations (Google) or normal Event signaling (maybe create a AnswerReceived Event and fire it when Input_data matches some condition). don't use loops "to wait" - this is not plc programming...
johannesnestler 16-Feb-15 7:16am View
   
Reason for my vote of 1 \n a clear 1, sorry... - see my comment
johannesnestler 12-Feb-15 10:49am View
   
So what's the exact problem?, Writing to a file (XML it seems)? Your code justs updates a Label. So a just a general advice: Represent your XML as an object you can serialize (write/read to a file with one call). Read the XML to obtain the current file Version, update file Version on your button click and write the file again.
johannesnestler 10-Feb-15 6:50am View
   
I see... My normal way is - search all indices to delete, then delete: like this:

// var is IEnumerable<int>
var listofIndices = TakeOffInfoCollection
.Select((x, index) => new { index, element = x }) // project into a new type with the indices
.Where(x => x.element.IsSelected) // filter out just the selected elements
.Select(x => x.index); // project just the indices as result

// Loop just the list of Indices to delete each item
foreach (int index in listofIndices)
TakeOffInfoCollection.RemoveAt(index);
johannesnestler 9-Feb-15 10:41am View
   
In OP's case I suspect he is confused about the type, I think you are on the right track that: TakeOffInfoCollection.Remove(takeoff); maybe won't work....
johannesnestler 9-Feb-15 10:38am View
   
no, not in C# (this is not VB) - there is no runtime type identification involved, just syntactic sugar. the type is always known at compile time...
johannesnestler 9-Feb-15 10:33am View
   
??? runtime type? var is compile time type identification, no?
johannesnestler 9-Feb-15 10:31am View
   
yes not very readable, but changing to the actual type won't change anything here... The compiled result is exactly the same...
johannesnestler 9-Feb-15 10:17am View
   
Hi, I don't understand your question and guessing what your types do is boring. E.g what is C_WebRequest - it looks like the "custom type" you want and not a "Request" (maybe just bad naming). So please clarify what's your exact Problem - because if you can construct one object of a custom type for your Response from the SAP Service, I can not imagine what hinders you to collect them in a list. Maybe sorting your thoughts would help? Break it down in smaller/better steps. 1. Prepare call to web Service. 2. call Service and get reponse. 3. Parse/Transform/Project (whatever is needed) the raw Response to your custom type. 4. If Response contains multiple records - create the list directly from the Response, otherwise collect them after each call...
johannesnestler 3-Feb-15 10:37am View
   
which help? Any questions problems with that? Search engine could mean anything or nothing.
johannesnestler 30-Jan-15 6:37am View
   
use the samples, and instead of var write the exact type Name - finished
johannesnestler 26-Jan-15 7:46am View
   
Ah, you have a missunderstanding here, you can always throw an exception yourself (and catch it), your problem is only related to threads and exceptions - this behaviour is the same for Java and .NET (exceptions are local to the throwing thread)
johannesnestler 26-Jan-15 7:44am View
   
see my new solution - I added some example code, but didn't find the time to modify the FTP class itself...
johannesnestler 24-Jan-15 2:29am View
   
Ah, forgot to mention before, It seems you "come" from JAVA - how did you solve such Problems there? AFAIK the exception handling logic regarding to threads is exactly the same (Exceptions are local to the calling thread so the bubble up the callstack only for one thread).
johannesnestler 24-Jan-15 2:24am View
   
This is exactly what I suggested: Catch the exception and fire the (new created) "ErrorHappened" Event, this way you marshall your exception from one thread to the other. A clean an nice solution (of course only possible because you can change the source of the library) If you have any problems writing this code, feel free to ask me..
johannesnestler 23-Jan-15 10:56am View
   
No, just checking the IsConnected property after calling BeginConnect is not enough, the flag will be set during BeginConnect (by the ConnectThread method), where the exception occurs. Even if no exception is raised it won't help cause BeginConnect returns to the caller while Connecting thrad is still running... See my answer...
johannesnestler 23-Jan-15 5:40am View
   
which splitted files - what means "retrieve" in you context and how "separate" are thes Folders - this could mean anything. Please try to formulate a question that could be answered with code, or better show the code you have now... In the end System.IO will have everything you Need - 10min on MSDN should get you there (if you know any C#)
johannesnestler 15-Dec-14 10:32am View
   
You have to learn about value vs. reference types, if this behaviour was unexpected by you. It's just references (pointers) you are holding in your lists.
johannesnestler 6-Dec-14 8:21am View
   
this can't be the reason for your application to crash, I think you have another Problem... sry for not beeing very helpfull...
johannesnestler 4-Dec-14 9:49am View
   
Step 1. Learn to write proper sentences, check spelling and grammar...
johannesnestler 4-Dec-14 9:36am View
   
I think you are faster if you sit down and: read the docu about System.File as RyanDev suggested, then write code to read the line (first?) where your "Problem steps count" is written. Jumpt to "steps start" and read as many "steps" as you need. Finished. You need more time for commenting here than to solve your problem...
johannesnestler 4-Dec-14 9:32am View
   
if you read the whole file and really need a List (not an Array) you could write all like this: List<string> listData = new List<string>(File.ReadAllLines(strPath)); (one line) anyway OP needs to read until his condition is met...
johannesnestler 2-Dec-14 9:30am View
   
Yea sorry for sounding a little angry in my "solution" it was meant as a "funny hint" how to make a better question. I'm not shure what you mean with your statements about tech... Fact is your post didn't (and doesn't) state any questions. I think it's best practice to formulate an actual question if you want to ask for some help. Don't repost and google or explain tech "words" you don't know. You should have better answered the commenters questions (or mine) - if you would have answered my questions, I would have tried to help... I think explaining a problem to others is a valuable skill for every programmer
johannesnestler 19-Nov-14 9:40am View
   
For me you explained nothing - maybe think how you would tell a customer (=non programmer) what you are doing. From your question I have no clue what you want, which tech you use or what your code could be. So put some effort in a clear question and show the relevant code you have now...
johannesnestler 18-Nov-14 10:17am View
   
you posted your reply as solution? use the reply button... anyway if you don't know the datarow Format upfront add some code to check it. From your code you assume that in the second column of the first datarow there is a "Datentyp", if this is not the case you shouldn't wonder when your code breaks. Hard to tell from that short snippet but it seems you approaching the problem in a wrong way if dataformat is very dynamic...
johannesnestler 18-Nov-14 10:10am View
   
You speak german - ok, but "Index out of range" should be easy to understand. You are using 3 indices in this snippet, first is implicit in String.Format - this is ok, So problem could only be that no row was returned by your select or the row hasn't two cells (unlikely you got that wrong but you see there is a reason not to rely on index - what if datarow format changes...). Use the Debugger not a forum for such simple coding errors you will see every day.
johannesnestler 18-Nov-14 9:56am View
   
Which UI tech - I'd assume WPF?
johannesnestler 18-Nov-14 9:47am View
   
OMG: Not understand databinding when using wpf but want to use a Dialog as resource. Sorry this is no offense - but one day with a WPF tutorial would help much more than posting questions about doing it wrong...
johannesnestler 18-Nov-14 9:38am View
   
Reason for my vote of 2 \n * No localization support
* handling logic with exceptions.
* no Support for negative numbers or any other number formats (scientific Notation?)

On the plus side is clear code and funny written tip.
So bad vote is to stop other from using this limited approach.
johannesnestler 17-Nov-14 9:19am View
   
I don't get you problem. Anyway doing
* reading from UI controls (without validation of course),
* modify the Input (replace...)
* Converting the Input
* applying your algorithm
* writing back to a UI-control (while converting...)

in one line of code is complete nonsense - stop this kind of programming and problems like yours where you mix up your "calculation" with other things and don't know where the problem comes from should dissapear - or at least give a clear hint what's wrong. E.g. create a function for you "algorithm" read input and validate it's in the right "order" - if not just change direction (or whatever is needed)...
johannesnestler 17-Nov-14 8:58am View
   
What Kind of answer do you expect? Writing a Programm is for shure only a little step if you use AI, much more important are the parameters/creteria for the NN to learn and "predict". So my answer to "how" is: Do a lot of resarch... ;-)
johannesnestler 17-Nov-14 8:55am View
   
I would recommend you edit the control-template instead of finding the target for the contextmenu through code. If you edit the Template you will see the DataGridColumnHeadersPresenter is just inside a Grid - maybe you have to "redisgn" the visual tree a little to get the desired behavior...
johannesnestler 5-Nov-14 8:19am View
   
he does not return inside the try (line was commented out) but set's a variable. A good fact to know but no solution to OP's question...
johannesnestler 31-Oct-14 7:35am View
   
What you mean with "method"? Are we talking about a VS-Extension or some standalone program? To automatically run a Programm sounds like a resonable "desire" - could it be a sheduled Task that runs a script and executes your project? What you can possibly mean with "autmatich debug" is beyond my imagination - can you clarify what you want to achieve...
johannesnestler 24-Oct-14 7:25am View
   
why not ask DevExpress Support? https://www.devexpress.com/
johannesnestler 23-Oct-14 10:59am View
   
would be a good answer - I thought in the same direction first but OP clarified in between (see comments) that he needs a Website... maybe have a look what I recommended - and advice if you have other opinions...
johannesnestler 23-Oct-14 10:56am View
   
Another quick thing I want to mention before I go home now. I know PLC programmers are used to propriatary techonolgies. But your data or your code is not "inside" VisualStudio. You can do everything!!! in .NET with just a Notepad (any Texteditor) and the Compiler - no one would do this, but you could. So your data is not in a "table" nor inside VS - it's just data - feel free to use it however you want - and don't use Sockets for any "Internet" related thing - this is only for "Intranets".
johannesnestler 23-Oct-14 10:38am View
   
Yes I know alLittle about it - though maybe my knowledge is quite rusty in between but it's not to difficult if you don't want to do fancy things...
johannesnestler 23-Oct-14 10:36am View
   
Hi Matthew,

So you cause you created your GUI Client with C# (WPF/Forms?)? it's maybe best to create the WebSite with .NET technology too - the downsite is that hosting could be a little more expensive (not much, I pay 2 Euros a month for a shared Server with mysql database in the background). So I'd create a WebSite/WebService based on the state of the art MVC-pattern. Simple to learn and a big community to ask for help. Maybe start here http://www.asp.net/mvc You will only need to modify one of the basic samples to get some starting Point, because the database will be very lightwight - should be possible to set this up in one day without much knowledge about DBs - most hosters offer the database solutions in a package with the Webspace - or maybe consider an Azure site? http://azure.microsoft.com/en-us/

So after you explained your goal it's maybe not needed to create a "file" for the data before you "upload it". Best is to offer an "Rest-API" from your Site/Service to accept/upload the data (maybe read about this Topic first http://en.wikipedia.org/wiki/Representational_state_transfer in essence it means you can just post the data to your site/Service like I do here on CP if I write this comment. Regarding "real time" you should see it like this: Your Controller produces data - the upload mechanism is a consumer of this data and shoud handle it async to the "Producer" - maybe read http://msdn.microsoft.com/en-us/library/hh228601(v=vs.110).aspx to get the idea. But be aware that there is no such thing as "real time" on the web or PC - just try to get it fast enough (there are technologies to help you displaying the data to your site-visitors "fast" like http://www.asp.net/signalr - but maybe don't overwhelm yourself now - look into this in a later stage of the project). So theres is much to learn and consider, try to have a look at the "global" concepts to get used to terminology, Keep in mind that the actual implementation then won't be too hard. And btw. you will learn .NET which is great tech, usfull in many domains. I hope my opinions are of some value for you - good luck with your Project - and feel free to ask further questions. Kind regards Johannes
johannesnestler 23-Oct-14 9:25am View
   
From your questions I guess you have background in automation industry and PCL programming, but not in "high Level" programming - correct? So maybe you should aim for the simplest approach first. Try to write your data to a file - XML is very well supported by .NET, could also be a simple CSV or text Format - I wouldn't go for binary since you say your structure is quite simple - I'd guess it some kind of "trend"-data (like a temperature, pressure, etc. changing over time?). Then "upload" the file to a web "space" (via tftp, ftp,...) you can get it for free (cloud like OndDrive an option?). Maybe tell us what you want to do with that data - present it in other "Clients" = GUI applications you write - Or do you need a "web-site" to access the data? I/we can help you to write the code for each step then... Hard to recommend a hoster - you have to evaluate what you need - traffic - bandwith, costs, do you (want to) own a Domain, space need, tech available, etc. <- just my 2c
johannesnestler 22-Oct-14 2:06am View
   
Sorry Suresh it seems I was wrong - have a look at: http://stackoverflow.com/questions/20731402/animated-smooth-scrolling-on-scrollviewer I think Answer2 is what you are looking for...
johannesnestler 21-Oct-14 8:43am View
   
Exactly
johannesnestler 21-Oct-14 7:56am View
   
No - it Looks like Employee implements iperson Interface or is derived from it - your conclusion is wrong.

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid