|
You were right , A big datagridview !
I was about to say the same
I know nothing , I know nothing ...
|
|
|
|
|
Thanks for your replies,
the database is 300 MB with 6 months, iam thinking about the size after 2 or 3 or even 10 years.
PIEBALDconsult wrote: Users shouldn't be scrolling data at all.
about user shouldnt scrolling data, the case is user can use some filters to search the data and the result of this search may be more than 5000 records and will be displayed in the datagrid.
PIEBALDconsult wrote: Mdallal84 wrote:
partial loading
Like paging?
and the partial loading i tried like paging yes but not like paging grid in the web and user should flip pages to view data i wanted to use paging through scrolling the grid( MS source safe 2005) use partial loading on scrolling i think.
after doing some search i found something called virtual mode in the datagrid but its not working with n-tiers
are there any solution to implement the partial loading or any idea to load these huge data (remember the slow connection of VPN)
thanks all
|
|
|
|
|
Hi
How I can create a text box that doesn't write in English. I want write in box in my language (Persian) without using Alt+Shift ?
|
|
|
|
|
You have to switch the default language for the system the application is running on.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
When the TextBox GetFoucs , or
When your Application Start ( recommended )
Run This Code
private void InitCurrentInputLanguage()
{
foreach (InputLanguage ArabicLang in InputLanguage.InstalledInputLanguages)
{
if (ArabicLang.LayoutName.Equals("Arabic (101)"))
{
InputLanguage.CurrentInputLanguage = ArabicLang;
}
}
}
I am sorry I don't know the Palestinian language code ,
How ever you can get it from Control Panel at "Religion and Option settings->Languages"
hope this help
I know nothing , I know nothing ...
|
|
|
|
|
Wow, that's something new:
"Religion and Option settings->Languages"
And when you select "Zen Buddhist" everything will go to /dev/null!
|
|
|
|
|
ok
I know nothing , I know nothing ...
|
|
|
|
|
Stark DaFixzer wrote: Religion and Option settings->Languages
Huh ? are you meaning "Regional and Language Options" ?
Watched code never compiles.
|
|
|
|
|
I hope not. This one's much more metaphysical. can just imagine it telling me, "Error. Agnostic interface detected."
"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
|
|
|
|
|
|
Hi all,
I have a Windows Form Application. On the Form I have a PictureBox.
I want to zoom this image in picturebox and display the zoomed image again in picturebox.
For this i have written below code. I am new to C# and hence dont know why the below code is not working.
OnZoomButtonClick()
{
Bitmap b = (Bitmap) pictureBox1.Image;
Graphics g = Graphics.FromImage(b);
// 3x zoom
g.ScaleTransform(3, 3);
pictureBox1.Image = b;
pictureBox1.Refresh();
}
Thanks in advance.
|
|
|
|
|
Hi,
no that won't work, as the Matrix stuff and the Transform methods only have their effect on the draw commands such as Graphics.DrawImage().
This would work, for some control, based on class members x, y, scale:
private void myControl_Paint(object sender, PaintEventArgs e) }
Graphics g=e.Graphics;
g.ScaleTransform(scale, scaale);
g.DrawImage(myImage, x, y);
}
I would use a Panel for this, as a PictureBox is not helping a bit, all you need is a surface, a canvas, on which your drawing is happening. A PictureBox is meant for showing an image as is, not for drawing anything special.
|
|
|
|
|
I cannot use other controls. It has to be Picture Box.
But it is mandatory to call drawimage in Paint message.
I want to zoom the image on the button click and display the zoomed image in picture box.
If user clicks 2-3 time it should zoom 2-3 times.
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:15am.
|
|
|
|
|
Hi I have modified the code as below and it is working: -
Bitmap originalBitmap = picturebox.Image;
Bitmap newBitmap = new Bitmap(originalBitmap);
//Creates a new Graphics object from the specified Image object.
Graphics g = Graphics.FromImage(newBitmap);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.ScaleTransform(Zoomfactor, Zoomfactor);
g.DrawImage(originalBitmap, 0, 0);
picturebox.Image = newBitmap;
Thanks a lot.
|
|
|
|
|
Hi, i started from some example,
http://www.dofactory.com/Patterns/PatternDecorator.aspx#_self1[^]
then added a var in the Component class.
In the end, seems d2 cannot access var,
i mean d2.component.var is not there,
instead it's sth. like d2.base.base.component.var.
This looks different from c++, anyone knows how to get d2.component.var directly ?
using System;
namespace DoFactory.GangOfFour.Decorator.Structural
{
class MainApp
{
static void Main()
{
ConcreteComponent c = new ConcreteComponent(5);
ConcreteDecoratorA d1 = new ConcreteDecoratorA();
ConcreteDecoratorB d2 = new ConcreteDecoratorB();
d1.SetComponent(c);
d2.SetComponent(d1);
d2.Operation();
}
}
abstract class Component
{
public int var; // i added this
public abstract void Operation();
public Component(int n){var = n;} // i added this
}
class ConcreteComponent : Component
{
public ConcreteComponent(int n):base(n){}
public override void Operation()
{
Console.WriteLine("ConcreteComponent.Operation() {0}", var);
}
}
abstract class Decorator : Component
{
protected Component component;
public void SetComponent(Component component)
{
this.component = component;
}
public override void Operation()
{
if (component != null)
{
component.Operation();
}
}
}
class ConcreteDecoratorA : Decorator
{
public override void Operation()
{
base.Operation();
Console.WriteLine("ConcreteDecoratorA.Operation()");
}
}
class ConcreteDecoratorB : Decorator
{
public override void Operation()
{
base.Operation();
AddedBehavior();
Console.WriteLine("ConcreteDecoratorB.Operation()");
}
void AddedBehavior()
{
}
}
}
wow
|
|
|
|
|
Can't read that, won't read that.
However, I'll say that a base class should know nothing about any possible derived classes.
|
|
|
|
|
ok, this is the compiled code, in the end i got "get 0", instead of "get 30".
why ?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test2
{
class MainApp
{
static void Main()
{
ConcreteComponent c = new ConcreteComponent(5);
ConcreteDecoratorA d1 = new ConcreteDecoratorA();
ConcreteDecoratorB d2 = new ConcreteDecoratorB();
d1.SetComponent(c);
d2.SetComponent(d1);
d2.Operation();
}
}
abstract class Component
{
public int var; // i added this
public Component(int n) { var = n;}
public Component() { var = 0;}
public abstract void Operation();
public void get()
{
Console.WriteLine("get {0}", var);
}
//public Component(int n) { var = n; } // i added this
}
class ConcreteComponent : Component
{
public ConcreteComponent(int n):base(n){}
public override void Operation()
{
Console.WriteLine("ConcreteComponent.Operation()");
}
}
abstract class Decorator : Component
{
protected Component localComponent;
public void SetComponent(Component component)
{
this.localComponent = component;
}
public override void Operation()
{
if (localComponent != null)
{
localComponent.Operation();
}
}
}
class ConcreteDecoratorA : Decorator
{
public override void Operation()
{
base.Operation();
Console.WriteLine("ConcreteDecoratorA.Operation()");
localComponent.var *= 2;
localComponent.get();
}
}
class ConcreteDecoratorB : Decorator
{
public override void Operation()
{
base.Operation();
AddedBehavior();
Console.WriteLine("ConcreteDecoratorB.Operation()");
localComponent.var *= 3;
localComponent.get();
}
void AddedBehavior()
{
Console.WriteLine("AddBehavior()");
}
}
}
wow
|
|
|
|
|
The line public Component(int n){var = n;} is not ok for an abstract class - it contains a public constructor.
For accessing var in d2, use d2.var .
|
|
|
|
|
Hi all,
I'm going to make a dbf file using c#.net , in my case I need to make a dbf file which could be stored on floppy and moved to insurance company , and of course it must be formatted in standard details that informed by the company, and the problem is ....
How to make dbf file in c#? of course for free! I searched google but there is no related result
Thank You
|
|
|
|
|
Make Empty dbf file , and store it in your application resource , or application location
Then fill it with data "Using OleDB" , and copy it to floppy
HINT Code :
OleDbConnection ccc = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath.Substring(0, filepath.LastIndexOf("\\")) + ";Extended Properties=dBASE IV;");
ccc.Open();
OleDbCommand cmd1 = new OleDbCommand("Select * From " + filepath + "smsout.dbf", ccc);
OleDbDataReader dr1 = cmd1.ExecuteReader();
if (dr1.HasRows)
{
DataTable dt1 = new DataTable();
dt1.Load(dr1);
}
ccc.Close();
BTW:
Is floppy still in use ?
I know nothing , I know nothing ...
|
|
|
|
|
mersad00 wrote: could be stored on floppy
Your about five years too late.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
But I thought dbfs could only be stored on floppy.
|
|
|
|
|
As far as I can see it's not dependent on storage medium. But I meant that I haven't seen a floppy in years. Useless to have a file no one can use.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: to have a file no one can use
I think that's his goal.
|
|
|
|