|
Thanks Zac. I'll download it and see if I can pull out the ColorPicker as that's what I want.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
I can upload the source to a color picker dialog I made with the control if you want me to.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Yes please, buddy. I'd appreciate that.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
Here you go![^]
The file is the ColorDialogEx.zip one.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Many thanks, Zac. I've downloaded it and I'll look at implementing it into the control I've been working on.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
No problem.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Zac, I ran into a problem which I'll explain. I downloaded the ColorDialogEx, unzipped it and loaded the solution in VS2012, compiled it, successful. There were a couple of minor warnings telling me == and != were implemented but no override for Object.Equals and Object.GetHashCode have been defined, but nothing serious.
I then created a new winform app in 2012 and I added the ColorDialogExe.dll to the General toolbox category. It added a few components. I selected the ColorPickerCombobox component and dropped it on the form. It shows correctly. I didn't change any of the properties, etc.
When I run the app it throws an exception in ImagesUtil's GetToolbarImageList. Here's an extract of the exception:
System.ArgumentException was unhandled
HResult=-2147024809
Message=Resource 'ColorPicker.Resources.popupcontainerbuttons.bmp' cannot be found in class 'resfinder'.
Source=System.Drawing
StackTrace:
at System.Drawing.Bitmap..ctor(Type type, String resource)
at ColorPicker.ImagesUtil.GetToolbarImageList(Type type, String resourceName, Size imageSize, Color transparentColor) in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 13
at ColorPicker.PopupContainerImages.ImageList() in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 63
at ColorPicker.PopupContainerImages.Image(eIndexes index) in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 68
at ColorPicker.DropdownContainer`1.OnPaint(PaintEventArgs e) in c:\Temp\ColorDialogEx\ColorDialogEx\DropdownContainerControl.cs:line 335
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
Do you think I need to do something else before I can use it?
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
Let me look at it again. I thought I fixed that.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Fixed it. Try downloading it again. Same link as before.
I forgot to modify one of the resource finder things.
Why the original author did not use the built in resource management and basically (and incorrectly) rebuilt it is beyond me.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Thank you, Mr. Speedy Zac. I will download it and try again.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
PHS241 wrote: Mr. Speedy Zac.
That's a first. I usually am called 'Slow' by people because I like to think things through before trying them. It usually works out better that way.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Here is my code:
class dbLocalDB : DataManager
{
private System.Data.Common.DbConnectionStringBuilder BldrLocalDB = new System.Data.Common.DbConnectionStringBuilder();
public System.Data.Common.DbConnectionStringBuilder ConnectionString
{
get { return BldrLocalDB; }
set
{
BldrLocalDB.ConnectionString = XenoManager.Properties.Settings.Default.csLocalDB;
}
}
}
public partial class Form1 : Form
{
dbLocalDB LocalDB = new dbLocalDB();
public Form1()
{
InitializeComponent();
try
{
tb_LocalDBServerURL.Text = LocalDB.ConnectionString["Data Source"].ToString();
tb_LocalDBDatabase.Text = LocalDB.ConnectionString["Initial Catalog"].ToString();
tb_LocalDBUsername.Text = LocalDB.ConnectionString["User ID"].ToString();
tb_LocalDBPassword.Text = LocalDB.ConnectionString["Password"].ToString();
}
catch (Exception ex)
{
textBox1.Text = ex.ToString();
}
}
}
I get the following error "System.ArgumentException: Keyword not supported: 'Data Source'. at System.Data.Common.DbConnectionStringBuilder.get_Item(String keyword)"
I think what's happening is BldrLocalDB.ConnectionString isn't being populated. If I had:
System.Data.Common.DbConnectionStringBuilder bldrLocalDB = new System.Data.Common.DbConnectionStringBuilder();
bldrLocalDB.ConnectionString = Properties.Settings.Default.csLocalDB;
in "public partial class Form1 : Form", it'll populate, but how do I populate it in the dbLocalDB class?
Thanks!
|
|
|
|
|
Not every connectionstring provides a datasource[^]; what does the actual string look like?
|
|
|
|
|
Hi,
Ive got a Treeview with scrollable enabled. On my developing PC everything works fine. When i resize my window, the scrollbar appears.
But when I run the .exe on another PC (even when its installed by an setup installer), there are no scrollbars! I've tried on 3 different PCs. All PCs are using Windows 7 and the required .Net4 is installed. I dont know whats the problem. Everything else works . Please help.
Edit: Okay, the Problem appears when i use the treeview in a SplitContainer. Is this a know issue and is there a workaround? i really need those splitcontainers.
Edit: Got it! Each Element within a splitcontainer panel has to have the dock property set to "Fill". Now it works .
Any ideas?
Thanks
|
|
|
|
|
I've done that, although it took me about 6 months to notice than anything was wrong!
|
|
|
|
|
Hi there!
I am trying to compare the rows of a Datagridview and that it removes the rows that are repeated.
I think that I´m doing something wrong, need some of help!!
my mind is not clear today! (maybe x-mas holyday! )
here´s the code:
public void Compare(DataGridView grv)
{
grv.Sort(grv.Columns[0],ListSortDirection.Ascending);
for ( int row = 0; row < grv.Rows.Count; row++)
{
for ( int col = 0; col < grv.Columns.Count; col++)
{
int rowx=1;
if (grv.Rows[row].Cells[col].Value != null && grv.Rows[row].Cells[col].Value.Equals(grv.Rows[rowx].Cells[col].Value))
{
if (col == grv.Columns.Count - 1)
{
grv.Rows.RemoveAt(row);
grv.Sort(grv.Columns[0], ListSortDirection.Descending);
}
}
else
{
grv.FirstDisplayedScrollingRowIndex = grv.RowCount - 1;
grv.Rows[grv.RowCount - 1].Selected = true;
}
}
}
}
|
|
|
|
|
hi,
you forgot the a counter if all cols in a row are equal to the ones in rowx? in this case you would delete the row always if the last col is equal. Maybe thats it?
cu
|
|
|
|
|
Hi all,
Adding an optional field to my class instantly prevents older versions from being deserialized:
[OptionalField]
public Aurigma.GraphicsMill.Bitmap origStaticImage = null;
This is baffling; optional fields are supposed to PREVENT this! The [NonSerialized] attribute produces the same behavior. I have many other optional fields in this class that have been added over the years, and they work perfectly. If I remove the field, I can again deserialize older versions.
Any suggestions how to get around this? Thanks!
====================
Solved it; an exception was being thrown in my RunAfterDeserialization method, making it appear that deserialization had failed. Doh!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
modified 6-Dec-12 11:50am.
|
|
|
|
|
Hi thanks in advance,
I really need to know is how to expose a layer of memory data on data tables that can be updated from time to time and who are available for consultation in memory for faster access and query the database to each time.
|
|
|
|
|
RICARDOR270874 wrote: I really need to know is how to expose a layer of memory data on data tables that can be updated from time to time and who are available for consultation in memory for faster access and query the database to each time.
Memory is a volatile space; loose power to the PC, you loose data.
If your database "feels" slow, I suggest you first look at the structure, rethink the indexes, partitioning. Reading data from a harddisk (not even talking SSD) is very fast, and unlikely to be the bottleneck.
If you "want" an in-memory-database, take a look at TimesTen[^].
|
|
|
|
|
I have the need to localize the ColorDialog at runtime. I know it grabs its culture from the version of Windows running on the machine.
I have an app that I allow switching the language through its configuration and it works fine to set the strings using ResourceManager class. I would like to do something similar with the ColorDialog also.
Is there any way to do it easily? I am using C# for my app.
|
|
|
|
|
I don't think there is an easy way for doing that. What I am doing is hosting this control[^] in a custom dialog and localizing that dialog.
I am sure searching this site will bring up some more information, but I am too tired to do anything else right now.
Hope this helps!
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
I have an enum definition that I wanted to put in my interface, but I'm getting a compilation error:
Mode: interfaces cannot declare types
public enum Mode
{
Off = 0,
On1 = 1,
On2 = 2
}
and the interface has a method in it that classes implementing it must define, where I want to pass the mode as a param:
int ProcessTWrit(ref Byte[] wDat, ref Byte[] sDat, ref Byte[] dataCk, int theMode);
So, I had to put separate definitions of the enum in both my El.cs and the class that it's calling through the interface.
I have my El.cs that I have also defined the enum above and want to call the above method:
result = cr.ProcessTWrit(ref wDat, ref sDat, ref dataCk, (int)Mode.On1);
My question is, is there a way that I can put my Mode enum in the interface so that the calling class and the receiving class can pass/use the enum values, so I don't have to have multiple definitions of the enum? There doesn't seem to be any other class that it would make sense for me to put the Mode definition in. This is a factory implementation. It looks like this:
El.cs =======> iCR.cs ==========================> CR5.cs
..........calls................ ProcessTWrit()................................................................ ProcessTWrit(){}
with multiple definitions of Mode in El.cs and CR5.cs. The three classes discussed above are in separate Visual Studio projects, if it makes a difference.
|
|
|
|
|
If the existing projects don't reference each other then the only other way is to create another common project (dll class library), put any common objects in there and reference the new project (after building) in the existing ones
|
|
|
|
|
MichCl wrote: class ... to put the Mode definition in
An enumeration is a type and doesn't need to be in a class. You could put the enumeration and interface definition in their own project/DLL and reference it from the others, but generally a DLL should hold more than just those two things.
|
|
|
|