|
Hi, I said I experimented in various ways. Even after you commented about me using so many remove codes, i ensured they were not involved in the process and yet I could not achieve my objective of getting the textbox control(s) off my big picture box.
parthan
|
|
|
|
|
I searched online for 3 speech pronunciation libraries: "System.Speech.dll, Microsoft.Speech.dll and Interop.SpeechLib.dll". I want to know their time and origin, in which 3 libraries easy to use to write code ? Which library supports many countries' voices ? Which library is the most popular with programmers ? In the future, which 3 of the libraries will drop out ? et... ?
|
|
|
|
|
Look at the documentation for each library to decide which one will be the best fit for your application.
|
|
|
|
|
"But I want you to do all that research for me! It sounds like a lot of work and I'm busy with FaceBook today!"
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Just what I thought ... great minds eh?
|
|
|
|
|
In the future, which 3 of the libraries will drop out ? But we have a gift of foresight which he doesn't...
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
I found a speech pronunciation example that uses these libraries, I haven't found the source materials and the documentation for them, if someone who has programmed on this issue will answer it quickly, every time I don't know, thanks to you answers, I would say google search so what was the forum set up for ?
|
|
|
|
|
Member 2458467 wrote: so what was the forum set up for ? It was set up to answer specific technical questions; see How to get an answer to your question - C# Discussion Boards[^]. You are asking us to tell you which library of three is the best, which supports multiple languages, which may disappear in the future, etc. Apply the same question to any consumer product you care to think of and see why it is impossible to provide a definitive answer.
|
|
|
|
|
Well, if you don't know, you dont have to answer either!
|
|
|
|
|
But I do know how to find the answer.
|
|
|
|
|
|
I have found out. SpeechLib is interop com version of Microsoft Speech
The short answer is that Microsoft.Speech.Recognition uses the Server version of SAPI, while System.Speech.Recognition uses the Desktop version of SAPI. The APIs are mostly the same, but the underlying engines are different. Typically, the Server engine is designed to accept telephone-quality audio for command & control applications; the Desktop engine is designed to accept higher-quality audio for both command & control and dictation applications.You can use System.Speech.Recognition on a server OS, but it's not designed to scale nearly as well as Microsoft.Speech.Recognition.The differences are that the Server engine won't need training, and will work with lower-quality audio, but will have a lower recognition quality than the Desktop engine
|
|
|
|
|
Hey there.
I have a file that I want to delete everytime I build or execute my c# code i.e without running the code.Do I have to write some command line in project properties?
I searched out everywhere but all in vain.
Anticipating urgent response.
|
|
|
|
|
Depending on whether you want to do it before or after compilation it's easy to do in VS: Look under the project properties and you will see a "Build events" tab on the right hand side.
You can enter any CMD or Powershell commands in there and they will be executed (I use them to timestamp assemblies: Timestamping assemblies with Build date and time.[^] but you can do pretty much anything in there)
You can't cause a file to be deleted each time you execute your app though - not unless your app actually does the delete itself (which is easy enough to do) - because VS isn't necessarily involved in each execution: you can double click any exe file, even debug ones and they will run on their own.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I have a Windows Forms Application and added a User Control to the project. The User Control contains a TextBox and a button, the button opens FolderBrowseDialog, however the drag and drop code section is not working. If I use the drag and drop code on a Form without a User Control it works perfectly, but not contained within the User Control on a Form. Not sure on how to go about this, any advice will be greatly appreciated.
Form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TestCopyFolder
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
ucCopyDir.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TestCopyFolder
{
public partial class ucCopyDir : UserControl
{
public ucCopyDir()
{
InitializeComponent();
}
private void txtBoxCpSrc_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false) == true)
{
e.Effect = DragDropEffects.All;
}
}
private void txtBoxCpSrc_DragDrop(object sender, DragEventArgs e)
{
string[] files1 = (string[])e.Data.GetData(DataFormats.FileDrop,false);
foreach (string file1 in files1)
txtBoxCpSrc.Text = file1;
}
private void btnCpSrcBrowse_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
txtBoxCpSrc.Text = (fbd.SelectedPath);
}
}
}
}
modified 22-Nov-19 5:05am.
|
|
|
|
|
Did you set the AllowDrop property on the TextBox to true? Without it, drag and drop won't work.
|
|
|
|
|
Hi Dave
Thank you for the reply, the AllowDrop property is set to true, I tried setting the User Control AllowDrop to false and only the textBox to true as well, without any success.
Just an update:
I had to specify the methods in the Events 'DragDrop' and 'DragEnter' of the textBox Events respectively, for it to work.
DragDrop: txtBoxCpSrc_DragDrop
DragEnter: txtBoxCpSrc_DragEnter
Thanks again
modified 22-Nov-19 4:39am.
|
|
|
|
|
That was my next question. Did the events get wired up? You look in the .designer.cs file to make sure the events show up and are wired to the methods you expect them to be wired up to.
|
|
|
|
|
The events were blank so I wired them up to the correct methods, tested, and it worked.
Thank you for your time and help, I appreciate it.
|
|
|
|
|
I want to evaluate an a string math expression , so before i want to extract variables so i have to remove all special characters my code only can remove a special character like `a+b*c` and the result i get is `a=;b=;c=`, now if i write two successive special characters like `(a+b)*c` and `a++b` results will be `=;a=;b=;c=` and `a=;=;b=` always there is a sign `=;` added for no reasons how get rid of them because after that i will use mathematic functions so that will be a real problem for me please help me ! here is my code
public string RemoveSpecialCharacters(string str)
{
StringBuilder sb = new StringBuilder();
for(int i=0; i<str.Length;i++)
{
if((str[i] >= '0' && str[i] <='9')
||( str[i] >='A' && str[i]<='z'|| (str[i]=='-' || str[i] == '+' || str[i] == '*' || str[i] == '/' || str[i] == '%'|| str[i] ==')' || str[i] == '(')))
{
sb.Append(str[i]);
}
}
return sb.ToString();
}
private void button8_Click(object sender, EventArgs e)
{
string refine_string = RemoveSpecialCharacters(textBox1.Text);
string[] split_var = refine_string.Split('+', '-', '/', '%', '^', '*', '=',')','(');
double value;
string str = "";
for (int i = 0; i < split_var.Length; i++)
{
if (double.TryParse(split_var[i], out value))
{
split_var[i] = " ";
}
}
split_var = split_var.Where(s => s != " ").ToArray();
string[] variables = split_var.Distinct().ToArray();
for (int j = 0; j < variables.Length; j++)
{
str = str + variables[j] + '=' + ";";
}
textBox2.Text = str.TrimEnd(';');
}
|
|
|
|
|
|
How can i use that ! help me
|
|
|
|
|
It's an article: read it and it will explain.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm trying to build a dynamic menu from database and pass it to DevExpress Menu control my table looks like:
(Primary)
(int) - nvarchar(50) - (int)
Iserial - Department - ParentIserial
if the department has no parent then ParentIserial = 0 otherwise it will = the parent's Iserial
Ibuilt the model like this
public class TblDepartments {
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int Iserial { get; set; }
public nvarchar(50) Department { get; set; }
public int ParentIserial{ get; set; }
public IEnumerable<TblDepartments> items { get; set; }
}
and I was following this link
Overview - ASP.NET Core Menu Demo | DevExpress[^]
so please tell me how to build the structure same as the have done it on their demo to pass it to the control
Thanks in advance
JusT LeT YouR MinD WorK
|
|
|
|
|
Why not ask the people who wrote the demo? You have a licence to use the controls, which gives you access to tech support from them - so use it!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|