|
If someone wanted to inflict themselves with a daily single email per forum that shows 100+ lines of titles for new threads, does that sound so bad?
I know my boss gets probably 25+ emails a day for enlargement techniques.
While he may continue to be frustrated, which I cannot help, I know that if I could get a single email from the C# forum I could conceivably prevent frustration.
But alas, I am also fine with searching through the threads. Just am doing it typically with a decent amount of leadtime.
|
|
|
|
|
mprice214 wrote: If someone wanted to inflict themselves with a daily single email per forum that shows 100+ lines of titles for new threads, does that sound so bad?
For that individual no.
For the poor Hamsters having to organize the Emails for, lets say 10,000, members - not so good.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
I figured the hamsters were all the silicon gates that open and close, depending on what the software guys tell them what to do.
I don't think the question was that perverse
It stems from having participated in other forums and is not a unique brain child of mine .
|
|
|
|
|
So, you get 7,000,000+ emails going out, potentially with 1000 lines of titles here (some of the forums are very active). That's a lot of infrastructure needed there. Chris and the team have enough on their plate right now (BTW - if you want to discuss something like this, you should choose the Suggestions forum).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Uncle!
I understand it's not a "flick of the switch".
I'm not suggesting that they do that either. I initially asked how and if it could be done, that was all. Just because I had come across this functionality on other forums doesn't mean that I think CP should be shut down until it does have it.
It's not worth it to me to suggest it on the Suggestion forum.
If Luc wouldn't get all over me about removing messages, I probably would.
|
|
|
|
|
Oi. I suggest you stop this thread here and now; it has been answered and dealt with. No need to add or remove anything.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I second that!
Do you ever sleep?
|
|
|
|
|
Most of the time, but nobody notices the difference.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hi,
I'm using a third party class library called SmtPop.NET, to allow me to read (Pop3) and send (SMTP) email from a server.
I have this whole program working correctly when building the Debug version of the application. Only when I try and build the Release version I recieve a number of errors relating to the SmtPop reference, for example:
Error: The type or namespace name 'SmtPop' could not be found (are you missing a using directive or an assembly reference?)
I also recieve the following warning message:
Warning: Could not resolve this reference. Could not locate the assembly "smtpop". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Does anyone know why I would recieve these messages? Or has anyone every recieved messages of this sort when trying to build a Release version of a program that inclueds a third party class library added as a referance?
Any help would be really appreciated.
Thanks,
Mel
|
|
|
|
|
Is there something you have to do with references when creating the release version of a .Net program?
|
|
|
|
|
Ok, I've been playing around with it and just happened to copy the SmpPop.dll and other related files (contained in a folder) into the folder of my project and then reattached the SmpPop.dll as a reference in my project. Rebuilt the solution, which was successful with no error.
I'm assuming that was the problem and I had to include reference dll's in the folder of your project. Correct me please if I'm wrong of if you know of an article that I can read that describes the process of a build.
Thanks,
Mel
|
|
|
|
|
|
|
Your welcome. Hope it helped.
|
|
|
|
|
Hey All,
I'm having a concept issue with DataBinding in C# and VS.NET 2010.
I have a Table, MyTable, it contains a record which is displayed in a form (all fields bound), and i have a save button.
Then I have another Table, MyTableSpecs, it contains MANY records. These all have the same key, so that the table, and the tablespecs go together. I use this relationship to bind the grid that shows the specs rows.
When a user is vieweing an existing records already in the database, everything works fine. At the top I see the fields of the MyTable row, then in the GridView I see the MyTableSpecs that match key with MyTable. when i save these, it all works.
Problem comes with creating NEW records (and Identity I don't think is the issue (The ID field of both tables is a INT, auto-incremented from 0).
But when i am creating a NEW record, I have problems. I do not want to FIRST submit the top part of the window (therefore the MyTable record) BEFORE the user enters in the child rows in the Grid. I want both the fields at the top AND the grid to be populated first, and THEN i want it to commit both in order, MyTable record first, then each MyTableSpecs rows. If the grid was not databound, I would just apply the data myself and it would work, but I want to use DataBinding, surely it can perform this task...
The problem is, once I save the top record at the top using BindingSource.EndEdit(); and then TableAdapter.Update(Data.MyTable);
ALL of the data in the MyTableSpecs Grid/BindingSource disappear!
So I can't commit them anymore... They dont stick around and get the ID itself, I dont even get the chance to APPLY them either, because the whole binding is empty.
Can someone tell me what I'm fundamentally misunderstanding, or do I have to commit the top part first, THEN let the user fill out the grid and then save the rows??? (i hate this idea, NOT user friendly)
I know I could just remove the databinding altogether, but I didn't want to have to do that...
Any help would be appreciated.
Phil
modified on Monday, June 7, 2010 5:22 PM
|
|
|
|
|
This comes from binding your data tables to the form controls using MS wizardy things and adapters. You either have to do the 2 stage save or take control of your data in some other way. The adapters work for only the most basic solution (although I would think this scenario is pretty basic so there may be a solution to it).
I would use an class representing your table that holds 1 record and a list of spec objects. Bind Mytable to the form and List<myspec> to the grid. This will allow you to let the user do basically anything you want. When the user commits the data then you could wrap the entire save operation in a transaction ans save MyTable and getting the ID generated by the database (use parameterised queries) and then saving MySpec with the ID then committing the transaction.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah see, your solution is more or less "doing it myself" which I know would be fairly simple.
The system works great if you aren't binding EVERYTHING, but the bindings make create the UI really easy at first.
I have completed the modifications to create and save the top record even if the user may CANCEL it. This seems to be the easiest solution WITH bindings.
The thing is, i have no choice, i'm being told to use bindings and i cannot "do it myself" so to speak.
Thanks for the try though, I appreciate it muchly.
Phil
|
|
|
|
|
Hello,
I have two forms: a parent form and a child form. The parent form has three ListView items. One of the ListView items is used to list job entries. The child form is opened only when a job is selected. When I open the child form, I reposition the cursor, so that it is within the child form area. I want to close this child form when the cursor leaves the child form area. For this purpose, I have a MouseLeave function in the child's form class ( ChildForm.cs ). In the child form (ChildForm.Designer.cs) I also set: this.Capture = true; This does trigger the MouseLeave even, but the event is triggered only when the mouse leaves the application area -- both the parent and the child form area. If I remove the: this.Capture = true; the event is not triggered at all.
Any ideas how to fix that?
Thanks in advance!
- Martin
|
|
|
|
|
You could just try listening for the MouseMove event and check to see if the mouse is still within the child form. It would be another option if you can't get the MouseLeave to behave properly.
|
|
|
|
|
I tried doing that, but the event is not triggered at all. If it is, I can filtrate it -- I can determine whether the cursor is on the child's area or not. Do you have anything in particular in mind? How should I trigger the event? That is the main problem.
|
|
|
|
|
It sounded kind of interesting that you couldn't get that to work, so I tried it out. It works using MouseLeave and Capture.
Try the following:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
using (Form f = new Form())
{
f.Capture = true;
f.MouseLeave += new EventHandler(f_MouseLeave);
f.Location = new Point(Control.MousePosition.X - 50, Control.MousePosition.Y - 50);
f.ShowDialog(this);
}
}
private void f_MouseLeave(object sender, EventArgs e)
{
MessageBox.Show("Left child.");
((Form)sender).Close();
}
}
Btw, the mouse position is in screen coordinates, so you should convert it if you're wanting to see if its still within the child form (if you had gone that route).
Point pointRelativeToForm = f.PointToClient(Control.MousePosition);
|
|
|
|
|
Btw, after refreshing myself on the usage of Capture[^], you don't use that but in drag operations normally. So, you don't need to set it.
|
|
|
|
|
|
Good day everyone,
I am working on a project and I am having a few issues.
Project detail
1. Am trying to simulate a RIP based router in Windows
2. I am developing this in C#
3. Am using Winpcap and SharpCap
4. So far I have figured out what my routing table would look like
My issues are as follows
1. Initially when RIP starts it sends a request packet out all RIP enabled interfaces
on IP address 255.255.255.255
I have tried to simulate this directly but decided to let .NET manage the packet
header creation, so what i have done is simply to send "Type 1 message" as
the payload and when the receiving router sees this it knows it should send its routes.
This is not how it should be done, but i guess i can work with this for now, as I can't
seem to be able to create my own packet header in C# easily.
Any suggestions on how best I can create a packet without doing low level stuffs would be
appreciated or any library i can simply reference that just accepts port number, ip addresses,
payload and returns a packet as response?
2. After sending I should wait for response from other Routers.
These received packets are called Response Packets and contain the responding routers'
routes.
To do this i have decided that after the Request is sent out all interfaces, I would wait for about
25sec for responses.
Issue: I do not know how best to implement this, I have tried editting the Sample Codes in sharpCap
and also tried socket.listen method
but I can't tell if anything is coming in or not.
3. I installed WireShark to help me detect if I am even sending anything out the interfaces in the first place
and it appears am not, as wireshark does not report anything. And yes I selected the right interface.
So any help please.
Below is a cut out of my code so far
...
ArrayList ripIntefaces;
public void start(int[] deviceIndex)
{
//get list of intefaces again
var devices = LivePcapDeviceList.Instance;
//send request out all RIP enabled interfaces
for (int k = 0; k < deviceIndex.Length; k++)
sendRequestsInitial(devices[deviceIndex[k]]);
//wait 4 response
while (true)
{
//1st time around dont run infinitively, just capture n close
for (int k = 0; k < deviceIndex.Length; k++)
receiveResponse(ripIntefaces, deviceIndex); //this should be threaded 4 listening on each interface
}
}
....
private void sendRequestsInitial(LivePcapDevice enabledIntf)
{
string nxtHop = enabledIntf.Addresses[1].Addr.ipAddress.ToString(); //should be but I cant bind ip add "255.255.255.255";
int portNo = 520;
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
IPAddress sendTo = IPAddress.Parse(nxtHop);
IPEndPoint sEndPoint = new IPEndPoint(sendTo, portNo);
EndPoint sendEndPoint = (EndPoint)sEndPoint;
sock.Bind(sendEndPoint);
//create packet to send
byte[] pktContent = packetProcessor.makeRequestPacket();
sock.SendTo(pktContent,sendEndPoint);
}
....
private void receiveResponse(ArrayList ripNetworks, int[] deviceIndex)
{
//monitor all ripInterfaces
//start new thread 4 each - WORK ON
var devices = LivePcapDeviceList.Instance;
LivePcapDevice device = devices[deviceIndex[0]]; //testing 4 1 device 1st, others with thread
device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);
int readTimeoutMilliseconds = 25000;
device.Open(DeviceMode.Promiscuous, readTimeoutMilliseconds);
device.StartCapture();
//device.Close();
}
...
private static void device_OnPacketArrival(object sender, CaptureEventArgs e)
{
// myPacket tempPacket = new myPacket();
var packet = PacketDotNet.Packet.ParsePacket(e.Packet);
var ip = PacketDotNet.IpPacket.GetEncapsulated(packet);
var udp = PacketDotNet.UdpPacket.GetEncapsulated(packet);
string result = string.Empty;
if(ip != null)
{
if (udp != null)
{
result = Encoding.UTF8.GetString(udp.PayloadData);
}
}
Console.WriteLine(result);
}
....................
class packetProcessor
{
static byte[] packet;
public static byte[] makeRequestPacket()
{
string content = "Type 1 Message, Request";
packet = Encoding.ASCII.GetBytes(content);
return packet;
}
}
So any inputs??
|
|
|
|
|
The first question, if I use "using()" to open a connection,like this:
public void InsertRow(string connectionString, string insertSQL)
{
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
OleDbCommand command = new OleDbCommand(insertSQL);
command.Connection = connection;
try
{
connection.Open();
command.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
Whether I still need to use "connection.Close()" to close the object? Or it will be closed by .Net automatically?
Another question is, Whether "connection.open(),connection.close()" are necessary for a executing every time? For example, there is a querying in Form1.cs and a updating in Form2.cs, should I close the connection in whichever Form immediately ?
|
|
|
|
|