|
is there any other event rather than Datagridview _EditingControlShowing which e.control need to be cast to combobox type
sadara
|
|
|
|
|
Hello all, Here is my scenario.
1. Client App (Smart/Web) installed on Machine A.
2. Remoting Object is hosted in IIS on Machine A or B.
I need to create a unit testing (am using NUnit , but that doesn't matter i guess), where client makes a call and transfers some data in call context. Request hits IIS/Remoting object and based on information in call context server does something.
1. Unit testing for Client components , whether it is sending right information, is easy just call components of client.
2. I need to test whether the same data is properly available to server (transported properly to server) and processed it. I am not sure how to proceed and create a scenario Remoting (hosted in IIS) and server Unit Test components.
Something like Client->Remoting object on IIS->Server process request.
Any suggestions greatly appreciated. (Am using HTTPChannel for remoting)
Thanks.
|
|
|
|
|
Hi friends,
What is maximum size of data we can write to port & read from port?
Is there any limit to it?
Reagards
Shiva
|
|
|
|
|
if you use System.IO.Ports.SerialPort component the maximum size of data to read = SerialPort.ReadBufferSize and maximum size of data to write = SerialPort.WriteBufferSize. But you can adjust them as necessary.
The ReadBufferSize property default 4096 ignores any value smaller than 4096.
The WriteBufferSize property default 2048.
i don't know the maximum limit, but i think is Int32.MaxValue
any ideas?
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
hi friends
I have created one ssis package using interface, it works fine
flow is like
oledbdatasource ->
conditional splits like
--> if action = 1 then oledb command 1 -> oledbcommand2
if action = 2 then oledb command 3 -> oledbcommand4
default output of conditional split
to oledb destination
i want to do this using C#.
all the components like conditional split and oledbcommand should be add on the fly.
any one can give me a hint or url for this.
thanks so much
|
|
|
|
|
i want to create report with report viewer and then came up this error at runtime
here is my code
inventoryInfoReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; inventoryInfoReport.LocalReport.ReportPath = CitronConfiguration.ReportPath + "InventoryInfoReport.rdlc";
InventoryInfoDataSet inventoryDataSetObj = new InventoryInfoDataSet();
IList<inventorycatalog> inventoryCatalogList = new InventoryCatalogSystem().GetInventoryCatalogList();
foreach (InventoryCatalog inventoryCatalog in inventoryCatalogList)
{
DataRow row = inventoryDataSetObj.Tables[0].NewRow();
row["InventoryId"] = inventoryCatalog.InventoryId;
row["InventoryName"] = inventoryCatalog.InventoryName;
row["Stock"] = Library.DecimalToCurrency(inventoryCatalog.Stock);
row["IdealStock"] = Library.DecimalToCurrency(inventoryCatalog.IdealStock);
row["Balance"] = Library.DecimalToCurrency(inventoryCatalog.Balance);
inventoryDataSetObj.Tables[0].Rows.Add(row);
}
ReportDataSource objDataSource = new ReportDataSource("InventoryInfoDataSet_DataTable1", inventoryDataSetObj.Tables[0]);
inventoryInfoReport.LocalReport.DataSources.Add(objDataSource); <--the error was here
can some one help me please?
|
|
|
|
|
Which line blows up ? I assume you're mixing types and need to do some sort of conversion somewhere.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
inventoryInfoReport.LocalReport.DataSources.Add(objDataSource); <--the error was at this line
i use report viewer, C#.NET with Gizmox, and i can't figure out what i've done wrong because until this part
ReportDataSource objDataSource = new ReportDataSource("InventoryInfoDataSet_DataTable1", inventoryDataSetObj.Tables[0]); <- this one
inventoryInfoReport.LocalReport.DataSources.Add(objDataSource); <--the error was at this line
i can see the data table clearly it shows all the data that i want to show on the report viewer, but when i hit F10 to the next line, it shows error like this "Attempted to access an element as a type incompatible with the array", i've checked my previous code i don't see any differences to this one, but how come this one is error, can u tell me why?
|
|
|
|
|
OK, what code runs when the data is bound ? Id assume the issue is the types of the objects in the datasource.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
inventoryInfoReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; inventoryInfoReport.LocalReport.ReportPath = CitronConfiguration.ReportPath + "InventoryInfoReport.rdlc";
InventoryInfoDataSet inventoryDataSetObj = new InventoryInfoDataSet();
IList<inventorycatalog> inventoryCatalogList = new InventoryCatalogSystem().GetInventoryCatalogList();
foreach (InventoryCatalog inventoryCatalog in inventoryCatalogList)
{
DataRow row = inventoryDataSetObj.Tables[0].NewRow();
row["InventoryId"] = inventoryCatalog.InventoryId;
row["InventoryName"] = inventoryCatalog.InventoryName;
row["Stock"] = Library.DecimalToCurrency(inventoryCatalog.Stock);
row["IdealStock"] = Library.DecimalToCurrency(inventoryCatalog.IdealStock);
row["Balance"] = Library.DecimalToCurrency(inventoryCatalog.Balance);
inventoryDataSetObj.Tables[0].Rows.Add(row);
}
ReportDataSource objDataSource = new ReportDataSource("InventoryInfoDataSet_DataTable1", inventoryDataSetObj.Tables[0]); <- This one
inventoryInfoReport.LocalReport.DataSources.Add(objDataSource); <--the error was at this line
|
|
|
|
|
Hello
I have the following scenario.
I have one exe and some DLL.
When both are in the same folder then the exe run fine.
The DLL are used to create a report in a network file.( I have full access to these folders ).
But when I put the DLL in the subfolder(Lib) and change the config file to use then, then I am getting FileIOpermission exception. I thought it is a CAS problem and trying to solve.
Any hint will be a very helpful.
Regards
Anil
|
|
|
|
|
How's the read/write access to that folder?
|
|
|
|
|
Hi professionals
i want a c# code which allow me to record small sound waves whatever extension from a mic.
thanks so much
bahaa
|
|
|
|
|
Try this...
<br />
Process soundRec = new Process();<br />
soundRec.StartInfo.FileName = "sndrec32.exe";<br />
soundRec.Start();<br />
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
thanks for ur reply but i want to press a button (record) for example so the program start to record and each time i press (record) it saves the wav automatic like 1.wav,2.wav,3.wav etc in a specific location.
thanks for ur time
bahaa
|
|
|
|
|
Ah I see you wanted a customized version of the sound recorder. I think the reply below points to a link that can help you out
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Can this article[^] helps you?
I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]
My blog
|
|
|
|
|
Hello, I am just starting out with C# and I need an ideea on how to go ahead with my software. This is not a direct programming question but more like a programming approach.
I am making an application in c# and .net (vs 20008) and my software contains a tab control.
I add tabs in the tab control from 5 buttons (each button adds a different tab). The tabs will contain different forms in it.
Now I store every tab in a list, just so I can delete them with ease.
Now for my dilema. Each of the 5 buttons creates a different object, a different form (a window that contains forms) in the tab.
It's easy to store the tabs in a list becouse they all have the same type. Give me an ideea on how I can store different objects in the tab control (so every tab of the tab control will have a single object).
I need to know what object I have in a tab, so that when I delete the tab, I also delete the object.
I don't know if I explain correctly, but I here is an image below, just so you have a better picture of what I want :
www.sodevrom.net/object1.jpg
So here is what I have got so far :
*************a list that contains the tabs :
public List<control> lTabs=new List<control>();
*************I add the tabs like this : (the text deppends on what button I click on)
lTabs.Add(new TabPage());
lTabs[lTabs.Count - 1].Text = "Button 1";
cTab.Controls.Add(lTabs[lTabs.Count - 1]);
*************I delete the tabs like this :
lTabs[0].Dispose();
So how can I asign some objects so I can do something like this :
lObjs[lObjs.Count - 1]=new Object1 ( or object 2 or object 3 deppending on the button I press)
and
lObjs.destroy();
Thank you in advance
|
|
|
|
|
I'm not sure I understand the problem correctly, but you can always add an arbitrary number of controls to a Control via its Controls collection. In your case it would look like this:
private void button_Click(object sender, EventArgs e)
{
TabPage tabPage = new TabPage(((Button)sender).Text);
Label label = new Label();
label.Text = "Label";
label.Location = new Point(10, 10);
label.Size = new Size(100, 36);
Button button = new Button();
button.Text = "Button";
button.Location = new Point(10, 50);
button.Size = new Size(100, 36);
tabPage.Controls.Add(label);
tabPage.Controls.Add(button);
tabControl1.TabPages.Add(tabPage);
}
There's no need to manually destroy the controls unless they need to be disposed.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
Thank you for the reply but my question is more on how to go on with C#, a technique on how to think.
But anyways, if I add controls in a tab page, and if I delete the tab page, are the controls from the tab page auto deleted ?
And again, let say I want to refer to an object that I added in a tab page, how can I add it so I can keep evidence of where the object is. Let me give you a better example :
Tab Control
->Tab Page1
->object1 (generated from class Object1)
->Tab Page2
->object2 (generated from class Object1)
->Tab Page3
->object3 (generated from class Object2).
How can I store the 3 objects so I can access them with ease. As I sayed, I can access the tab pages very easy :
lTabs[0]
I can't do the save for the objects. I would want to make it like this :
lOBj[0]
I can't do that becouse object1, and 3 (or 2 and 3) are different, and I can't make a list to store objects from different classes, right ?
Did I explain good now ?
|
|
|
|
|
sodevrom wrote:
But anyways, if I add controls in a tab page, and if I delete the tab page, are the controls from the tab page auto deleted ?
Unless the controls contain no unmanaged resources there should be no problems, but I'm not entirely sure myself.
sodevrom wrote:
How can I store the 3 objects so I can access them with ease. As I sayed, I can access the tab pages very easy :
lTabs[0]
I can't do the save for the objects. I would want to make it like this :
lOBj[0]
I can't do that becouse object1, and 3 (or 2 and 3) are different, and I can't make a list to store objects from different classes, right ?
Do you want to store multiple objects per tab page or only one object per tab page?
If it's only one object per tab page, then you can put it into the Tag property of the tab page and access it like that: object obj = lTabs[index].Tag
If you want to store multiple objects per tab page, then you could also store a List<object> into the Tag property. Another solution would be to store this array in a Dictionary<TabPage, List<object>> and access the list ob objects via List<object> objects = dic[TabPage];
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all,
Im having a problem with what should be really easy!! I have BindingList of type MyObject. MyObject has 2 properties, Name and Description...
I can bind the BindingList to a listview no problem using DisplayMember and DataSource. But what i really want is so when I select an item in the listview, i want 2 textboxes to bind to the current item and let me change the value of these 2 items, but as i edit the Name textbox I want it to change the listview??
Is this 2way databinding?
Any ideas on how to acheive this? Im assuming its possible!
|
|
|
|
|
Hi johnson,
what kind of datasource you have? are you filling your listviews, textboxes and other stuff with data from a dtabase right?
I ussualy use comboxes and textboxes, listview i dont use but i think they work the same.
So, you fill you listview with data, right? and you do some editing in the textboxes, right? and you want that changes o appear in the listview i suppose.
Listen johnson, you dont really edit the listview! you edit the database (have to create one if you dont have one)!
1) Fill your listview with data from the database, and bind your texboxes to the listview.
2) When you what to edit listview from the textboxes, you will have to trigger a sql store_procedure (using sql server) that edits a record, after trigger another procedure the refreshs data so new record(or chanded record) appear in your listview.
Again, you edit/delete/add records in a database not in the listview
GoodLuck
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi there! thanks for the heads up! ill do a bit of digging in the week and hopefully get this problem sorted!
once again - thanks for your help!
|
|
|
|
|
Hey.
After googling for an adament amount of time, I found that you can't (apparently) apply transparency to a non-client region of a control.
So the alternative is to have the control inherit the BackColor of the parent container.
The problem is, my Parent control has a gradient background that's fully customizable. So I cannot set a specific BackColor for the control to paint.
Each control has the functions DrawToBitmap() which is usable, but i'm really struggling having it apply to my control.
I'm trying to find the specific background that is located at the position of the non-client region for my control, but it's simply not working.
Currently i'm using:
Graphics Root = Parent.CreateGraphics();
Bitmap RootImage = new Bitmap(e.ClipRectangle.Width, e.ClipRectangle.Height);
Parent.DrawToBitmap(
RootImage,
new Rectangle(
this.Left,
this.Top,
e.ClipRectangle.Width + this.Left,
CaptionOffset
));
e.Graphics.DrawImage(RootImage, new Point(-this.Left, -this.Top));
And this code is as close as I could get it to work. The e.ClipRectangle is the Rectangle within the actual control itself (ie, x will simply always be 0). I'm assuming that by passing this.Left into the Rectangle within the DrawToBitmap function will grab the graphics from the left of the parent control, but it's not working. Not only is the Bitmap RootImage smaller than the actual region I want (by about 8px in width), but when I try to paint it to a second control within the parent container, it doesn't draw a background at all.
Here's an image of the problem[^]. The first panel only displays a part of the background, and the second doesn't display any at all.
If anyone can help or provide more information on the DrawToBitmap function, it'd be much appreciated.
Thanks!
|
|
|
|