|
Appreciate your comments !Eddy Vluggen wrote: TBoxes is an abbreviation (hope I spelled that right). Since it is a private property, I wonder whether it should be a private field, an internal/public property, or a read-only property. The goal is to keep that list of TextBoxes local, unchanged. In fact, in the code for the Class I use a read-only Property: public List<T> SyncObjects { get; } to store the TextBoxes. In the usage example the property is private, but, yes, it would be better to make that read-only.
Re: your code example: what does "Port" refer to ? Mapping a Property of one Control to another in WinForm is one of the simpler databinding tasks, but, in this case the tricky part is that the List elements change, not the Control ... am I missing the point ?
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
BillWoodruff wrote: what does "Port" refer to ? In that case it refers to a local port on the machine (copy/paste examples ftw!).
--edit
Ah, should point to the Member name to bind to of the myIntList[i] -object provided. So what is the name of the member in an array? I think I just bumped into your point
--/edit
BillWoodruff wrote: Mapping a Property of one Control to another in WinForm is one of the simpler databinding tasks, but, in this case the tricky part is that the List elements change, not the Control ... am I missing the point ? Yes and no. It is true that binding a single value is simple; when binding a collection, I assign it as a datasource and put it in a grid. Or worse, an ugly propertyeditor.
I'm missing the statement where these textboxes are assigned to the owning control. How is the taborder of your generated textboxes?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: I'm missing the statement where these textboxes are assigned to the owning control. How is the tab-order of your generated textboxes? That stuff is omitted: I just cooked up some TextBoxes on the fly to test with ... you have opened up an interesting idea with this query: could you take the container Control and somehow bind to its ControlCollection ? Never seen an example of that. But, that sure don't mean it ain't doable.
cheers, Bill
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
Nice thought, but how do you discern between controls that want binding, and regular controls/deliberate unbound controls?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Eddy,
While I don't plan to investigate this line of inquiry, a few ideas come to mind:
1. use Tags on the Controls
2. assume all the Controls in a given ContainerControl are to be watched
3. use reflection and run-time code construction + compilation to build INotify... into selected Controls
But, me brain immediately starts shakin' my head at these ideas
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
BillWoodruff wrote: But, me brain immediately starts shakin' my head at these ideas That's probably why it is not part of the framework, and sold separately as "MS Access"
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm utterly "gobsmacked" by the brilliance and utility of your new "pattern".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Okay, after you finish letting that minor wound fester I look forward to you bringing your find technical mind to the discussion.
cheers, Bill
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
Nah ... too much chance I may stray from your agenda.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Kindly someone help me on this by proving code
|
|
|
|
|
Sorry, this site does not provide code to order.
|
|
|
|
|
I am using below query
SqlConnection con = new SqlConnection("server = MUNESH;Database=datastore;UID=sa;Password=123;");
SqlCommand cmd = new SqlCommand("Select * from data1", con);
try
{
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(dt);
BindingSource bsource = new BindingSource ();
bsource .DataSource = dt;
dataGridView1.DataSource = bsource ;
da.Update(dt);
DataSet ds = new DataSet("New_DataSet");
ds.Locale = System.Threading.Thread.CurrentThread.CurrentCulture;
da.Fill( dt );
ds.Tables.Add( dt );
ExcelLibrary. DataSetHelper.CreateWorkBook("MyFirstExcelSheet.xls" ,ds);
}
catch (Exception ec)
{
MessageBox.Show(ec.Message);
}
Once its export the same data for three times in the same excel sheet
|
|
|
|
|
1) Open SQL Server Management Studio
2) Run Query
3) Right-click in results pane (Copy - with or without "headers")
4) Open Excel
5) Paste
6) Charge client $1000.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Below is my class for the json output:
class PwdResetRequest
{
public class TopScoringIntent
{
public string intent { get; set; }
public double score { get; set; }
}
public class Intent
{
public string intent { get; set; }
public double score { get; set; }
}
public class Resolution
{
public string value { get; set; }
}
public class Entity
{
public string entity { get; set; }
public string type { get; set; }
public int startIndex { get; set; }
public int endIndex { get; set; }
public Resolution resolution { get; set; }
}
public class RootObject
{
public string query { get; set; }
public TopScoringIntent topScoringIntent { get; set; }
public List<Intent> intents { get; set; }
public List<Entity> entities { get; set; }
}
}
Luis Return result:
{
"query": "create a new password for sjao9841@demo.com",
"topScoringIntent": {
"intent": "ResetLANIDpassword",
"score": 0.9956063
},
"intents": [
{
"intent": "ResetLANIDpassword",
"score": 0.9956063
},
{
"intent": "None",
"score": 0.179328963
}
],
"entities": [
{
"entity": "sjao9841@demo.com",
"type": "builtin.email",
"startIndex": 26,
"endIndex": 47
}
]
}
I have developed the below code for getting the data from the json.
var uri =
"https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/" +
luisAppId + "?" + queryString;
var response = await client.GetAsync(uri);
var strResponseContent = await response.Content.ReadAsStringAsync();
var json = await response.Content.ReadAsStringAsync();
var token = JObject.Parse(json).SelectToken("entities");
foreach (var item in token)
{
var request = item.ToObject<Entity>();
}
Console.WriteLine(strResponseContent.ToString());
}
And I only want the data from the "TopScoringIntent". How can I get that using C#? Below is the code that I tried but nothing came out: Message=Error reading JObject from JsonReader. Path '', line 0, position 0. Source=Newtonsoft.Json
|
|
|
|
|
Sounds like the string "json" might be empty. It may be beneficial to not chain so much;
var token = JObject.Parse(json).SelectToken("entities");
vs
var MyJObject = JObject.Parse(json);
var MyJToken = MyJObject.SelectToken("entities"); The second version is more text, but easier with debugging when stepping through.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am trying to edit your Conference System(PtoP)(project file) in Visual Studio 2017.
But VS community says Conference System need 'migration'
What should I do?
-- modified 28-Feb-18 21:58pm.
|
|
|
|
|
You should post this in the forum at the bottom of the article you're talking about.
Articles are supported by the people who wrote them, not the entire Code Project community.
|
|
|
|
|
I am trying to edit your Conference System(PtoP)(project file) in Visual Studio 2017.
But VS says Conference System need 'migration'
What requirements should I need?
=====================================================================================
Aking questions is a skill
CodeProject Forum Guidelines
Google: C# How to debug code
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
It is NOT OUR "Conference System".
Again, post your questions in the forum at the bottom of the article you're talking about. Articles are supported by the people who wrote them.
|
|
|
|
|
Hi,
I have to build a service, which is kind of middle layer between System A and Third party system
- This middle layer should be MVC framework
- There can be multiple systems DB’s ( System A, System B….) which will interact with
this middle Layer
- The SQL database should be able make Async call to this middle layer system
- The calling system and this middle layer are in different in house domains
- This Middle Layer will receive XML from calling system DB which will contain data , this middle layer should be able to read/process and write XML and send it back to calling system ( based on third party system response)
I need suggestion on how to design this middle ware system.
Should I go for Web service? Web APIS? WCF? Or is there any better way to achieve this !
Any suggestions will be appreciated.
Thanks
modified 28-Feb-18 22:08pm.
|
|
|
|
|
Design it; build it; tune it.
"... with operations like reading and writing ..." is not quite a spec.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Are you saying it is built bit by bit?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I see the original post has been expanded...
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
modified 1-Mar-18 16:15pm.
|
|
|
|
|
You're going to need "web servers"; I don't see that in your mix; they will be hosting the "end points" to your "services".
You need some "physical" architecture; then apply the "logical".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|