|
Did you miss all those replies to your last question where we suggested you read up on how to securely handle passwords in your application? Or did you just choose to ignore them?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
The passwords are well hidden in a field with unknown name...
|
|
|
|
|
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Dear All,
I want to buy Data Access Layer component for my project.
Anyone could give me advise.
Thanks,
LVD
|
|
|
|
|
levanduyet_vn wrote: I want to buy Sorry, this is not an online shopping site.
|
|
|
|
|
Hi Richard,
I just want to get help from expert and get their advise.
|
|
|
|
|
levanduyet_vn wrote: I just want to get help Then you need to explain what your problem is.
|
|
|
|
|
levanduyet_vn wrote: I want to buy Data Access Layer component for my project. Why? There are many free ones available and it's incredibly trivial to write your own DAL.
This space for rent
|
|
|
|
|
Dear Pete,
Please give me the links that I could refer.
Thanks,
LVD
|
|
|
|
|
In the time you took to write that, you could have used Google[^] to find examples. There's a CP one there that shows a simple DAL.
This space for rent
|
|
|
|
|
Hi Pete,
Sure, I have google but I need to have a advise from who have used it.
LVD
|
|
|
|
|
maybe this one[^] works for you?
It is very simple and quick to use. It is also very stable.
It might be limited in possibilities, but using the code you can extend as much as you want.
Hope this helps.
|
|
|
|
|
|
Use Entity Framework and its free, this is just a abstracted data layer.
<tag>I have no tag
|
|
|
|
|
Dear All,
I have tried to amend existing connection string from file App.config and save it back.
The code as following:
<pre lang="c#">
const string DEFAULT_CONNECTION_KEY = "defaultConnection";
ConnectionStringsSection section = (ConnectionStringsSection)config.GetSection("connectionStrings");
sConName = ConfigurationManager.AppSettings[DEFAULT_CONNECTION_KEY];
config.ConnectionStrings.ConnectionStrings[sConName].ConnectionString = sConCrypt;
config.Save(ConfigurationSaveMode.Full, true);
ConfigurationManager.RefreshSection("connectionStrings");
But it show an error.
"An error occurred creating the configuration section handle for log4net: Could not load file or assembly 'log4net' or one of its dependencies. The system cannot find the file specified.
F:\...\bin\Debug\PuFoamControl.vshost.exe.Config line 4"
Anyone can help me.
Thanks,
LVD
|
|
|
|
|
That means that your app.config contains a section for configuring log4net, but the log4net dll is not present in the folder or in the GAC. Make sure it is available, or remove the log4net specific sections manually from your app.config.
|
|
|
|
|
Thank you Hiller.
I delete this section and it run ok.
LVD
|
|
|
|
|
Hi!
I've a bi-dimensional array of labels (a lot of them) so when I make change properties the render is to slow.
My solution (I thought) was make the panel invisible at the init time and then visible when the job is completed but it's visible before the job is completed! I think my app is multithreaded for default.
using System;
using System.Windows.Forms;
namespace Program
{
public partial class Form1 : Form
{
MySqlConnection cn = new MySqlConnection();
iTextSharp.text.pdf.PdfWriter writer;
const int panelHeight = 730;
const int panelWith = 1070;
private Label[,] lbs = new Label[70,50];
public Form1()
{
InitializeComponent();
initBoard();
}
private void initBoard()
{
panel1.Size = new Size(panelWith, panelHeight);
panel1.Visible = false;
anel1.BackColor = SystemColors.ControlText;
int cc, ff;
for (int c = 0; c < 70; c++)
{
cc = c * 15;
for (int f = 0; f < 50; f++)
{
ff = f * 20;
Label lb = new Label();
lbs[c, f] = lb;
lb.Size = new Size(15, 20);
lb.Font = new System.Drawing.Font(label1.Font.Name, 12, FontStyle.Bold);
lb.Location = new System.Drawing.Point(cc + 10, ff + 10);
lb.Parent = panel1;
lb.ForeColor = Color.WhiteSmoke;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
for (int c = 0; c < 70; c++)
for (int f = 0; f < 50; f++)
lbs[c, f].Text = (f % 10).ToString();
panel1.Visible = true;
}
}
}
Any ideas ?
Of course I'm just starting.... this is not the way I should program
modified 29-Feb-16 12:27pm.
|
|
|
|
|
Pablo Bozzolo wrote: this is not the way I should program Very true, 3500 labels to update is far too many. You need to rethink your design, and what you are trying to achieve with this program.
|
|
|
|
|
Of course I know that I want to do (instead of numbers some characters will be placed) and the number of 3500 is not optional.
I'd like to be able to add an event handler to each label in a future so I don't want to use a Richtext or something different to a bunch of controls.
Maybe I can use a GridView (I've no experience in Visual Studio), ...... I hope it will help because If put vertical scrollbar it freeze the GUI because the high number of controls in the Panel.
The question here is WHY I can see when labels are filled if the Panel is invisible!
|
|
|
|
|
If you tell us your ultimate goal here (why do you think you need 3500 labels?) someone might be able to suggest a way to achieve it in a "less strange" way
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Ok
3500 characters are the number of characters I need to see at once in my program to do something with them.
modified 29-Feb-16 16:15pm.
|
|
|
|
|
Why not a single multiline-TextBox? You could put some spaces between the characters to give it a table-like appearance. Otherwise a DataGridView.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Thank you for your answer
I was thinking too to do something like to comment with a multiline-TextBox, so I think I will decouple things to be able to switch easily.
|
|
|
|
|
If your "program" needs to see the 3.5k characters, why are you displaying them to the user. Your ability to manipulate the data is not dependent on the UI. You UI should be collecting user input and displaying results.
Never underestimate the power of human stupidity
RAH
|
|
|
|