|
Thank you for the private email.
No, this is a public forum, and private answers do not help others - which is the whole idea.
Plus, I receive several hundred emails every day, and don't need any more!
"The error appears when I build/start the program in visual studio."
Which means it's a a compilation error - the compiler doesn't like what you wrote.
Look at the "Error List" pane, and double click on the first error. It will take you directly to the line that it thinks you got wrong.
Look at the error message and it's normally pretty obvious what you did, but if you can;t work it out, copy and paste the error message and the line that caused it (plus half a dozen lines either side for context) and post them in a reply. Don't give us pictures, we can't try compiling a picture if we can't work it out ourselves, and don't want to type it all in!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
And that's why I have email switched off.
This space for rent
|
|
|
|
|
you see the attached image, I created one new project, I drag DataSet1 on XtraReport (Figure 1 and Figure 2), I want to added to the table into DataSet1 (Figure 3 and Figure 4). I want to add the table DataSet1 as Figure 3 and Figure 4 but it's not, how do you know to add the table as Figure 3 and Figure 4 ? http://s32.postimg.org/conkyv99x/Data_Set1a.jpg
|
|
|
|
|
First off, it's telling you to "REBUILD THE PROJECT TO SEE YOUR CHANGES".
Next, RTFD's ... The DevExpress docs / demos show how to use reports and datasets.
|
|
|
|
|
Welcome to the C# forum.
Your question is about the designer, not about C#. It is also about a commercial product; you'd have more chances at the DevExpress forum.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
1. Rebuild the project as it says down there
2. You don't seem to have mapped your data to your report
3. This is the C# forum, not the DevX forum. Try it over there.
|
|
|
|
|
You see attached image. Do you know what controls in the control image that ? when I'm not click, it's like the number 1 and when i'm click It's seemed to click select number 2, it is entitled, It's same button but it's not the same button. http://www.mediafire.com/view/4e0bfc5jtvujm0q/Controlj1.JPG
|
|
|
|
|
It looks like a menu without a header caption.
This space for rent
|
|
|
|
|
I would like to convert my ResourceDictionaries to .theme files and am currently using the following to serialize and deserialize:
I am able to serialize it this way:
using (System.IO.FileStream FileStream = System.IO.File.Create(FileName))
using (System.IO.Stream Stream = Application.GetResourceStream(new Uri(AbsolutePath, UriKind.Absolute)).Stream)
{
Stream.Seek(0, System.IO.SeekOrigin.Begin);
Stream.CopyTo(FileStream);
}
To convert back, I use:
using (System.IO.FileStream FileStream = System.IO.File.OpenRead(Path))
{
NewDictionary = (ResourceDictionary)System.Windows.Markup.XamlReader.Load(FileStream);
}
But I get an error about the first character being invalid. I know this is because I have to convert the bytes back somehow, but that's where I'm stumped.
modified 28-Apr-16 14:53pm.
|
|
|
|
|
Is it writing the Byte order mark - Wikipedia, the free encyclopedia[^] at the beginning of the file?
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
I solved it! I guess all I had to do was change the build action of the .xaml files to Resource , they were originally Page .
|
|
|
|
|
Hello,
I am new to deal with Wi-fi. I want to send periodically probe request from an access point and then read all the probe response to detect all the devices in the building and can filter and build my application based on these data.
I have the permission to access all the access points and it possible also to add a hardware like wireless controller.
I was looking for a solution I found that it is possible to detect the wifi clients with an access point with a custom firmware update (e.g. Ubiquity PicoStation 2 ) and then they were able to send probe request and receive a probe response.
My question, Is it possible to do the same with already existing access points in the building
My application is academic usage.
I look forward to helping me
|
|
|
|
|
Hello
I'd like to do a file explorer. With the Microsoft tutorial i created a form with two treeviews and two listboxes. Now i want to copy files be drag and drop from one to the other listbox. liw_Source is my first Listbox. Here i want to select the files and drag it to liw_Target. In liw_Target there should the files be pasted.
The File is shown in the secont Listbox. But restarting the application, the file isn't copied. How do i copy the file?
My code:
private void liw_Source_ItemDrag(object sender, ItemDragEventArgs e)
{
string s = e.Item.ToString();
DoDragDrop(s, DragDropEffects.Copy | DragDropEffects.Move);
}
private void liw_Target_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Text))
e.Effect = DragDropEffects.Copy;
else
e.Effect = DragDropEffects.None;
}
private void liw_Target_DragDrop(object sender, DragEventArgs e)
{
string typestring = "Type";
string s = e.Data.GetData(typestring.GetType()).ToString();
string orig_string = s;
s = s.Substring(s.IndexOf(":") + 1).Trim();
s = s.Substring(1, s.Length - 2);
this.liw_Target.Items.Add(s);
IEnumerator enumerator = liw_Source.Items.GetEnumerator();
int whichIdx = -1;
int idx = 0;
while (enumerator.MoveNext()) {
string s2 = enumerator.Current.ToString();
if (s2.Equals(orig_string)) {
whichIdx = idx;
break;
}
idx++;
}
this.liw_Source.Items.RemoveAt(whichIdx);
}
Thanks for your Help.
modified 29-Apr-16 3:27am.
|
|
|
|
|
Well...you are dragging between boxes, but you aren't doing anything with the underlying files!
Look at the File.Move Method (String, String) (System.IO)[^] and transfer the files as well!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Now i've implemented a file.copy method. But my Variable SourceName wich contains the filename is always null. By debugging with breakpoint it works but without brakepoints it's always null. Any Idea how i can select the source file?
private void liw_Source_DragDrop(object sender, DragEventArgs e)
{
ListView files = (ListView)e.Data.GetData(typeof(ListView));
}
private void liw_Source_ItemDrag(object sender, ItemDragEventArgs e)
{
liw_Source.DoDragDrop(e.Item, DragDropEffects.Copy);
SourceName = e.Item.ToString();
int start = SourceName.IndexOf("{") + 1;
int end = SourceName.IndexOf("}");
TargetName = SourceName.Substring(start, end - start);
}
private void liw_Target_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Copy;
}
private void liw_Target_DragDrop(object sender, DragEventArgs e)
{
File.Copy(SourcePath + SourceName, TargetPath + SourceName, true);
}
|
|
|
|
|
When I do drag and/or drop with files, I use a collection of actual files, just like the "regular" Windows Explorer does - there's even a DataFormat for them!
Keep your drag and drop separate: your Drop is relying on the ItemDrag event of your Source setting up your names appropriately. Don't do that: Make the source provide the info, and the Destination accept them.
The way I accept them is like this:
private void frmMusicTrackRename_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
dgvTracks.Rows.Clear();
LoadFiles(files);
}
(It's part of something I wrote when I realised my music collection had three different track naming styles, and wanted to unify them.)
And don't use string concatenation to assemble a full path - use Path.Combine Method (System.IO)[^] instead as it will apply the separaters intelligently.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This is working by adding files from Windows Explorer to the list view. But when i add a "File" from another listview it doesn't work. The path from the Files is always null. In my first listview i have not the file itself. It's only a graphic wich represents the file.
Any further ideas?
Thanks
|
|
|
|
|
That would be because you aren't dragging them out of your listview as files - you are setting text format instead.
If you use the DataFormats.FileDrop Field (System.Windows)[^] it will allow you to drag them from your list box into anything which accepts files (inclding Explorer, Chrome, Word, ...)
It's not difficult!
Handle the MouseDown event for your ListView (this uses a DataGridView because I had one handy with files in a current project, and uses the right mouse button so I don't muck up my other code!)
private void myDataGridView_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
List<string> files = new List<string>();
foreach (DataGridViewRow row in myDataGridView.Rows)
{
files.Add((string)row.Cells["Location"].Value);
}
string[] selectedFiles = files.ToArray();
DataObject dragData = new DataObject(DataFormats.FileDrop, selectedFiles);
dragData.SetData(DataFormats.StringFormat, selectedFiles[0]);
DoDragDrop(dragData, DragDropEffects.Copy | DragDropEffects.Move);
}
}
That sets the list of files into the drag as files - you can now drop them on anything that accepts files!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Working fine!
Thanks again.
|
|
|
|
|
You're welcome!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
foreach (DataRow dataRow in dt.Rows)
{
if (dataRow["Column1"].ToString().Contains(["ExampleString"])
{
listBox1.Items.Add(dataRow["Column1"] + " " + dataRow["Column2"] + " " + dataRow["Column3"] + " " + dataRow["Column4"]);
}
}
string strFromCombobox = comboBox1.SelectedText;
foreach (DataRow dataRow in dt.Rows)
{
if (dataRow["Column1"].ToString().Contains(strFromCombobox)
{
listBox1.Items.Add(dataRow["Column1"] + " " + dataRow["Column2"] + " " + dataRow["Column3"] + " " + dataRow["Column4"]);
}
}
|
|
|
|
|
This is where you learn to use the debugger. Set a breakpoint on the if statement and inspect the contents of the strFromCombobox varaible. The debugger is there to show you how the code actually works instead of you guessing at it.
We really can't tell you why it fails because we can't see the contents of that variable. What every it is, it's matching content in Column1 of every row.
|
|
|
|
|
Likely not. SelectedText is the text the user has selected in the editable portion. I am guessing this is WinForms, so the property you want is SelectedItem[^], although you will need to cast it to a string.
This is all I can really do, as we don't know what type of object is in the combobox. If it's a string, great. Otherwise more logic may be needed.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
This is the code. The value has been changed to selecteditem but still not working
SqlDataAdapter da = new SqlDataAdapter();
DataSet1 ds = new DataSet1();
DataTable dt = new DataTable();
string tm = comboBox1.SelectedItem.ToString();
da.SelectCommand = cmd;
da.Fill(ds, "GameResults2015");
dt = ds.Tables["GameResults2015"];
MessageBox.Show(tm);
foreach (DataRow dataRow in dt.Rows)
{
if (dataRow["Winner/tie"].ToString().Contains(tm) || dataRow["Loser/tie"].ToString().Contains(tm))
{
listBox1.Items.Add(dataRow["Winner/tie"] + " " + dataRow["PtsW"] + " Loser " + dataRow["Loser/tie"] + " " + dataRow["PtsL"]);
}
}
|
|
|
|
|
I guess you need to also remove items that do not contains the selected string.
Philippe Mori
|
|
|
|