|
Then there's something you aren't showing us, because nowhere in what you posted do you actually call a method on an instance of that class.
|
|
|
|
|
Could you explain a bit more in detail what you're trying to achieve? As it looks, you're trying to hook into some internal class to get at a username/password.
How would you need that to redirect a button? And who is "Satis"?
Bastard Programmer from Hell
|
|
|
|
|
Hi Eddy,
thanks for the respnse.
here, am passing the value into ChangePasswordUrl and ResetPasswordUrl property where it assign the value into _changePasswordUrl and _resetPasswordUrl this fields.
You can see that when this method
_changePasswordLinkLabel_LinkClicked is invoked it reads the data from _changePasswordUrl and open the link which i pass into this field.
Satis.Client is assembly/dll name which am consuming in my application.
|
|
|
|
|
Rocky23 wrote: here, am passing the value into ChangePasswordUrl and ResetPasswordUrl property where it assign the value into _changePasswordUrl and _resetPasswordUrl this fields.
I've seen the write-only properties in the first post - but no events that "should" get fired. I've also seen that you're trying to assign a value to a read-only property.
Rocky23 wrote: Satis.Client is assembly/dll name which am consuming in my application.
That much I figured. I also know it's a forms-application, and that you're trying to use one of their classes - and apparently, they're not documented. So, you found a way to create their form, and now you want it to point "elsewhere".
Now, from my point of view, you're trying to hook into someones authentication-mechanism.
Bastard Programmer from Hell
|
|
|
|
|
Hi codeproject world!
I wanna to have something like "desktop composition in windows 7" form my forms.
I have one main form and all other are mdi for that.
Thanks a lot.
|
|
|
|
|
There are a few things here:
1) You forgot to ask a question.
2) You need to explain what 'something like "desktop composition in windows 7" form' means in this context.
3) You need to ask a question
4) You need to explain what you have done, and where you have a problem.
5) You neglected to ask any question.
Oh, and in case I forgot to mention it - you need to ask a question if you want us to help.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
BTW: You forgot to ask a question.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Hi codeproject world!
I wanna to have something like "desktop composition in windows 7" form my forms.
I have one main form and all other are mdi for that.
Thanks a lot.
maybe you can get it here
|
|
|
|
|
I thought to Google your "question" and it came up with this[^], so I guess you are interested in an "Aero" like them for your form. This is certainly possible and I would expect it requires you to make dynamic changes to the properties of each child window as you move the mouse around your form. Look at the Opacity property of your forms.
|
|
|
|
|
Sorry,
I wanna to have something like bellow:
when u press winKey + Tab in windows 7 you can change between Programs that are open .(the one same as Alt+Tab but very graphically)
|
|
|
|
|
One of these[^] may already provide what you want. If not then choose a key combination not already allocated and write a handler for it that switches between the MDI windows.
[edit]
Doing it graphically requires considerably more work and would probably be easier in WPF than pure C#; I hope your skills are up to it.
[/edit]
|
|
|
|
|
You can use Control.DrawToBitmap[^] to draw a copy of what's currently visible on a form or panel into an image, and then use image transformation (rotate/scale/skew) and drawing capabilities in the Graphics class to make a perspective-distorted version of it to scroll through.
Make sure you support the standard ways to navigate around an MDI form as well. This might seem like the coolest thing ever to you right now but users will probably want to switch in the way they always have.
|
|
|
|
|
I wanna this :
Windows Logo+TAB: Cycle through programs on the taskbar by using Aero Flip 3-D
for my Forms that are mdi.
should i use/find dll for that ?
modified 25-Jun-12 23:58pm.
|
|
|
|
|
Hi every one,
I have a small project to monitor the heart rate using c#.NET. I wrote a code to receive the ascii data using serial port through a bluetooth link between the pc and a Zephyr HxM device. What I need is how to convert this received ascii data into a decimal. The data consists of 64 bytes recieved every one second and I need from these data only byte number 12 which gives me the heart rate. So my question is how to receive the ascii code and select only byte no. 12 after convert the data
from ascii to decimal. Thanks for yur help.
|
|
|
|
|
That is a bit confusing. How is the information encoded for transmission? if it is in binary, you may not need a conversion at all. And if it is textual (say in ASCII), then you are likely to need more than one character (and hence more than one byte) to represent a heart rate.
I suggest you show us an example input (actual data!) and the relevant part of the code you have so far to receive the data from the serial port.
|
|
|
|
|
So you get a byte[] with the length 64?
And you want to access the 12th byte? This can be done with myByteArray[11].
What can we expect this byte to be? I'm not exactly sure about your question, sorry.
Markus
|
|
|
|
|
Sorry for the confusion. My english is not perfect. The hard rate monitor device sends a series of 64 bytes every second ( 1 Hz frequency)each byte has different value from 0 to 255, and i need to work on byte number 12. But unfortunetly I received this series of bytes in ascii (hrArray[] in the following code ). So my question is how to convert what I get ( the ascii) into byte value.
private void serialPort2_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
hrStr = serialPort2.ReadExisting();
if (hrStr == "") return;
hrArray[hrIndex]= hrStr;
lblTest3.Text = hrStr;
sw.WriteLine(hrStr);
hrIndex++;
if (hrIndex == 64)
{
hrSum += Convert.ToInt32(hrArray[12]);
lblTest.Text = hrArray[12];
hrCounter++;
hrIndex = 0;
}
}
|
|
|
|
|
When the data isn't text, you should NOT use text-oriented methods such as ReadExisting() as that would imply two conversions, one from binary to characters (by the method itself) and one back from characters to bytes (by you), both prone to mishaps. You really should use a byte-oriented read, which is Read()[^].
And then it becomes pretty easy to just pick the byte or bytes you really need and work with them.
Warnings:
1. serial communication may get out of sync (some garbage on the line, the PC temporarily not listening due to an overload, ...) , there is no guarantee what comes in will be exactly one message.
2. the DataReceived event will fire when there is "some data" available. There is no guarantee it will fire on the first byte coming in, and there sure is no guarantee the message will have been received completely before it fires. So there is a big chance you will have to collect data and somehow make sure you get synchronized with the messages, possibly having to keep the remainder as the start of the next message for later processing.
The best case would be when the transmission is fast and the pauses between messages are relatively large (say 9600Baud, i.e. could send 1000 bytes/sec, hence a burst of 64 msec and a gap of some 900msec. Then you could use DataReceived, insert a 100msec delay in it (to make sure the entire message has been received), then read it all in one go.
|
|
|
|
|
Hi Luc, I have tried to read the data but no luck. I wrote the following small test program to store the received data in a text file. The data that i want to receive is a binary data packet from the Zephyr Heard Rate Monitor device through a bluetooth. The device sends 60 byte packet every 1 second. The packet format is shown in section 7 of the following following Bluetooth HXM API Guide 2011-05-05.pdfpdf file:https://www.box.com/shared/c169gssedk2nrgu4t41f[^]
namespace ReadZaphyr
{
public partial class Form1 : Form
{
StreamWriter sw = new StreamWriter(@"C:\\myfile.txt");
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
if (!serialPort1.IsOpen)
{
serialPort1.PortName = "COM6";
serialPort1.BaudRate = 115200;
serialPort1.Open();
serialPort1.DataReceived += serialPort1_DataReceived;
}
}
private void btnExit_Click(object sender, EventArgs e)
{
if (serialPort1.IsOpen)
{
serialPort1.Close();
}
sw.Close();
sw.Dispose();
this.Close();
}
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
Thread.Sleep(100);
byte[] buffer = new byte[serialPort1.ReadBufferSize];
int count = serialPort1.Read(buffer, 0, buffer.Length);
for (int i = 0; i < buffer.Length; i++)
{
sw.Write(buffer[i].ToString());
}
}
}
}
|
|
|
|
|
Hi,
I'm not going to download a huge file to glance at one or two pages of it, sorry.
Your DataReceived code needs some changes:
1. I would output the value of count;
2. you should display count bytes, which may be fewer than your buffer's capacity.
3. when data is binary, I always prefer a hex printout; decimal is useless most of the time.
4. the bytes output need a fixed number of characters, otherwise you don't know whether "123" means "12"+"3" or "1"+"23" or ...
In my experience the return on investment for observation tools is immediate, so I suggest you try something like this:
int count = serialPort1.Read(buffer, 0, buffer.Length);
for (int i = 0; i < count; i++) {
if (i%8==0) sw.Write(" ");
sw.Write(buffer[i].ToString("X2"));
sw.Write(" ");
}
|
|
|
|
|
You should be treating the input as a Byte array not an ASCII string. If byte 12 (offset 11 not 12) contains the heart rate then it will be a binary value, not a character so you do not need (indeed should not) Convert.ToInt32() .
|
|
|
|
|
Thanks Luc and Richard for your reply. I will give it try what you advice and let you know. Thanks again.
|
|
|
|
|
My program works fine on my computer, but when i try to launch it on another computer i get an error:
Quote: See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Не удается найти указанный файл.
File name: 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at datori_inc.iestades..ctor()
at datori_inc.galvenais_logs.button3_Click(Object sender, EventArgs e) in C:\Users\Saidrex\Documents\datori_inc\datori_inc\galvenais_logs.cs:line 39
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3625 (GDR.050727-3600)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
datori_inc
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///F:/datori_inc/datori_inc/bin/Debug/datori_inc.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3623 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3631 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3636 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitdebugging="true">
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Do i need Sql server installed on other computers to launch my program? Is it possible to make it somehow to launch without installing Sql server?
|
|
|
|
|
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0
Above file is missing on other system.
Saidrex wrote: Do i need Sql server installed on other computers to launch my program?
Looks like, your application needs this dll on the system and thus installing it on the computer will resolve it
Saidrex wrote: Is it possible to make it somehow to launch without installing Sql server?
It should be possible. Design your application such that the dependency for the database is not directly on your system. You can try to access DB on other system or use a webservice designed to get data. Currently, it looks like your application is expecting database locally and trying to access it.
|
|
|
|
|
database file is in program folder, i moved my program to another computer with database file in it.
|
|
|
|