|
Puneet Bhatnagar wrote: i want to write a script which can run my dot net exe at regular interval, without manual intervention
As the other responder suggested, Use Task Scheduler to run it every particular interval of time.
Start-> Programs-> Accessories-> System Tools-> Scheduled Tasks.
Puneet Bhatnagar wrote: Is it possible to write such a program in dot net itself?
You need to develop a windows service to do that. (Now that you have written the code, it won't take much time to develop the windows service application).
More information: Here[^]! Or search Google/Bing for "Windows Service", there are lots of articles.
..Go Green..
|
|
|
|
|
following is my API
public unsafe static extern int SAP_GetDeviceList(int SAPIdentifier,
ref uint DeviceCount,
out sSAPP_DiscoveredDeviceInfo_t[] rgDiscoveredDevs
)
sSAPP_DiscoveredDeviceInfo_t is a structure
how do i call this api?? how should i declare rgDiscoveredDevs this varible and of wht type so that i can call above API?
iResult = SAP_GetDeviceList(SAPId, ref nDevCount, ref rgDiscoveredDevs);
above API in C
SAPAPI int32_t SAP_GetDeviceList( int32_t SAPIdentifier,
uint32_t * DeviceCount ,
sSAPP_DiscoveredDeviceInfo_t rgDiscoveredDevs[]
)
|
|
|
|
|
i can't find msdn for visual studio 2005.
Is there anyone who know link?
and i have question more.
i have msdn for 2008. so is it possible to run in visual studio2005?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Do you mean this[^]?
It's time for a new signature.
|
|
|
|
|
If you have Visual Studio standard or professional, this should be on your DVD. If you have MSDN (any subscription), you can download it from there. If you have a stolen copy, you should steal it from the same place you stole your Visual Studio.
If you have an express version, I haven't the foggiest idea
|
|
|
|
|
For express editions, I believe there is a link on the express website that lets you download it seperatly.
Alternativly, if you downloaded the combined ISO I think it should be on there.
|
|
|
|
|
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
//Tekla-Structures API
using Tekla.Structures; -> Error occurs.
namespace DSTtekla
{
public partial class FormDSTtekla : Form
{
..............
Hi, I have One solution, and there are two projects in it.
One project's name is DSTtekla, another project's name is DSTtekla15
By the way, Upper shown codes is in DSTtekla project, using Tekla.Structure is DSTtekla15 project's reference.
So Error occurs.
How can I use Tekla.Structure reference in DSTtekla project?
Bye, nice days.
P.S modified1
DSTtekla15 project has only Tekla.Structures.dll reference file.
I am man in Earth, and only in Universe.
modified on Wednesday, April 28, 2010 4:03 AM
|
|
|
|
|
Add a reference to the DSTtekla15 project dll to the DSTtekla.
To do this, in the solution explorer, expand DSTtekla project. Right click the 'References' node and select 'Add Reference'. You can then select 'Projects' tab and add the reference to the DSTtekla15 dll.
Hope this helps!
..Go Green..
|
|
|
|
|
You can refer dll of DSTtekla15 project into DSTtekla and then
you can easily use Tekla.Structures.
Jinal Desai
|
|
|
|
|
Beside what the other posters have written also make sure you use the same namespace or that you add the correct namespace in the using statement.
|
|
|
|
|
This is a windows based C# project.I have 2 forms A and B.Form B contains search button and datagrid view wherein we select the row and the corresponding data will be bound to the controls in Form A.I have 2 buttons previous and next to view each record based on the search criteria..how can i get each record on these button click.Kindly help me
|
|
|
|
|
Can you give some more detail ??
On pressing which button you need each record and on which form ??
Jinal Desai
|
|
|
|
|
I have next and previous buttons in Form A..So that when i click the Next button the next row details from Form B (gridview Row)will be bound on the controls in form A..Otherwise each time i need to got to form B and select the next row in datagrid view
|
|
|
|
|
Bind everything to one BindingSource: Grid (via DataSource); form controls (via Bindings); button events (MoveNext; MovePrevious).
Everything will operate in sync.
|
|
|
|
|
public HtmlEdit UIGenericSearchEdit
{
get
{
if ((this.mUIGenericSearchEdit == null))
{
this.mUIGenericSearchEdit = new HtmlEdit(this);
#region Search Criteria
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Id] = null;
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = "q";
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.LabeledBy] = null;
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Type] = "SINGLELINE";
///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.Title] = "Google Search";
///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.Class] = "lst";
///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.ControlDefinition] = "onblur=google&&google.fade&&";
///this.mUIGenericSearchEdit.FilterProperties[HtmlEdit.PropertyNames.TagInstance] = "3";
///this.mUIGenericSearchEdit.WindowTitles.Add("Google");
#endregion
}
return this.mUIGenericSearchEdit;
}
}
|
|
|
|
|
Properties don't have explicit parameters.
1 You can create an additional property :
public string SearchName
{
set {
UIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = value;
}
}
2 Change it into a method with parameter.
3 Just create a new method
public void SearchName(string param)
{
UIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = param;
}
I don't like my signature at all
|
|
|
|
|
so how do I call this then?
|
|
|
|
|
Well, like this :
this.SearchName = "whatever";
SearchName("whatever");
The name "SearchName" was just a suggestion, be creative!
Cheers
I don't like my signature at all
|
|
|
|
|
this is my whole code and I want to parameterise the " HtmlEdit uIGenericSearchEdit = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchEdit;
"to supply the name of the object so as not to have a new mthod for each new object type searchedit of different name - i will still give it a unique label -uIGenericSearchEdit1 ,uIGenericSearchEdit2 etc
<br />
namespace proofofconcept1csharp<br />
{<br />
using System;<br />
using System.CodeDom.Compiler;<br />
using System.Collections.Generic;<br />
using System.Drawing;<br />
using System.Text.RegularExpressions;<br />
using System.Windows.Input;<br />
using Microsoft.VisualStudio.TestTools.UITest.Extension;<br />
using Microsoft.VisualStudio.TestTools.UITesting;<br />
using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;<br />
using Microsoft.VisualStudio.TestTools.UITesting.WinControls;<br />
using Microsoft.VisualStudio.TestTools.UnitTesting;<br />
using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;<br />
using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;<br />
using MouseButtons = System.Windows.Forms.MouseButtons;<br />
<br />
using System.IO;<br />
using System.Collections;<br />
using System.Configuration;<br />
using System.Data;<br />
using System.Data.OleDb;<br />
using System.Web;<br />
using System.Web.UI;<br />
<br />
<br />
[GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
public partial class UIMap<br />
{<br />
<br />
public void RecordedMethod1()<br />
{<br />
#region Variable Declarations<br />
HtmlEdit uIGenericSearchEdit = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchEdit;<br />
HtmlInputButton uIGenericSearchButton = this.UIGenericWindowsInterneWindow.UIGenericDocument.UIGenericSearchButton;<br />
WinButton uICloseButton = this.UIGenericWindowsInterneWindow.UITestGenericSearchWindTitleBar.UICloseButton;<br />
#endregion<br />
<br />
<br />
this.UIGenericWindowsInterneWindow.LaunchUrl(new System.Uri(this.RecordedMethod1Params.UIGenericWindowsInterneWindowUrl));<br />
<br />
uIGenericSearchEdit.Text = this.RecordedMethod1Params.UIGenericSearchEditText;<br />
<br />
Mouse.Click(uIGenericSearchButton, new Point(47, 19));<br />
<br />
Mouse.Click(uICloseButton, new Point(7, 9));<br />
}<br />
<br />
#region Properties<br />
public virtual RecordedMethod1Params RecordedMethod1Params<br />
{<br />
get<br />
{<br />
if ((this.mRecordedMethod1Params == null))<br />
{<br />
this.mRecordedMethod1Params = new RecordedMethod1Params();<br />
}<br />
return this.mRecordedMethod1Params;<br />
}<br />
}<br />
<br />
public UIGenericWindowsInterneWindow UIGenericWindowsInterneWindow<br />
{<br />
get<br />
{<br />
if ((this.mUIGenericWindowsInterneWindow == null))<br />
{<br />
this.mUIGenericWindowsInterneWindow = new UIGenericWindowsInterneWindow();<br />
}<br />
return this.mUIGenericWindowsInterneWindow;<br />
}<br />
}<br />
#endregion<br />
<br />
#region Fields<br />
private RecordedMethod1Params mRecordedMethod1Params;<br />
<br />
private UIGenericWindowsInterneWindow mUIGenericWindowsInterneWindow;<br />
#endregion<br />
}<br />
<br />
[GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
public class RecordedMethod1Params<br />
{<br />
<br />
#region Fields<br />
public string UIGenericWindowsInterneWindowUrl = "http://www.google.com.au/";<br />
<br />
public string UIGenericSearchEditText = "test";<br />
#endregion<br />
}<br />
<br />
[GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
<br />
public class UIGenericWindowsInterneWindow : BrowserWindow<br />
{<br />
<br />
public UIGenericWindowsInterneWindow()<br />
{<br />
#region Search Criteria<br />
this.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";<br />
#endregion<br />
}<br />
<br />
public void LaunchUrl(System.Uri url)<br />
{<br />
this.CopyFrom(BrowserWindow.Launch(url));<br />
}<br />
<br />
#region Properties<br />
public UIGenericDocument UIGenericDocument<br />
{<br />
get<br />
{<br />
if ((this.mUIGenericDocument == null))<br />
{<br />
this.mUIGenericDocument = new UIGenericDocument(this);<br />
}<br />
return this.mUIGenericDocument;<br />
}<br />
}<br />
<br />
public UITestGenericSearchWindTitleBar UITestGenericSearchWindTitleBar<br />
{<br />
get<br />
{<br />
if ((this.mUITestGenericSearchWindTitleBar == null))<br />
{<br />
this.mUITestGenericSearchWindTitleBar = new UITestGenericSearchWindTitleBar(this);<br />
}<br />
return this.mUITestGenericSearchWindTitleBar;<br />
}<br />
}<br />
#endregion<br />
<br />
#region Fields<br />
private UIGenericDocument mUIGenericDocument;<br />
<br />
private UITestGenericSearchWindTitleBar mUITestGenericSearchWindTitleBar;<br />
#endregion<br />
}<br />
<br />
[GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
<br />
public class UIGenericDocument : HtmlDocument<br />
{<br />
<br />
public UIGenericDocument(UITestControl searchLimitContainer) :<br />
base(searchLimitContainer)<br />
{<br />
#region Search Criteria<br />
#endregion<br />
}<br />
<br />
#region Properties<br />
public HtmlEdit UIGenericSearchEdit<br />
{<br />
get<br />
{<br />
if ((this.mUIGenericSearchEdit == null))<br />
{<br />
this.mUIGenericSearchEdit = new HtmlEdit(this);<br />
#region Search Criteria<br />
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Id] = null;<br />
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = "q";<br />
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.LabeledBy] = null;<br />
this.mUIGenericSearchEdit.SearchProperties[HtmlEdit.PropertyNames.Type] = "SINGLELINE";<br />
#endregion<br />
}<br />
return this.mUIGenericSearchEdit;<br />
}<br />
}<br />
<br />
public HtmlInputButton UIGenericSearchButton<br />
{<br />
get<br />
{<br />
if ((this.mUIGenericSearchButton == null))<br />
{<br />
this.mUIGenericSearchButton = new HtmlInputButton(this);<br />
#region Search Criteria<br />
this.mUIGenericSearchButton.SearchProperties[HtmlButton.PropertyNames.Id] = null;<br />
this.mUIGenericSearchButton.SearchProperties[HtmlButton.PropertyNames.Name] = "btnG";<br />
this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.Type] = "submit";<br />
this.mUIGenericSearchButton.FilterProperties[HtmlButton.PropertyNames.Title] = null;<br />
#endregion<br />
}<br />
return this.mUIGenericSearchButton;<br />
}<br />
}<br />
#endregion<br />
<br />
#region Fields<br />
private HtmlEdit mUIGenericSearchEdit;<br />
<br />
private HtmlInputButton mUIGenericSearchButton;<br />
#endregion<br />
}<br />
<br />
[GeneratedCode("Coded UITest Builder", "10.0.30128.1")]<br />
<br />
public class UITestGenericSearchWindTitleBar : WinTitleBar<br />
{<br />
<br />
public UITestGenericSearchWindTitleBar(UITestControl searchLimitContainer) :<br />
base(searchLimitContainer)<br />
{<br />
#region Search Criteria<br />
#endregion<br />
}<br />
<br />
#region Properties<br />
public WinButton UICloseButton<br />
{<br />
get<br />
{<br />
if ((this.mUICloseButton == null))<br />
{<br />
this.mUICloseButton = new WinButton(this);<br />
#region Search Criteria<br />
this.mUICloseButton.SearchProperties[WinButton.PropertyNames.Name] = "Close";<br />
#endregion<br />
}<br />
return this.mUICloseButton;<br />
}<br />
}<br />
#endregion<br />
<br />
#region Fields<br />
private WinButton mUICloseButton;<br />
#endregion<br />
}<br />
}<br />
|
|
|
|
|
If you are trying to modify a GENERATED piece of code, you are in for serious trouble.
I don't really understand the question anymore, so I'll try to rephrase it.
As far as I understand you want to assign a number of variables unique HtmlItem objects :
HtmlEdit uIGenericSearchEdit1 = new HtmlEdit(this);
HtmlEdit uIGenericSearchEdit2 = new HtmlEdit(this);
but you want them initialized like in your example of UIGenericSearchEdit property and the name is a parameter (variable)? Am I correct?
I don't like my signature at all
|
|
|
|
|
Hi,
I have one flat file which contains data in particular format.The file contains data in particular format which generates pages. Each page contains Year in MM/DD/YYYY format which always starts with specific position means specific x,y coordinate, so out of this it will generate N no of pages. There are multiple dates available in one page like YearStarting , YearEnding etc and out of this i want to find out only particular date like YearStarting. I don't want to find out values for YearEnding.
My requirement is that i have to find out each and every YearStarting value contains in the flat file from first line to end of the reports. YearStarting data is having specific position in each pages.
Can some one tell me how to find out each value of Year from the Flat file(or text file) using C#??
Thanks a lot.
|
|
|
|
|
You could try regular expressions.
|
|
|
|
|
I have multiple columns which contains Year format, so basically year format is NOT unique thru out the
file, so if i use regular expression then it will fetch values from multiple column and i want all the values from
specific single column.
|
|
|
|
|
Not if you write your expression properly.
We'd need to see a sample of the file.
|
|
|
|
|
Pseudo code
open the file (System.IO)
read line (System.Text)
test that it contains the YearStarting pattern in the text (System.Text or regex)
extract the first date after pattern (System.Text or regex)
store the details (System.Data)
repeat test if it is possible to have more than 1 date per line
repeat line 2 until end of file
close file
Fairly simple really
Never underestimate the power of human stupidity
RAH
|
|
|
|