switch (m.Msg)
{
case 0x010F: //WM_IME_COMPOSITION
- IntPtr hIMC = ImmGetContext(this.Handle);
- StringBuilder sb = new StringBuilder(1024);
- byte[] buffer = new byte[1024];
- int length = ImmGetCompositionString(hIMC, GCS_COMPSTR, buffer, 1024);
- ImmReleaseContext(this.Handle, hIMC);
- string str = Encoding.GetEncoding("Shift_JIS").GetString(buffer);
- str = str.TrimEnd('\0');
- this.ImeComposition(str);
+ if (((int)m.LParam & GCS_COMPSTR) == GCS_COMPSTR)
+ {
+ IntPtr hIMC = ImmGetContext(this.Handle);
+ StringBuilder sb = new StringBuilder(1024);
+ byte[] buffer = new byte[1024];
+ int length = ImmGetCompositionString(hIMC, GCS_COMPSTR, buffer, 1024);
+ ImmReleaseContext(this.Handle, hIMC);
+ string str = Encoding.GetEncoding("Shift_JIS").GetString(buffer);
+ str = str.TrimEnd('\0');
+ this.ImeComposition(str);
+ }
break;
}
base.WndProc(ref m);
{
if (visible)
{
-
this.Opacity = this.parentTextBox.FindForm().Opacity;
this.Visible = true;
}
{
DrawItemEventArgs ea;
Rectangle r = new Rectangle();
- for(int i = this.TopIndex; (i < this.Items.Count) && (i < this.TopIndex + this.showItemCount); i++)
+ for (int i = this.TopIndex; (i < this.Items.Count) && (i < this.TopIndex + this.showItemCount); i++)
{
r.X = 0;
r.Y = (i - this.TopIndex) * this.ItemHeight;
}
try
{
- System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
+ ProcessStartInfo info = new ProcessStartInfo();
CommandInfo commandInfo = Program.CommandDic[str];
info.FileName = EnvDeploy(commandInfo.Target);
info.WorkingDirectory = EnvDeploy(commandInfo.Path);
this.DoVisibleChange(false);
return true;
}
- catch
+ catch (Exception ex) { MessageBox.Show("ex: " + ex.ToString()); }
{
return false;
}
item.Type = IconListBoxType.SearchEngine;
this.searchTextBox.TextBox.DropdownForm.DropdownListBox.Items.Add(item);
}
- this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(true);
+
this.searchTextBox.TextBox.SetDropdownFormLocation();
//this.searchTextBox.TextBox.DropdownForm.DropdownListBox.SelectedIndex = 0;
+ this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(true);
+ //this.searchTextBox.TextBox.DropdownForm.DropdownListBox.SelectedIndex = -1;
}
}
break;
if (this.searchTextBox.TextBox.DropdownForm.Visible)
this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(false);
- //リージョン設定
- //IntPtr hRgn = Win32.CreateRoundRectRgn(0, 0, this.Size.Width, this.Size.Height, 6, 6);
- //Win32.SetWindowRgn(this.Handle, hRgn, true);
-
-
}
private void MainForm_MouseDown(object sender, MouseEventArgs e)
break;
case 2: //WebSearch
- if(String.IsNullOrEmpty(this.searchTextBox.TextBox.Text))
+ if (String.IsNullOrEmpty(this.searchTextBox.TextBox.Text))
+ {
this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(false);
+ this.suggestString = "";
+ }
else
this.SetEngineDropdownList(this.searchTextBox.TextBox.Text);
break;
}
}
}
- catch { }
+ catch (Exception ex) { MessageBox.Show("ex: " + ex.ToString()); }
}
else
{
/// </summary>
public void SetEngineDropdownList(string text)
{
+ Debug.WriteLine("SetEngineDropdownList:" + suggestString + "," + text);
if (this.suggestString.Equals(text))
return;
private void textBox_cmd_ImeComposition(string text)
{
- if (String.IsNullOrEmpty(text))
+ Debug.WriteLine("ImeComposition:" + suggestString + "," + text);
+ if (String.IsNullOrEmpty(text)){
this.searchTextBox.TextBox.DropdownForm.DoVisibleChange(false);
+ this.suggestString = "";
+ }
else
this.SetEngineDropdownList(text);
}
return;
IconListBox listBox = this.searchTextBox.TextBox.DropdownForm.DropdownListBox;
+ if (listBox.SelectedIndex == -1)
+ return;
string text = listBox.Text;
if (text.Equals(this.dropdownListBoxText))