private void showHideHandwritingInputToolStripMenuItem_Click(object sender, EventArgs e) { if (hw == null) { hw = new HWPan(); hw.setHandle(this); hw.SetActiveLayout(kl); hw.SetActiveScript(kp); hw.Show(); } else { hw.Close(); hw.Dispose(); hw = null; } }
private void showHideHandwritingInputToolStripMenuItem_Click(object sender, EventArgs e) { if (hw == null) { hw = new HWPan(); hw.setHandle(this); hw.SetActiveLayout(kl); hw.SetActiveScript(kp); hw.Show(); } else { hw.Close(); hw.Dispose(); hw = null; } }
private void UpdateLayout(string s) { foreach (Layout l in Layouts) { if (s == l.name) { if (!l.isIME) { scrbtn.Enabled = true; kl = new KeyboardLayout(s); kime = null; /*if (imp != null) * { * imp.Kill(); * imp = null; * }*/ laybtn.Text = kl.getname(); cfg.Write("layout", s); if (vk != null) { vk.SetActiveLayout(kl); } if (hw != null) { hw.SetActiveLayout(kl); } if (active) { /* * if (imp != null) * { * imp.Kill(); * imp = null; * }*/ } } else { kl = null; kime = new KeyboardIME(l.name); cfg.Write("layout", s); laybtn.Text = kime.getname(); if (l.name == "MyRoman") { // toolStripMenuItem2.Text = "MyRoman Browser"; } else { //toolStripMenuItem2.Enabled = false; } if (vk != null) { vk.Hide(); vk.Dispose(); vk = null; } if (active) { //if (imp != null) // imp.Kill(); imp.Reset(kime, iop);// = new IMEProcessor(kime,this, iop); } } System.GC.Collect(); return; } } }