 |

|
I need to calculate total grades for students with files and arrays. user first enters course they are calculating grades from. all data files use this course file as part of their name. Outer loop to read the records from the master name file. Inner loop or loop insidefunction to read the records for each student.When processing the records from a student file each one should be done separately and not assumed they are grouped in any particular order.
Program reads a record, decides what category it is in updates the running total for that category. Once the entire file has been read, you can compute the average for each category based on the number of items that should be in that category, which may be more than the number of records in the file for items turned in.
I am horrible and I mean horrible at this and I have literally put in about 35 hours into trying to make this work and this is my 8th program I have redone and really need any guidance on what I should do or if I should restart again or what I am doing wrong.
I am receiving errors on line 29 "unexpected symbol 'while' in class,struct, or interface member declaration and
line 29 and 32 "unexpected symbol ')' in class, struct or interface member declaration"
line 36 "unexpected symbol 'string',expecting 'class','delegate', 'enum',..."
using System;
using System.IO;
using System.Collections.Generic;
using IntroCS;
namespace GradeProgram {
class Gradebook {
static void Main()
{
string fileName = UIF.PromptLine ("Please enter the comp course with no spaces: ");
string categoryFileName = "categories_" + fileName + ".txt";
var reader = new StreamReader (categoryFileName);
while (!reader.EndOfStream) {
string line = reader.ReadLine ();
Console.WriteLine (line);
}
}
string studentFileName = "student_" + fileName + ".txt";
var reader2 = new StreamReader (studentFileName);
while (!reader2.EndOfStream) {
string student = reader2.ReadLine ();
Console.WriteLine (student);
}
}
static string[] GetStringArray(string input)
{
string[] parts = input.Split(',');
return parts;
}
static int[] GetIntArray(string input)
{
string[] parts = input.Split(',');
int[] intparts = new int[parts.Length];
for (int i = 0; i < parts.Length; i++)
intparts[i] = int.Parse(parts[i]);
return intparts;
}
static int codeIndex(string code, string[] categories)
{
for (int i = 0; i < categories.Length; i++)
{
if (categories[i].StartsWith(code))
{
return i;
}
}
return -1;
}
static string[] GetCatNames(string file)
{
var reader = new StreamReader(file);
string categories = reader.ReadLine();
string[] catnames = GetStringArray(categories);
for (int i = 0; i < catnames.Length; i++)
Console.WriteLine("Category at position {0} = {1}", i, catnames[i]);
return catnames;
}
static int[] GetWeights(string file)
{
int targetLine = 2;
int counter = 1;
int[] weightvalues = new int[0];
var reader = new StreamReader(file);
while (!reader.EndOfStream)
{
string weights = reader.ReadLine();
if (counter == targetLine)
{
weightvalues = GetIntArray(weights);
}
counter++;
}
for (int i = 0; i < weightvalues.Length; i++)
{
Console.WriteLine("Category at position {0} = {1}", i, weightvalues[i]);
}
return weightvalues;
}
static int[] GetNumOfItems(string file)
{
int targetLine = 3;
int counter = 1;
int[] itemsvalues = new int[0];
var reader = new StreamReader(file);
while (!reader.EndOfStream)
{
string items = reader.ReadLine();
if (counter == targetLine)
{
itemsvalues = GetIntArray(items);
}
counter++;
}
for (int i = 0; i < itemsvalues.Length; i++)
{
Console.WriteLine("Category at position {0} = {1}", i, itemsvalues[i]);
}
return itemsvalues;
}
static string[] GetStudent(string file)
{
var reader = new StreamReader(file);
while (!reader.EndOfStream)
{
string items = reader.ReadLine();
string[] itemsvalues = GetStringArray(items);
for (int i = 0; i < itemsvalues.Length; i++)
Console.WriteLine("Category at position {0} = {1}", i, itemsvalues[i]);
}
return null;
}
}}
|
|
|
|

|
i have smartcard dll which support smartcardmanager.oncardinsertevnthanler. How i use the event handler for detcting the event when i insert the card into reader or ejec from reader.iam using c# language
|
|
|
|

|
Hi,
I am trying to export gridview data to excel. It is working fine except the first row in the excel is blank.
The code i used for the excel is shown below:
HttpContext.Current.Response.Clear(); Response.ClearContent();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=GrpFile.xls");
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
HtmlForm frm = new HtmlForm();
gvCampGrp.Parent.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(gvCampGrp);
frm.RenderControl(hw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();
I also included the following code.
public override void VerifyRenderingInServerForm(Control control)
{
return;
}
How to export data to excel without making its first row empty?
Please help.
Dhyanga
|
|
|
|

|
hello everyone. i believe u have seen the apps that put some christmas lights on ur screen that keep blinking while u use ur desktop or whatever. i am planning to write a similar app. i have quite a good programming experience but i am not sure how to achieve this thing, i mean how to i make a bulb appear on desktop while the desktop can be used by the user aswell. btw i am working in c#.
|
|
|
|
 |
Message Automatically Removed
|
|
|
|

|
i have a task to show phone number on application when any calls come.scenario is, there is a restaurant where customer calling for order. when call comes there phone number show on our .net application. Please tell me how i achieve this task.
|
|
|
|

|
Hi all,
I've a strange problem on my app.
I have one app that works fine and uses this instruction:
<pre lang="c#"> xlWorkbook = excelApp.Workbooks.Open();
</pre>
This works fine and all is ok.
The problem occurs when I run the .exe from another program, I execute (Process myProcess = Process.Start(myProcessInfo);) and the program start correctly, but crash on the instruction xlWorkbook = excelApp.Workbooks.Open();.
Is very strange because if I run the .exe via command line all works fine... The app that execute the other one run with administrator privileges...
Someone can help me?
Thank you very much!
|
|
|
|

|
i want to make a crystal report that it takes as a parameter for example, the user choose 3 months.
the user can choose more that one months..
How can i put something that the user can choose a range of months
in parameters of crystal report in visual studio 2010( i use c# for my whole project)
thanks
modified 10 Apr '13 - 10:09.
|
|
|
|

|
What is the purpose of using the "protected" access modifier ?
|
|
|
|

|
I have a windows form project that I started before installing the SharpGL extension.
The SharpGL library works fine if I create a SharpGL project. But when I try to add a SharpGL control in my project, it says that it cannot find the namespace "OpenGLControl". Having in mind that I added all the references, it's kind of strange, but it's true.
When I type SharpGL.OpenGLControl, it doesn't appear in the autocomplete.
How can I add an OpenGLControl without starting my project from scracth?
|
|
|
|

|
Hi everyone.
I wanna design an expert system with clips (inference engine)
and c#(user interface). My problem is integrating clips with c#. I used clipsnet and clipslib but I couldn'd make any connection between these 2 languages. Infact I couldn't load my clips file in c#!
public CLIPSNet.DataTypes.Multifield h = new CLIPSNet.DataTypes.Multifield();
private void Form1_Load(object sender, EventArgs e)
{
CLIPSNet.Environment j = new CLIPSNet.Environment();
int i = j.Load(@"..\..\..\instance.clp");
j.Reset();
would u do me a favor and help me to solve it's problem?
what should I do?
|
|
|
|

|
I have a console app in C# that runs for a very long time. Basically, it loops through from one to a brazillian for days on end. Depending on conditions met, it will print certain output. Nothing unusual there.
Is it possible to press a key and have it tell me which loop index I'm in? I do not want to programmatically print the index every Nth time or second. I would rather have it wait until I press a key and have it spit it out.
I guess from a threaded Windows app, this would be easier. I'm trying to see if there's a way to do it from a command-line app on-demand, without having to do it iteratively.
|
|
|
|

|
I'm trying for manytime to do this... I don't get how to write a Main class which in it an int List gets values from the user, here is what I did so far... It makes a Run Time error:
int x;
List<int> lis = new List<int>();
Node<int> chou = lis.GetFirst();
x = int.Parse(Console.ReadLine());
lis.GetFirst().SetInfo(x);
while (chou.GetInfo() != -1)
{
x = int.Parse(Console.ReadLine());
chou.SetInfo(x);
chou = chou.GetNext();
}
All I need to know is what is the correct code.. Thank u very much תודה רבה
|
|
|
|

|
there is a program of a document manager that pushes the document to a Queue
There are 3 questions on 3 different threads, base on the same program
this is the THIRD one
the program is
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
namespace scratchpad3
{
class Program
{
public static void Main()
{
var dm = new DocumentManager<Document>(); dm.AddDocument(new Document("Title A", "Sample A")); dm.AddDocument(new Document("Title B", "Sample B"));
dm.DisplayAllDocuments();
if (dm.IsDocumentAvailable)
{
Document d = dm.GetDocument();
Console.WriteLine(d.Content);
Console.Read();
}
}
}
public class DocumentManager<T>
where T : IDocument {
private readonly Queue<T> documentQueue = new Queue<T>();
public void AddDocument(T doc) {
lock (this)
{
documentQueue.Enqueue(doc);
}
}
public bool IsDocumentAvailable
{
get { return documentQueue.Count > 0; }
}
public T GetDocument()
{
T doc = default(T);
lock (this)
{
doc = documentQueue.Dequeue();
}
return doc;
}
public void DisplayAllDocuments()
{
foreach (T doc in documentQueue)
{
Console.WriteLine(doc.Title);
}
}
}
public interface IDocument
{
string Title { get; set; }
string Content { get; set; }
}
public class Document : IDocument
{
public Document()
{
}
public Document(string title, string content)
{
this.Title = title;
this.Content = content;
}
public string Title { get; set; }
public string Content { get; set; }
}
}
Q3) Let us take a view of this part of the coding:-
public void AddDocument(T doc) // /
|
|
|
|

|
there is a program of a document manager that pushes the document to a Queue
There are 3 questions on 3 different threads, base on the same program
this is the 2nd question
the program is :-
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
namespace scratchpad3
{
class Program
{
public static void Main()
{
var dm = new DocumentManager<Document>(); dm.AddDocument(new Document("Title A", "Sample A")); dm.AddDocument(new Document("Title B", "Sample B"));
dm.DisplayAllDocuments();
if (dm.IsDocumentAvailable)
{
Document d = dm.GetDocument();
Console.WriteLine(d.Content);
Console.Read();
}
}
}
public class DocumentManager<T>
where T : IDocument {
private readonly Queue<T> documentQueue = new Queue<T>();
public void AddDocument(T doc) {
lock (this)
{
documentQueue.Enqueue(doc);
}
}
public bool IsDocumentAvailable
{
get { return documentQueue.Count > 0; }
}
public T GetDocument()
{
T doc = default(T);
lock (this)
{
doc = documentQueue.Dequeue();
}
return doc;
}
public void DisplayAllDocuments()
{
foreach (T doc in documentQueue)
{
Console.WriteLine(doc.Title);
}
}
}
public interface IDocument
{
string Title { get; set; }
string Content { get; set; }
}
public class Document : IDocument
{
public Document()
{
}
public Document(string title, string content)
{
this.Title = title;
this.Content = content;
}
public string Title { get; set; }
public string Content { get; set; }
}
}
Please refer to line indicated as "//************************1
"
& also Please refer to line indicated as "//************************2"
Q2) Here if we note this :
public class DocumentManager<T>
where T : IDocument {// code}
var dm = new DocumentManager<Document>();
when T is constrained for type IDocument , how could we manage:
<Document
>
|
|
|
|

|
there is a program of a document manager that pushes the document to a Queue
There are 3 questions on 3 different threads, base on the same program
the program is :-
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
namespace scratchpad3
{
class Program
{
public static void Main()
{
var dm = new DocumentManager<Document>(); dm.AddDocument(new Document("Title A", "Sample A")); dm.AddDocument(new Document("Title B", "Sample B"));
dm.DisplayAllDocuments();
if (dm.IsDocumentAvailable)
{
Document d = dm.GetDocument();
Console.WriteLine(d.Content);
Console.Read();
}
}
}
public class DocumentManager<T>
where T : IDocument {
private readonly Queue<T> documentQueue = new Queue<T>();
public void AddDocument(T doc) {
lock (this)
{
documentQueue.Enqueue(doc);
}
}
public bool IsDocumentAvailable
{
get { return documentQueue.Count > 0; }
}
public T GetDocument()
{
T doc = default(T);
lock (this)
{
doc = documentQueue.Dequeue();
}
return doc;
}
public void DisplayAllDocuments()
{
foreach (T doc in documentQueue)
{
Console.WriteLine(doc.Title);
}
}
}
public interface IDocument
{
string Title { get; set; }
string Content { get; set; }
}
public class Document : IDocument
{
public Document()
{
}
public Document(string title, string content)
{
this.Title = title;
this.Content = content;
}
public string Title { get; set; }
public string Content { get; set; }
}
}
Please refer to line indicated as "//************************1"
Q1) How would these 2 declarations and its corrosponding objects differ :
i )
IDocument ido = new IDocument();
and
ii)
public class DocumentManager<T> where T : IDocument {// code}
var dm = new DocumentManager<IDocument>(); // pls note this IS A DEVIATION form // the code
|
|
|
|

|
In my windown application, I have a listview, which contains two columns. One of the subitem in a row contains the data as below.
"Failed testcase path=C:\temp\test.jpg"
I need to provide hyperlink to only "C:\temp\test.jpg". If I click on the same, it should open the corresponding image.
I tried by changing the property HotTaracking to true.
listView1.HotTracking = true;
But it shows hyperlinks to all the rows in listview.
Is there a way to achieve this?
|
|
|
|

|
I wrote a simple keylooger and i test it on win7 and all things is work successfuly but it dont work on xp system and show this message
"unable to find a version of runtime to run this application " how can i solve this proplem????
c#
|
|
|
|

|
I want to save a collection of custom objects. It seems that I succeed but when I try to retrieve the setting after the program restarts, the data is gone. I have searched extensively for the solution but to no avail. Here is what I have. Any help would be deeply appreciated.
In my settings.cs file I have added the following code.
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public List<Account> Accounts
{
get
{
return ((List<Account>)(this["Accounts"]));
}
set
{
this["Accounts"] = value;
}
}
Then I have the class marked as serializable. I have the following code at window close and as you can see it does compile so it picks up on the code and the data is there after I save it using the debugger to verify.
Properties.Settings.Default.Accounts = accounts.List;
Properties.Settings.Default.Save();
All should be ok when I run the following code except the data just isn't there as it has a value of null.
if (Properties.Settings.Default.Accounts != null)
{
accounts.List = Properties.Settings.Default.Accounts;
}
|
|
|
|

|
hi to all
i have a very complex problem in crystal report can every one help me for this problem?
thanks for any idea
my problem:
i have a report when my store procedure return 30 row ,this rows
show in two page ,row 28 will be disappeared and remove from the report.
i re size my report header and footer ,but my problem is already exist
|
|
|
|

|
Hi I been searching for a source code of flow free puzzle game, does anybody tell where can find it?
in c#
|
|
|
|

|
I wrote an application which "pops" the local mail agent, fills out the recipients,cc,bcc,subject, and body fields..
question is, given a file path,how do i automate the process of attaching a file to that email and sending it?
Scoured the web without finding a solution,
So help will be greatly appreciated
annex
|
|
|
|

|
i want record guitar sound from microhone
and in my program detect note of it
is it possible ?
|
|
|
|

|
in my example it's show that I put only one marker but lets say I add much more markers and I only want to remove marker in my array in index 0.
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked == true)
{
GMap1.addGMarker(markers1[0]);
}
else
{
}
}
|
|
|
|

|
how can i print data from dataGridView using rdlc report
|
|
|
|

|
Hi Friends,
please help me for how to rotate image in c# dot net. with Automatically and find location of image border.
Regards,
Hemant Chaudhary
|
|
|
|

|
string Data = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<request>" + "<header>" + "<username>awesome</username>" + "<password>xmlrocks</password>" + "</header>" + "<body>" + "<shape>round</shape>" + "</body>" + "</request>"; string URL = "https://technet.rapaport.com/HTTP/SimpleXML/Prices/GetPriceSheet.aspx"; WebRequest webRequest = WebRequest.Create(URL); webRequest.Method = "POST"; webRequest.ContentType = "application/x-www-form-urlencoded"; Stream reqStream = webRequest.GetRequestStream(); string postData = Data; byte[] postArray = Encoding.ASCII.GetBytes(postData); reqStream.Write(postArray, 0, postArray.Length); reqStream.Close(); StreamReader sr = new StreamReader(webRequest.GetResponse().GetResponseStream()); string Result = sr.ReadToEnd();
|
|
|
|

|
I want to put help form in my software and i want that when i click on the question the answer will open below it.
In my form a link label is there for question an for answer there is a label.
i tried this
label1.visible=ture
in the linkLabel_click event but it keeps the blank space in the form even when it is not visible.
I want that it should not keep the place of the label(answer) and when i click on the question the shows the answer.
Can any on help me??
|
|
|
|

|
Hi,
My system is 64bit with windows 7. I want to develop a desktop application (windows application) and deploy that application run that application in other systems. My Question is i want develop and deploy my windows application which is compatible for 32 bit why because my i am developing my application in visual studio 2008 (64bit).
Thanks and Regards,
Subbu.
|
|
|
|

|
hello,
i want to toggle anchor tag text, i have an anchor tag within div, when user clicks on reply, comment box get open and text should change into close and vice versa but problem is that after text getting change to close, text remain become close nd toggle between show nd hide works clearly...
<a id="reply" href="#">reply</a>
<div id="replyuser" style=" position:absolute;"><asp:TextBox ID="txt1" CssClass="txtbox" TextMode="MultiLine" runat="server"></asp:TextBox><br /><asp:Button ID="btnreply" Text="send" runat="server" CssClass="btn" /></div>
jquery is as follows
$(document).ready(function() {
$("#replyuser").hide();
$("#reply").click(function() {
$("#replyuser").toggle(function() {
$("#reply").text("close");
});
});
});
|
|
|
|

|
Hi everyone,
I want to create a directed graph with the use of C# and give the user a visualization of the graph. I would like the vertexes to be interactive, meaning "click able" so that I can trigger some code when this happens.
My question is the following: which libraries would you suggest using for this kind of project? I came along Quickgraph and Graphviz so far, but I could not find affirmation that Graphviz is able to support the interactivity of vertexes.
Thanks for any help in advance, it is much appreciated.
|
|
|
|

|
Hi,
i use a mathod that create a control (for example textbox) and add it's to a pannel. The pannle is passed in a parameter of the method.
public static void CampoTxt(Panel frmPadre)
{
TextBox txt = new TextBox();
txt.Name = "name";
txt.Visible = true;
frmPadre.Controls.Add(txt);
}
I've manage the event ControlAdded of the pannel for modify the height of form when a visible control is added.
But every control I have added in the panel has the visible property set to false even if at the creation was set to true.
private void pnlf_ControlAdded(object sender, ControlEventArgs e)
{
...some code ....
}
Any ideas?? Thanks
|
|
|
|

|
Hello, I am having some problems when running a C# application that I've written. It runs fairly smooth on a local machine (test machine). However, when I am running this from a network drive, the responsiveness is slow. When I click on a button that opens up a form, there is a considerable lag (5-10 seconds sometimes). Is there anything that I can do to speed this up on a network?
|
|
|
|

|
Hello everybody
I would like to cast a System.__ComObject to another type which is an interface. However, this interface is retrieved by reflection. I tried to create a generic cast method but it failed. I also tried to use TypeConverter class but it also failed. Even now, I try to use Marshal.CreateWrapperOfType but it seems to fail
Here is my code for moment
Assembly ctClientServerLib = Assembly.LoadFrom(string.Concat(bfcSetupFolder, "Interop.CtClientServerLib.dll"));
Type applicationClientClass = ctClientServerLib.GetType("CTCLIENTSERVERLib.CtApplicationClientClass");
Type ictSession = Type.GetTypeFromCLSID(new Guid("BCB06C70-AF26-11D3-8C89-00C04F517D7D"));
Type ictProtectedSession = ctClientServerLib.GetType("CTCLIENTSERVERLib.ICtProtectedSession");
Type ictSessionCtx = Type.GetTypeFromCLSID(new Guid("5F852A70-7E77-11D4-8CE1-00C04F517D7D"));
Type ictSessionClient = Type.GetTypeFromCLSID(new Guid("2C3444F9-ED6D-4700-B2EC-F665569FE830"));
Type ictProviderContainer = Type.GetTypeFromCLSID(new Guid("797BB105-AEDF-11D3-8C89-00C04F517D7D"));
Type ictProviderContainer = Type.GetTypeFromCLSID(new Guid("797BB105-AEDF-11D3-8C89-00C04F517D7D"));
object session;
object res;
res = applicationClientClass.InvokeMember("ConnectToServer", BindingFlags.InvokeMethod, System.Type.DefaultBinder, cacc, new object[] { "MyServer", "MyDataBase", new String[] { } });
session = applicationClientClass.InvokeMember("Logon", BindingFlags.InvokeMethod, System.Type.DefaultBinder, cacc, new object[] { "ADMIN", "" });
res = applicationClientClass.InvokeMember("Initialize", BindingFlags.InvokeMethod, System.Type.DefaultBinder, cacc, new object[] { session });
Type ictSession2 = ctClientServerLib.GetType("CTCLIENTSERVERLib.ICtSession");
Type ictSessionCtx2 = ctClientServerLib.GetType("CTCLIENTSERVERLib.ICtSessionCtx");
Type ictSessionClient2 = ctClientServerLib.GetType("CTCLIENTSERVERLib.ICtSessionClient");
Type ictProviderContainer2 = ctClientServerLib.GetType("CTCLIENTSERVERLib.ICtProviderContainer");
var session2 = Marshal.CreateWrapperOfType(session, ictSession);
var sessionClient = Marshal.CreateWrapperOfType(session2, ictSessionClient);
var sessionCtx = Marshal.CreateWrapperOfType(sessionClient, ictSessionCtx);
res = ictSessionCtx2.InvokeMember("SetSessionCtx", BindingFlags.InvokeMethod, System.Type.DefaultBinder, sessionCtx, new object[] { });
var providerContainer = Marshal.CreateWrapperOfType(sessionClient, ictProviderContainer);
object objectManagerClient = ictProviderContainer2.InvokeMember("get_Provider", BindingFlags.InvokeMethod, System.Type.DefaultBinder, sessionClient, new object[] { 1, -523387 });
.
Thanks for help
|
|
|
|

|
I am trying to develoop an application in c# using Aforge.dll but please anyone give me some idea how to make object (edge detect) through webcam so that i can find approx origina length and breadth
|
|
|
|

|
hi , im working on a website and i want to let the user add their img for their account .
i know one way for adding img into the sqldatabase and its the regular one to using the file stream and then sql parameter , i know that way so far .
but do we have any other way for adding img into sql database without using the sql parameter .
and truly why i should define a sql parameter . is it really necessary to define a sql paramater then just define the type and set it to img and do all of that things ?
|
|
|
|

|
How do i change user properties.
public string SetAttributesValue()
{
try
{
RunspaceConfiguration rsConfig = RunspaceConfiguration.Create();
PSSnapInException snapInException = null;
PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapInException);
Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig);
myRunSpace.Open();
Pipeline pipeLine = myRunSpace.CreatePipeline();
Command myCommand = new Command("Get-user");
myCommand.Parameters.Add("Identity", sUserName);
pipeLine.Commands.Add(myCommand);
Collection commandResults = pipeLine.Invoke();
foreach (PSObject cmdlet in commandResults)
{
}
return commandResults.ToString();
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
return null;
}
|
|
|
|

|
hey, i m working on a project , i am developing it in visual studio 2010, c# winforms and devexpress (also trying to change it to WPF MVVM)
its a kind of toolbox, toolbox should be generic i.e. if any new tool added, toolbox should automatically add it (when in network), toolbox and tool both should be auto update (i am using clickonce for this), i am using process.start to run a tool from toolbox (bcz toolbox and tools are loosely coupled), but now the new requirement is, that dlls which are using by different tools should reside with toolbox only and tool should have their reference only (i find it very difficult bcz toolbox is loosely coupled with tool) so if you can suggest anything that can help me to keep all dll with one application (toolbox) and other are only using ref. of it (tools)..or in another solution, if we have tight coupling between toolbox and tools (one solution , multiple project) then how can we achieve this function (dll only at one place) also the autoupdate (because clickonce is not supporting multiple project deployment as far as i know)..any help on this is appreciated.
JP
SSE
|
|
|
|

|
Hi everyone,
I am creating XML spreadsheet in C# and save it as Excel file (.xls). After creating, I have a excel with the size is: 500KB
But, after opening it and click "save" button without changes, the new size is: 2.5MB
Are there anyone know why and how to fix it ?
Please see my excel file at the link: http://www.mediafire.com/?5irdbchc10nonq4[^]
Thanks and regards,
Tai
|
|
|
|

|
in my example it's show that I put only one marker but lets say I add much more markers and I only want to remove marker in my array in index 0.
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked == true)
{
GMap1.addGMarker(markers1[0]);
}
else
{
}
}
modified 6 Apr '13 - 17:51.
|
|
|
|

|
Hi Guys,
Do you have any idea on how to automate website using c# windows form? If so, can you provide me. I am a new bee in automation and I want to automate my testing in the website.
Thanks,
Nico
|
|
|
|

|
Hi everyone, I have a problem, we borrow our clients laptops in our company for a short time. Users should be the local admin of the computer in order to add/remove programs they need. However, some of them didn't return the laptops in time so, we decided to write a program that locks the computer on date that we give before. I have one windows service, one form application which interacts with user and communicates with the service. While I testing, when I kill my program or my service, I give bsod but, when I try to disable the service and restart my computer, it doesn't run anymore. I need a method to prevent disable my service. Even my form application gets killed, my service has to run in background. Thanks.
|
|
|
|

|
ThePhantomUpvoter is that ur account
|
|
|
|

|
Hi all,
This is more of a WMI question than C#, but for lack of a more appropriate forum I am hoping someone here will know the answer.
I have a USB printer connected to my computer, and I am trying to retrieve the USB port ID for it in a C# application (i.e VID/PID).
I pulled the printer details from the WMI Win32_Printer class. The problem is the port field shows USB001 (which from what I understand is just a virtual allocation).
I discovered the actual USB port was a parent device called 'USB Printing Support', and the printer USB device was a child of that.
I pulled the WMI class Win32_USBControllerDevice and thought I found the relationship I need:
Antecedent: \\MARK-PC-MKII\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_1E2D&SUBSYS_84CA1043&REV_04\\3&11583659&0&D0"
Dependent: \\MARK-PC-MKII\root\cimv2:Win32_PnPEntity.DeviceID="USB\\VID_04A9&PID_271A\\0000A1A6Q2NI"
Antecedent: \\MARK-PC-MKII\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086&DEV_1E2D&SUBSYS_84CA1043&REV_04\\3&11583659&0&D0"
Dependent: \\MARK-PC-MKII\root\cimv2:Win32_PnPEntity.DeviceID="USBPRINT\\CANONLBP6000/LBP6018\\7&2509A3F3&0&USB001"
Unfortunately the PCI bus that both devices are related with is also related with a bunch of other devices, so I am not sure this approach will work.
Does anybody know a way I could programically relate my printer device with its parent USB device (Preferably one which I could pull the USB device info once it has been related to the printer)
Note:
If I open the properties->details window for the 'USB Printing Support' device, there is a property called 'Children' which would be perfect... I just don't know how to get to it... ;-(.
Thank you.
Mark Brock
I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking
|
|
|
|

|
How to Import a doc file in sql server in windows application...??
|
|
|
|

|
I've inherited a project that includes unit tests written in this framework. I know little about c# and nothing about nunit. I'm told that I can't just run the test project (as it builds to an assembly, not an exe) but need to use a third party tool to run the tests. I tried resharper but uninstalled it as it changed my VS 2012 shortcuts without asking me. Then I tried NUnit itself but for some reason unknown to anyone here it is not possible to debug the tests using NUnit.
I'm just stunned at how bad this appears. Surely tests lose most of their value when they are hard to execute?
Is it possible to add a Main() to my test project and just run the tests?
|
|
|
|

|
hi everybody
am trying to understand interfaces .and i created a Console App with Two Classes( Somme and Tunnel) and an Interface called IAdd.
IAdd interface:
interface IAdd
{
int calc(int a,int b);
}
Somme Class that implement the IAdd interface:
class Somme : IAdd
{
public int calc(int a, int b)
{
return a + b;
}
}
Tunnel Class :
class Tunnel
{
IAdd som = new Somme();
som.calc(3,4); }
but the MAin Console can use this writing.why i can't calculate the Somme and then send the result to the main Console.
Console Main:
static void Main(string[] args)
{
IAdd som = new Somme();
int x = som.calc(3, 4);
Console.WriteLine( x);
Console.ReadKey();
}
what's the point am missing here?
forget my english,am doing my best to learn many things .
|
|
|
|

|
how to write into text box from database query row values?
|
|
|
|

|
I'm using google api 2.0 for .net. I use this code to create a new calendar:
CalendarEntry calendar = new CalendarEntry();
calendar.Title.Text = "Little League Schedule";
calendar.Summary.Text = "This calendar contains the practice schedule and game times.";
calendar.TimeZone = "America/Los_Angeles";
calendar.Hidden = false;
calendar.Color = "#2952A3";
calendar.Location = new Where("", "", "Oakland");
Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarEntry createdCalendar = (CalendarEntry) service.Insert(postUri, calendar);
but, on execution, return the error:
Execution of request failed
at the line
CalendarEntry createdCalendar = (CalendarEntry) service.Insert(postUri, calendar);
However, if I connect to google calendar with the browser, the new calendar is created.
Also, I use this code to retriving all calendars and it's works
CalendarQuery query = new CalendarQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = (CalendarFeed) service.Query(query);
Any suggestions?? Thanks
|
|
|
|

|
How can i Import Data of a Dataview in wpf to MsWord
|
|
|
|

|
List lstusers = new List();
lstusers = AMSManagement.GetAllUsers();
var lnquser = from u in lstusers
show error here plz help me!!!
-------------
where u.User_ID == int.Parse(Session["UserID"].ToString()) && u.Pass_word == txtopwd.Text.Trim()
select u;
--------------------
if (lnquser.ToList().Count > 0)
{
users u = new users();
u.User_ID = int.Parse(Session["UserID"].ToString());
u.Pass_word = txtcnpwd.Text.Trim();
AMSManagement.Changepassword(u);
lblmsg.Text = "Password Changed Successfully!";
}
|
|
|
|
 |