Get data from FarPoint Spread control running in another application - c#

I'm attempting to write a application in C# utilizing the Microsoft UI Automation framework. The application to be controlled uses a component called "FarPoint Spread". It's easy enough to automate the rest of the application (e.g. its WinForms controls), but I can't seem to do anything with the FarPoint Spread control.
I'm still very green when it comes to programming. I've got just the basics of C# and UI automation down. Just need someone to point me to the information I need to have to automate this Spread component (if that's even possible). Thanks!

The problem is the grid rendering in Spread is written probably using custom code, and it's not equipped with what UI Automation expects.
I have tested the Sample Explorer provided by GrapeCity here (http://spread.grapecity.com/Pages/Demos/) with UI Automation's Inspect tool, and once you get to the data grid itself, there's nothing shown in Inspect.
There's also this topic in GrapeCity's forums:
Is Spread even supported in coded UI test which clearly states (2 years ago) it's not supported (as you known VS Coded UI also uses UI Automation as the underlying technology).
So, I guess it's not possible to automate Spread using UI automation (maybe they have their own system, you'd have to contact them).

Related

Using WPF on XP embedded for simple GUI

I've got a simple and clean GUI to do for windows XP embedded, but I'm very new to C#.
Many topics I've found discussing WPF on XPE seem to be dating back to ~2007, so I'm here hoping for current up-to-date information.
Basically, how well supported would WPF be for this task? Are there circumstances which makes this a very bad design path? (what .net version?)
The app will be a kiosk mode gui which will contain some simple buttons, textfields and maybe a drawing canvas element.
It should at least be possible for you to get .Net Framework 3.0 installed on XPe (http://msdn.microsoft.com/en-us/library/bb417255%28WinEmbedded.5%29.aspx). However, depending on the performance you've got available and the kind of UI (if its simple enough), you might opt to choose WinForms instead of WPF.

Need UI testing && analyzing tool for Windows

I have very little experience with Windows platform and I really need a tool to test my application from the UI side. Quick i-net search make me completely baffled, so any help is highly appreciated.
Key requirements:
Can fire user-driven events (such as click on specific place, drag'n'drop, text input)
Can capture screenshots (e.g. on failure)
Can analyze screenshots (sometimes application fires random events and creates pop-ups, needs to intercept and handle such situations).
Maybe I can delegate this to some third-party process?
Can create reports and store them in file system.
Application itself is written on C#, but it doesn't matter, right?
If you're developing with WPF (or even WinForms), I'd give Microsoft UI Automation a shot. In conjunction with MSUnit or NUnit it allows easy and programmable UI tests.
Nunit is good for functional & Logic testing, its 3rd Party and free to Install. But I dont think it will cover capturing Screenshots etc.

How to use Microsoft Excel as a Grid control in C# winforms?

Are there any good samples of using Microsoft Excel as a grid control in a typical winform C# application.
I have come across a lot of threads talking about excel 'like' control or grid controls with functionality similar to Excel etc.
Why not use excel as a GRID control , it has all the goodies in build ( formula engine , sorting, filtering etc )
You certainly can host Excel as a control within a WinForm application, so part of what you want is possible (with major caveats). However, to wire up the rest of the functionality seen in many of the 3rd party grid libraries takes a lot of work, and has many pitfalls.
The prime reason for this is that Excel is a native Windows application, and is not running under the .Net framework. Therefore, all of the manipulation has to be done at arms length - you have to instantiate the application, instantiate a sheet, try and subscribe to certain events (many of which may not be available as Excel was not designed for this purpose), and, of course, try and propertly manage all of the COM references to avoid memory leaks.
The grid controls you mention have all been built from the ground up as controls to be hosted within .Net applications, and therefore expose properties and events around the type of grid style interactions that people want - remember, Excel is more than a grid.
However, as if to acknowledge that Excel can be a powerful tool when leveraged programmatically, Microsoft provided VSTO - a runtime that allows you to develop Excel (and other office applications) using .Net
As far as I know, there are no .NET controls for embedding Office applications.
Earlier you could use the DSOFramer to achieve what you want but then it was discontinued. I believe it still works though (I am not sure). The Web Browser (COM) control is an alternative to DSOFramer, but has its own drawbacks. For example, you cannot use the inbuilt "Goodies".
The below is just my personal opinion
I doubt that MS will never support embedded Office applications and the reason is very simple. MS-Office Applications are "End-User-Targeted" products. You need separate licenses for it and from a business perspective they wouldn't want to loose on that :) Like I mentioned earlier these are just my personal thoughts and do not echo MS's views.

Get a window text by handle

I use UI Spy and Spy++ to view windows text of some windows, but none offers a result. As people said, some windows are built up and executed by some components, say they are embedded inside those components. Except the two tools to view the window handles, text, could you introduce me other tools or ways to get a window text or handle without using hooks ?
Edit: I also use Spy Object to retrieve windows objects information and search from ancestors till I can meet the right object but this tool to the particular windows I am watching is incapable to do the job because it also reports incorrect parents positions in ancestor hierarchy, I try out the MAAS and UI-Automation without luck, Thank you for you help.
Edit3: I don't like their windows'ideas of internal designs (I mean only they-designers- know how to untie the knots)
Usually the Accessibility APIs are used, the ones used for text-to-speech screen readers for blind users. In your question you mentioned MAAS, did you mean MSAA (Microsoft Active Accessibility)? If not, that's where I'd look next.
http://white.codeplex.com/ is a great framework which does such things.
White is a framework for automating rich client applications based on Win32, WinForms, WPF, Silverlight and SWT (Java) platforms. It is .NET based and does not require the use of any proprietary scripting languages. Tests/automation programs using White can be written with whatever .NET language, IDE and tools you are already using. White provides a consistent object-oriented API, hiding the complexity of Microsoft's UIAutomation library (on which White is based) and windows messages. Only stable versions of White are released, so all releases are production-ready.

Charting live data with .NET C#

I am looking for a way to chart data using C# .NET. I have a SQLite file containing the data I wish to chart, but the data is updated every 15 seconds and I would like to have the ability to "animate" or live update the data at a specified interval.
I was using ASP.NET charting controls but found it to slow down as more data is added. When I was using this method, I simply placed an auto refresh on the page and regenerated the graph each time.
I am open to using any .NET technology available to present this data (i.e. Silverlight, WPF, .NET, etc.).
I also would like to avoid using any third party PAID software, FOSS .NET solutions are fine.
Does anyone know how to present the data and generate the graph so the chart only renders additions instead of rebuilding the entire graph each time the "page" is reloaded?
Thanks!
WPF and Silverlight both support data binding. If the data being monitored supports INotifyPropertyChanged and, for collections, INotifyCollectionChanged, then some behind-the-scenes observer pattern technology gets hooked up and you can get have portions of your GUI respond to very precise changes in your data rather than having to refresh everything. This technology is probably exactly what you are looking for, but may take a little legwork on your part if you aren't familiar with the technology, which is one of the backbones of WPF and of Silverlight.
Fortunately, getting started is not hard, and is a great investment in knowledge. Perhaps start with one of the many free databinding tutorials, or I recommend one of the web certification video courses, such as those offered by PluralSight.
Well i would suggest some Commercial Control's which works fine and are fast enough .
http://devexpress.com/Products/NET/Controls/Charting/
http://www.componentone.com/SuperProducts/Chart/
I have developed a couple of systems that streamed high frequency financial data to client browsers. They used:
Silverlight for the ui.
Silverlight toolkit for the charting components.
a .net server service to collate and push the updates to the clients.
.net sockets used as the transport mechanism. In your case, the updates are relatively infrequent, so you could use Duplex WCF.
I would suggest looking at tutorials on :
Silverlight MVVM
.Pushing data to Silverlight apps using WCF
.Silverlight toolkit
optionally .net sockets
In using Silverlight and pushing updates to the client this way, only the new/ updated data changes, therefore only this data is rendered and there are no page reloads.

Categories

Resources