I want to implement a silverlight based component for Co-Browsing.
Can you please help me get started?
Thanks
Okay, first things first. I'm going to assume that you already figured out how to get commands from the "admin" to the "client". If this is not true, just let me know.
Second: this is an outrageously difficult thing to build
Third: here's a start ;-)
To use the default SL4 webbrowser component, you need to run your application out-of-browser with elevated trust. So you should set that up first.
In my test app, I added a webbrowser component and subscribed to the LoadCompleted event.
In your eventhandler you can use something like:
void webBrowser1_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
//Pseudo code event to update clients
OnAdminNavigated(e.Uri);
}
Clientside you would use something like:
void adminNavigated(MyCustomNavigationEventArgs e)
{
clientBrowser.Navigate(e.Uri);
}
Hope this helps.
Related
So what I want to do is allow AutoSorting that's built into GridView, but whenever autosort happens, for it to call a method (recolor();) to recolor the results appropriately. Probably an easy question, but I don't see any easy way to do it.
It is a .net form (a .dll I'm using with another application), I have not attempted any code yet, as I don't want to break what I already have set up.
EDIT ANSWER
So, I figured it out in the designer I should have put:
this.dataGridView1.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_ColumnHeaderMouseClick);
And then in the form this will work :
private void dataGridView1_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
recolor();
}
Call recolor() in the event GridView.OnSorting. See: this article on MSDN.
I've successfully setup my frame with the OpenGLControl and delegated my render method to the OpenGLDraw event of it. However, I'd like to do game programming so I want to enter into an active rendering loop where I'd update the game state and render, both from another thread but can't figure it to do how.
Not positive, but if it works the same as most other systems you will need to make sure that all the OpenGL calls come from the thread, past that you can put your logic and everything else is however mean and whichever threads you want. Hope that helps!
Got it working by not calling Application.Run and instead using P/Invoke to create a C++ styled MessagePump.
Have you tried using the Winforms Application.Idle event?
Example (assuming you have a standard static class Program):
In Main - Application.Idle += Tick
static void Tick(object sender, EventArgs e)
{
//Insert rendering/updating code here
}
I want to have a lot of forms in my Gtk# application. I want to quit application when user close all form. I try to use next code:
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
/*Application.Quit ();
a.RetVal = true;*/
if(System.Windows.Forms.Application.OpenForms.Count==0)
{
Gtk.Application.Quit ();
a.RetVal = true;
}
}
But System.Windows.Forms.Application.OpenForms.Count allways return "0" regardless of the number of open forms (OS Ubuntu 12.04). How can I solve this problem and get actual quantity of open forms?
Thanks in advance
also tried to find an answer to that issue.
My current implementation is based on some concept I have seen in MS Visual Studio documentation:
in the project's main class maintain a static list of open windows.
do not use the delete event but the destroy event of the GTK# window (with the OnDelete event handler something did not work, if I remember correctly the windows delete cannot be directly called by a member function).
In the OnDestoy event handler: when the window gets destroyed then remove it from the static list. Then check the list for being empty, then quit the application.
Not sure if this is really ideal for GTK# windows but in my application this concept works.
regards
Harald
I'm working with ActiViz .NET (VTK) and have a small problem.
When I register a event (for ex. the LeftButtonReleaseEvt), I can't find out where on the RenderWindowControl I clicked. The event is called.
...
rwcVtk.RenderWindow.GetInteractor().LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(RenderWindow_LeftButtonReleaseEvt);
}
void RenderWindow_LeftButtonReleaseEvt(vtkObject sender, vtkObjectEventArgs e)
{
//TODO: Where did i click?
}
Can somebody help me?
There isn't much documentation on that out there I think.
I didn't try out this, but maybe your are looking for this property:
this.Interactor.GetLastEventPosition();
To see this working go to your Activiz Examples folder "Examples\VolumeRendering\CS" and see that example.
I am working with a WinForm application that was designed by the previous, now unreachable, develeper. In this app farms are embedded in TabControls through some custom code. My question is, Can anyone help to try and explain why there is a custom _Paint() function in each form that is called from the Load event for that form.
This Paint() method is not actually tied to the form outside of the previously stated daisy chaining. What purpose could this serve? In the code below you will notice That I created a Paint() event and moved part of the code there and everything still seems "Peachy."
Can anyone help me to understand this? Is it simply because of the Public declaration on the custom one?
private void frmWWCModuleHost_Load(object sender, EventArgs e)
{
FormPaint();
}
public void FormPaint()
{
WinFormCustomHandling.ShowFormInContainerControl(tpgCaseNotes, new FrmCaseNotes());
WinFormCustomHandling.ShowFormInContainerControl(tpgMCP, _frmWWCMCPHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgMember, _frmWWCMemberHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgEnrollment, _frmWWCEnrollmentHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgWWCSearch,_frmWWCSearch);
WinFormCustomHandling.ShowFormInContainerControl(tpgAudit, FrmAudit);
// Call each top-Level (visible) tabpage's form FormPaint()
_frmWWCMCPHost.FormPaint();
}
private void FrmModuleHost_Paint(object sender, PaintEventArgs e)
{
new psTabRenderer(tclWWCModuleHost, Color.LightSteelBlue, Color.Tomato, Color.Black, Color.Black);
}
The code looks weird, for sure, but I think you are reading more into the name of the "FormPaint" method than you should. To me, it appears to be just an "initialization" routine, having essentially nothing to do with the Paint event (other than the name).
Also, it appears that any code inside FormPaint is called one time per form, versus any code inside the Paint event handler being called...a lot.
I'm not sure you posted enough code for it to be understandable. But in general, if you feel the code is unnatural, go ahead and refactor it... one step at the time.