|
I have a database design for logging errors including program name, method name, all parameters passed to the method, and all parameters passed in a database call.
We are using CommonLogging for some of our log calls that will bind to log4net for the log functions. I have read tutorials and documentation indicating I can pass individual fields that are custom to the program. But they are all for a flat logging record, not deep for posting parameters.
What I'd like to do is configure log4net to call a custom logger passing my parameters to it, and doing the database writes.
Does anyone know if this is possible with the log4net configuration or not?
|
|
|
|
|
i have .jar file that contains costomized sha 256 code , now i need to use the same code on sql server, after googling i found that i need to write a code in
c# clr and call .jar file from it and then call clr proc from sql server
|
|
|
|
|
If you need to provide interop between .NET and Java, I find that ikvm[^] is the best way to achieve this.
|
|
|
|
|
Looks interesting. Worth a mention in Free Tools?
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
|
I want to run some url and don't want to popup.
Below code is calling default2.aspx but do not execute javascript which is in the default2.aspx.
url = "http://localhost:56286/PIS_INTERFACE/default2.aspx";
URLReq = (HttpWebRequest)WebRequest.Create(url);
URLRes = (HttpWebResponse)URLReq.GetResponse();
Below code is default2.aspx.
<script type="text/javascript">
alert("default2.aspx");
</script>
</body>
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
What exactly you are trying to achieve
============================================
The grass is always greener on the other side of the fence
|
|
|
|
|
i think he's trying to execute the javascript on the page, but the alert() on the page don't show up, so he's confused
i think the method he's using only download the html, don't parse or execute any javascript on it, but i don't know how to help him...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
I want to run some page and don't want to popup.
Just run page, because i want user to don't know.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hi all
I can not do with the crystal report in vs 2010
Gives me error!
I had to use the Stimulsoft And have the following problem
first,i writed code...
[IMG]http://up98.org/upload/server1/02/i/rtwem6ed322mhkivw9nx.gif[/IMG]
notice:rpt.Dictionary.DataSources.Clear(); commented
and show
[IMG]http://up98.org/upload/server1/02/i/8wh94dsmwtk85kkqy0n.gif[/IMG]
after
[IMG]http://up98.org/upload/server1/02/i/5oliduwl31szleonnjzf.gif[/IMG]
and excute this query
"SELECT fname,lname,fathername,markazTB.name from mdd inner join markazTB on markazTB.code = mdd.codeMarkaz
where shparvande='000000001' ;"
show me
[IMG]http://up98.org/upload/server1/02/i/p4wp5ga4n88ypqog3w0.gif[/IMG]
and stiViewerContro;1.report=rpt;
is not worked!
What can I do?
tanks
|
|
|
|
|
|
hi
tank you
i did search on this site,download all document.
do'nt
write in this forum ,but I'm "access denied".
i think ,Due to political issues.
what can i do?
|
|
|
|
|
private void btnStart_Click(object sender, EventArgs e)
{
this.btnStart.Enabled = false;
this.progressBar1.Value = 0;
string srcFile = Path.Combine(this.txtSource.Text, this.lstFiles.SelectedItem.ToString());
MessageBox.Show(srcFile);
string dstFile = Path.Combine(this.txtOutput.Text,
Path.GetFileNameWithoutExtension(this.lstFiles.SelectedItem.ToString())) + "." + this.cboOutputFormat.SelectedItem;
MessageBox.Show(dstFile);
string imafile = Path.Combine("movie= "+this.openFileDialog1.SafeFileName);
MessageBox.Show(imafile);
string videoRateOption = string.Empty;
if (this.cboVideoRate.SelectedIndex != 0)
{
videoRateOption = " -b:v " + this.cboVideoRate.SelectedItem.ToString().Split(' ')[0] + "k ";
MessageBox.Show(videoRateOption);
}
string videoSizeOption = string.Empty;
if (this.lstVideoSize.SelectedIndex != 0)
{
videoSizeOption = " -s " + this.lstVideoSize.SelectedItem.ToString().Split(' ')[0] + " ";
}
this.Text = "Converting...";
ThreadPool.QueueUserWorkItem((object state) =>
{
ConvertFile(srcFile, imafile, dstFile, videoRateOption, videoSizeOption);
});
}
string strFFMPEGOut;
ProcessStartInfo psiProcInfo = new ProcessStartInfo();
TimeSpan estimatedTime = TimeSpan.MaxValue;
StreamReader srFFMPEG;
string ste = ""movie=watermarklogo.png [wm];[in][wm] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]"";
string strFFMPEGCmd = " -i "" + srcFile + "" -ar 44100 " + videoRateOption + videoSizeOption +"-vf"+ ste + "-y ""
+ dstFile + """;
psiProcInfo.FileName = Application.StartupPath + ((IntPtr.Size == 8) ? "\x64" : "\x86") + "\ffmpeg.exe";
psiProcInfo.Arguments = strFFMPEGCmd;
psiProcInfo.UseShellExecute = false;
psiProcInfo.WindowStyle = ProcessWindowStyle.Hidden;
psiProcInfo.UseShellExecute = false;
psiProcInfo.RedirectStandardError = true;
psiProcInfo.ErrorDialog = true;
psiProcInfo.RedirectStandardOutput = true;
psiProcInfo.CreateNoWindow = true;
prcFFMPEG.StartInfo = psiProcInfo;
prcFFMPEG.Start();
ponse that I push the start botten that I tried to fix the code that I
inserted the logo in the movie with ffmpeg.
Is that be okay if I don't choose the path of logo.and Is there any something wrong that I did.
|
|
|
|
|
I can't give you any specific advice on your problem but as a general comment I would say don't try to automate an external program unless you know what the command line should be.
Do your experiments either directly from a command prompt or from a batch file so that you can observe the results. Once you have the external program working properly only then automate it's operation.
Alan.
|
|
|
|
|
How to transfer data between two form ? I found few articles but it is only transmitted in one direction instructions
|
|
|
|
|
|
thanks, but i want to transfer data from form2 to form1 by click a button.
|
|
|
|
|
Did you try?
private string valueFromSecondForm;
public string ValueFromSecondForm
get { return value; }
set { valueFromSecondForm = value; }
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2(this);
frm.Show();
}
public partial class Form2 : Form
{
Form opener;
public Form2(Form parentForm)
{
InitializeComponent();
opener = parentForm;
}
private void button1_Click(object sender, EventArgs e)
{
opener.ValueFromSecondForm = valueFromForm2Textbox.Text;
}
}
Other way could be to transfer the data at the time of closing the form2, here: Managing Data Among Multiple Forms (Part 1) [^]
modified 13-May-12 12:18pm.
|
|
|
|
|
|
|
|
|
An easy is with custom events. In a simple implementation, you add an event to each form (e.g., "FormDataChanged") that gets triggered when the data changes that you want to transfer. You can store that data in a static variable in program. Then pass that data to the other form whenever you like.
public static Program
{
private static object _myTransferData = new object();
static int Main(arg, args)
{
MyForm1.DataChanged += new FormDataChanged;
}
private static void FormDataChanged(object sender, EventArgs e)
{
_myTransferData = MyForm1.DataStorage;
}
}
|
|
|
|
|
Oh, dear, oh dear.
You were doing so well, right up to the "You can store that data in a static variable in program".
What happens if there are two instances of the form, with data changing?
What happens if the data changes again?
Static is generally a bad idea, particularly when you are passing the information to another class. Either keep it local to your class instance, and let the handler pick it up from the sender parameter if it is just the latest info they need, or also create a custom EventArgs based class that you hand the changed data though with when you signal the event.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I agree and my original example was setting form1.foo = form2.foo. However, I decided on a field to show how you can store data between instantiations if you want. In this case, any member of Program has to be static since it's a static class. Regardless, your point is generally a good one.
|
|
|
|