|
Hi all,
Currently, i want to develop a tool which can fill avaiable gmail/yahoo.mail account automatically
Note: available gmail/yahoo.mail account is account that can be used for register.
Thanks, ndkit
|
|
|
|
|
What? I'm sorry, but I've read your question several times and I still have no idea what you're trying to say here. What do you mean by filling available gmail/yahoo accounts automatically? Are you talking about a utility to automatically create email accounts?
|
|
|
|
|
Sorry for my unclear meaning post content.
I explain again as below:
As you know, currently gmail or yahoo.mail service has many accounts.
When someone want to create new account, the login name that he/she provides may be already used by others, so he/she must find another avaliable login name.
So now, I want to develop a tool that support user to get available login name for solving this inconvenience.
I googled and found the GmailAPI but seem that it doesn't solve for my case.
|
|
|
|
|
I do not believe that Gmail or any other email provider will give you a list of existing accounts - every spammer would love that!
|
|
|
|
|
ndkit wrote: fill avaiable gmail/yahoo.mail account automatically
What exactly do you mean by this?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
To automate login, if that is what you are asking for, you could:
- look at the page source (CTRL/U in most browsers);
- see how a FORM is used with some INPUT fields and a SUBMIT button;
- where pressing the button results in an HTML "POST".
So you could create a Windows app (or a browser plug-in) that sends an HTML POST with the appropriate values.
For the details, study the web pages they use, and use the HTML reference material.
Warning: as Google/Yahoo/others maintain their web sites, they can change the details of the login process any way they see fit, so you will be aiming at a moving target...
|
|
|
|
|
Anybody having c# and java implementation of Whirlpool hash algorithm?
|
|
|
|
|
|
C# code is incomplete. If somebody has correct working code, then plz do provide.
|
|
|
|
|
I've developed the other way to create the displaying of text by using GDI+ method in custom control. The problem is that I'm trying to determine if I am doing the right approach, escpecially be able to read the text clearly. I'm not sure about this individual byte to be drawn and assign their drawing location on the control.
The requirement I've got are:
1) multi-colored text
2) capability of changing background (no problem with this one)
3) needs to be monospaced (each characters have evenly spaced and all lined up
4) will consist of 16x16 grid (set up in an array of custom control in main form)
5) be able to bold the partial text (will work on that part later)
Here's the code I've done so far:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CrumTypeInterface
{
public partial class GraphicalTextBox : UserControl
{
byte[] byteToDisplay;
SolidBrush[] solidbrushColorsToDisplay;
Font fontNameToDisplay;
public GraphicalTextBox()
{
InitializeComponent();
this.Size = new Size(56, 25);
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
}
private void GraphicalTextBox_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
System.Drawing.Font drawFont = new System.Drawing.Font("Verdana", 7);
if (byteToDisplay != null)
{
formGraphics.DrawString(byteToDisplay[0].ToString("X2"), drawFont, solidbrushColorsToDisplay[0], 0, 4);
formGraphics.DrawString(byteToDisplay[1].ToString("X2"), drawFont, solidbrushColorsToDisplay[1], 12, 4);
formGraphics.DrawString(byteToDisplay[2].ToString("X2"), drawFont, solidbrushColorsToDisplay[2], 24, 4);
formGraphics.DrawString(byteToDisplay[3].ToString("X2"), drawFont, solidbrushColorsToDisplay[3], 36, 4);
}
drawFont.Dispose();
formGraphics.Dispose();
}
public void SetTextValue(byte[] byteValues, SolidBrush[] solidbrushColor, Font fontName)
{
byteToDisplay = byteValues;
solidbrushColorsToDisplay = solidbrushColor;
fontNameToDisplay = fontName;
Refresh();
}
public void SetTextValue(byte[] byteValues, SolidBrush[] solidbrushColor)
{
byteToDisplay = byteValues;
solidbrushColorsToDisplay = solidbrushColor;
Refresh();
}
}
}
|
|
|
|
|
That seems OK. I do have a few comments:
1.
CreateGraphics is an expensive and unnecessary operation, as there already is a PaintEventArgs,Graphics for free (which you can borrow but not Dispose of).
2.
I tend to create my fonts only once, and keep them alive through a class member; that works faster than creating and disposing a font on every Paint action.
3.
FYI: the bold style of a font tends to widen the font; if you want each and every character to have a constant width irrespective of style, then you'll have to position and paint individual characters; or be very selective on your fonts (although I haven't met one yet that doesn't widen when bold).
|
|
|
|
|
Luc, as you suggested,
Item #1: Can you suggest me something about borrowing Graphics thing you are mentioning?
Item #2: Done as I put in as a global in the class.
Item #3: I'll have to look into this.
|
|
|
|
|
I think I got it...
from my code in GraphicalTextBox_Paint(object sender, PaintEventArgs e) method,
I changed
formGraphics.DrawString to e.Graphics.DrawString
then I removed formGraphics variable & its dispose method calling.
|
|
|
|
|
I would wrap the font in a weak reference - that way, if resources are needed, it can be freed and reacquired when necessary.
|
|
|
|
|
You could, however I don't. Assuming a typical WinForms app, I'm not inclined to do that for objects I need inside event handlers, as I want maximum speed for such handlers.
I also keep their numbers low, mainly by storing frequently used fonts, pens, brushes, ... in a base class from which my Forms derive; this has added benefits, e.g. changing font families for the entire app is pretty simple.
If keeping those objects alive would be straining the system, I'd say something is quite wrong overall.
|
|
|
|
|
Hello buddies
I'm trying to develop my first extensible application in C# by use of the System.AddIn class provided by .NET 4.0. Therefore I've read and performed the MSDN turtorials according to this subject (http://msdn.microsoft.com/en-us/library/bb788290.aspx[^]). I implemented the test projects by hand to understand the pipeline flow and thereafter I adapted the PipelineBuilder Tool to VS2010.
My problem is that my application should share very complex objects with their addins, e.g.
Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem which is nor serializable neither marshaled by reference. What is the best way to achieve this? After my investigations one way is to share all needed informations (TeamCollection.Name, TeamProject.Name, WorkItem.ID, etc.) of the WorkItem to query exactly this WorkItem on AddIn- or Host-Side again. But this would be very time-consuming and not very comfortable considering the aim of easy application extension.
MSDN recommends to avoid the use of marshaling by reference but in my opionion serializing the WorkItem class is no suitable solution, is it? However that may be do you know where I can find an example how this problem is resolved in a elegant way?
Thank you in advance
23
|
|
|
|
|
If you need to send something across AppDomains (which I guess is the case with plugins), it has to be serialisable or marshalled by reference. Therefore you need to provide a wrapper class which is marshalled by reference and which exposes the methods you need on the other side (commonly called a proxy). For example, look at the lobby proxies at the top of Lobby.cs in my lobby system code[^]; note how all the methods to be called on the other side take and return either simple types or marshalled-by-reference objects (they could also be serialisable).
I'm not sure if there is some Microsoft magic that will create MarshalByRefObject-derived proxies for you or not.
|
|
|
|
|
Hi Bob,
thank you very much for your help. Meanwhile I have found another solution on my own. Sometimes it is impossible to see the wood for the trees ..
My problem was that I was focused on the MAF (Managed AddIn Framework[^]) provided with .NET 3.5. But since .NET 4.0 there is another Framework which is easier to use to accomplish extensible tasks. With the MEF (Managed Extensibility Framework[^]) my wish to share complex objects between host and addin is easy doable. So perhaps this can help others too.
|
|
|
|
|
For the following, I want that I get the fields in a SPECIFIC order ( NOT necessarily in the order in which they are declared ).I am fine with adding some metadata to EACH field. How can I achieve this ?
Class A
{
public string a;
public string b;
public string c;
}
foreach(MemberInfo mi in A.GetType().GetMembers())
{
//Do Something
}
http://msdn.microsoft.com/en-us/library/424c79hc.aspx[^] Suggests that The GetMembers method does not return members in a particular order. But can I explicitly state the order ?
|
|
|
|
|
AmitDey wrote: But can I explicitly state the order ?
The only real way to do this would be to add an attribute to each field, and then iterate through each field getting the attribute as you go. Once you've pulled them all in, you could sort into order based on the value you've pulled out of the attribute.
|
|
|
|
|
What attribute can I add to the field.
Also how do i get this attribute in MemberInfo class
|
|
|
|
|
You can make your own attribute up. Also, you wouldn't use MemberInfo ; you stated you wanted this for fields, so you would use FieldInfo . FieldInfo exposes an Attributes property that you can iterate through to get your custom attribute.
|
|
|
|
|
There's a few obvious options that come to mind here:
- First, can you just declare them in the order you want them? GetMembers seems to reliably return the same order, which is declaration order within one type of member (i.e. fields). I'm not sure the Framework guarantees that, though.
- Add an attribute with a numeric order value, and sort the final list based on that.
- Have an external list of the names you want in the right order, and iterate through that instead of GetMembers. This has the disadvantage that if you add a field you must remember to add it to this list too.
|
|
|
|
|
I think the key question here is what determines the 'particular order' you want the Members in: which ones do you want to ignore ? To use your Class A example: do you want only the members (Fields) that are defined internally as variables, or are you going to want to distinguish between methods you've defined in the class and the "other stuff" every class gets by default like:
System.String ToString()
Boolean Equals(System.Object)
Int32 GetHashCode()
System.Type GetType()
Void .ctor()
If you are after recognizing 'Fields' only, then MemberType will identify your added Fields for you.
best, Bill
"I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." Bjarne Stroustrop circa 1990
|
|
|
|
|
Why are you trying to do this? It's a little unusual, perhaps there might be an alternative approach to trying to solve your problem.
Regards,
Rob Philpott.
|
|
|
|