我在C#中制作了一个自动建议/完整文本框,我按照下面的链接,但文本框没有显示建议
//-------- Get all distinct description -----------------------------
OleDbCommand command = new OleDbCommand(Queries.qry16, Connection);
OleDbDataReader reader = command.ExecuteReader();
//--------- Storing ------------------------------------
while (reader.Read())
{
namesCollection.Add(reader.GetValue(0).ToString());
}
//----------- Close after use ---------------------------------------
reader.Close();
//----------- Set the auto suggestion in description box ------------
descriptionBox.AutoCompleteMode = AutoCompleteMode.Suggest;
descriptionBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
descriptionBox.AutoCompleteCustomSource = namesCollection;
Run Code Online (Sandbox Code Playgroud)
这是我的代码,它是winform的加载函数.并且nameCollection初始化在构造函数中...请帮助使其正常工作.
我正在编辑我的帖子而不是创建新的...我已经在单行文本框中尝试了我自己的代码并且它有效.现在我想在多行中使用相同的...对于研究我用Google搜索超过2天尝试不同的代码(一个具有智能感)但它没有在文本框中提供自动建议.任何人都可以给我建议将整个程序编码为多行..谢谢.
我有这种格式的列表像素
ArrayList list = new ArrayList();
list.add(Red);
list.add(Blue);
list.add(Green);
Run Code Online (Sandbox Code Playgroud)
我有很多像这样的价值观.我想将数组列表转换为图像..尝试了很多,但没有找到任何适当的材料.
编辑:这可能有所帮助:
List<byte> pic = new List<byte>();
for (int j = 0; j < headdata.Count; j++)
{
if(headdata.ElementAt(j).getHead() == i)
{
pic.Add((byte)headdata.ElementAt(j).getRed());
pic.Add((byte)headdata.ElementAt(j).getGreen());
pic.Add((byte)headdata.ElementAt(j).getBlue());
}
}
Run Code Online (Sandbox Code Playgroud) 任何想法如何从代码中捕获SDK 8.1 windows手机中的屏幕?对于Windows Phone 7.5我已经看过代码并试图使用,但它失败了.:(
我正在研究一个多次调用网址的项目
request = (HttpWebRequest)WebRequest.Create(url);
request.GetResponse();
Run Code Online (Sandbox Code Playgroud)
这是我的代码.它处于一个循环中,它可以工作2次,但在第三次迭代时它会挂起.没有崩溃或错误.请帮忙.任何帮助将不胜感激.
错误:等待20分钟后.
System.Net.WebException was unhandled
Message=The operation has timed out
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at ConsoleApplication1.Program.Main(String[] args) in C:\WorkSpace\ConsoleApplication1\ConsoleApplication1\Program.cs:line 48
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Run Code Online (Sandbox Code Playgroud)
的InnerException:
当我尝试直接在asp.net上传文件时,我收到以下错误
index-1.jpg (image/jpeg) - 7.72 kb (error) (In red sign)
<ajaxToolkit:AjaxFileUpload ID="imageUploader" CssClass="uploadBox" OnUploadComplete="imageuploader_onUploadComplete" ThrobberID="imagethrobber" AllowedFileTypes="jpg,jpeg,png,bmp" MaximumNumberOfFiles="1" runat="server" />
Run Code Online (Sandbox Code Playgroud)
以下是我的代码.
//=========== Uploaded file format ============================
string filename = e.FileName;
//============== Upload the file ==============================
imageUploader.SaveAs("~/articleimage/"+filename);
Run Code Online (Sandbox Code Playgroud)
请帮助我解决这个问题.我正在使用visual studio 2010,.net 4和ajaxcontroltoolkit for 2010.