switch (e.KeyCode)
{
case Keys.Tab:
- if (this.dropdownForm.Visible)
+ if (this.dropdownForm.Visible && this.dropdownForm.DropdownListBox.SelectedIndex >= 0)
{
//タブキーによるコマンド補完
this.complemented = true;
//e.Handled = true;
}
break;
-/*
+
case Keys.A:
if ((Keys.Control & Control.ModifierKeys) == Keys.Control || Keys.Home == e.KeyCode)
{
e.Handled = true;
}
break;
-*/
+
case Keys.Up:
if (listBox.Items.Count > 0)
{
str = str.Substring(0, str.IndexOf('/', n + 2)) + "/favicon.ico";
WebClient wc = new WebClient();
+ string file = Program.EngineIconTmpDir + "\\" + this.id;
try
{
Program.CreateEngineIconTmpDir();
- string file = Program.EngineIconTmpDir + "\\" + this.id;
wc.DownloadFile(str, file);
+ }
+ catch
+ {
+ MessageBox.Show("ダウンロードエラー");
+ return;
+ }
+
+ try
+ {
Bitmap bitmap = new Bitmap(file);
this.button_icon.Image = new Bitmap(bitmap);
bitmap.Dispose();
this.iconChanged = true;
+ return;
}
- catch
+ catch
{
- MessageBox.Show("ダウンロードエラー");
+ MessageBox.Show("画像の変換に失敗しました。");
+ return;
}
+
}
private void button_cancel_Click(object sender, EventArgs e)
using System.Runtime.InteropServices;
using System.Reflection;
using System.Windows.Forms;
+using System.Web;
using System.Xml;
using Lugens.Components;
public partial class MainForm : Form
{
private static IntPtr hWndClipboardNext = IntPtr.Zero;
-
+
private bool windowMoveFlag = false;
private Point seenPoint;
if (jsonReader.TokenType == JsonToken.EndArray)
break;
if (jsonReader.TokenType == JsonToken.String)
- list.Add(jsonReader.Value.ToString());
+
+ list.Add(HttpUtility.HtmlDecode(jsonReader.Value.ToString()));
}
}
}
- if (this.suggestString.Equals(list[0]))
+ if (this.suggestString.ToLower().Equals(list[0].ToLower()))
{
list.RemoveAt(0);
if (list.Count > 0)
StreamReader streamReader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(response.CharacterSet));
string str = streamReader.ReadToEnd();
streamReader.Close();
- List<string> list = new List<string>();
- using (StringReader stringReader = new StringReader(str))
- {
- using (JsonReader jsonReader = new JsonTextReader(stringReader))
- {
- while (jsonReader.Read())
- {
- if (jsonReader.TokenType == JsonToken.String)
- list.Add(jsonReader.Value.ToString());
- }
- }
- }
- Debug.WriteLine("Win32.postmessage");
Win32.PostMessage(Program.MainFormHandle, Program.WM_SUGGEST_END, IntPtr.Zero, Marshal.StringToHGlobalAuto(str));
}
catch (Exception ex)
}
this.searchTextBox.TextBox.ImeText = text;
- if (String.IsNullOrEmpty(text))
+ if (type == 0 && String.IsNullOrEmpty(text))
{
this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(false);
this.suggestString = "";
info.Shortcut = Program.EngineDic[key].Shortcut;
info.Url = Program.EngineDic[key].Url;
info.SuggestUrl = Program.EngineDic[key].SuggestUrl;
+ info.Display = Program.EngineDic[key].Display;
info.Type = Program.EngineDic[key].Type;
info.IconImage = Program.EngineDic[key].IconImage;
info.IconChanged = false;
}
/// <summary>
- /// \83R\83}\83\93\83h\83\8a\83X\83g\82Ì\94½\89f
+ /// \8c\9f\8dõ\83G\83\93\83W\83\93\83\8a\83X\83g\82Ì\94½\89f
/// </summary>
public void ReflectEngineList()
{
string key = this.engine_iconListBox.Text;
int index = this.engineListTmp.IndexOf(key);
int selectedIndex = this.engine_iconListBox.SelectedIndex;
- this.engineListTmp[index] = "@" + this.engine_iconListBox.Text;
+ this.engineListTmp.RemoveAt(index);
+ this.engineListTmp.Add("@" + this.engine_iconListBox.Text);
+ //this.engineListTmp[index] = "@" + this.engine_iconListBox.Text;
EngineInfo info = this.engineDicTmp[key];
info.Name = "@" + this.engine_iconListBox.Text;