private void Form1_Load(object sender, EventArgs e) { GrabProxy gp = new GrabProxy(); gp.GrabInterval = 1;//指抓取时间间隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse;//设定取词的属性 gp.GrabEnabled = true;//是否取词的属性 gp.AdviseGrab(this); }
private void Form1_Load(object sender, EventArgs e) { GrabProxy gp = new GrabProxy(); gp.GrabInterval = 1; //指抓取时间间隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; //设定取词的属性 gp.GrabEnabled = true; //是否取词的属性 gp.AdviseGrab(this); }
public Form1() { InitializeComponent(); GrabProxy gp = new GrabProxy(); gp.GrabInterval = 20; //取词时间间隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; //设定取词的属性 gp.GrabEnabled = true; //取词 gp.AdviseGrab(this); }
private void Form_Load(object sender, EventArgs e) { //窗口永远置前 SetWindowPos(this.Handle, -1, Screen.PrimaryScreen.Bounds.Width / 2, Screen.PrimaryScreen.Bounds.Height / 2, this.Width, this.Height, 0); gp = new GrabProxy(); gp.GrabInterval = 1; //指抓取时间间\隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; //设定取词的属性 gp.GrabFlag = XDictGrabFlagEnum.XDictGrabOnlyEnglish; //只取英文 gp.GrabEnabled = true; //是否取词的属性 gp.AdviseGrab(this); }
private void Form1_Load(object sender, EventArgs e) { this.SetBounds(0, 0, 100, 100); //this.Visible = false; GrabProxy gp = new GrabProxy(); gp.GrabInterval = 1;//指抓取时间间隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse;//设定取词的属性 gp.GrabEnabled = true;//是否取词的属性 gp.AdviseGrab(this); toolTip1 = new ToolTip(); toolTip1.ShowAlways = true; toolTip1.ReshowDelay = 0; toolTip1.InitialDelay = 0; }
private void Form1_Load(object sender, EventArgs e) { this.SetBounds(0, 0, 100, 100); //this.Visible = false; GrabProxy gp = new GrabProxy(); gp.GrabInterval = 1; //指抓取时间间隔 gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; //设定取词的属性 gp.GrabEnabled = true; //是否取词的属性 gp.AdviseGrab(this); toolTip1 = new ToolTip(); toolTip1.ShowAlways = true; toolTip1.ReshowDelay = 0; toolTip1.InitialDelay = 0; }
private void frmTest_Load(object sender, EventArgs e) { //System.IO.FileStream fs = new System.IO.FileStream("ciba.ico", System.IO.FileMode.Create); //notifyIcon1.Icon.Save(fs); //fs.Close(); CardLibrary.GetInstance().AllowDIY = true; this.Text = "卡片词霸 v" + Global.Version; //listView2.Dock = DockStyle.None; //listView2.Location = new Point(1, 0); //listView2.Size = new Size(listView1.Size.Width - 2, listView1.Height - listView1.ClientRectangle.Height+14); listView2.Columns[0].TextAlign = HorizontalAlignment.Left; listView2.Columns[1].TextAlign = HorizontalAlignment.Left; //if (System.Environment.OSVersion.Version.Major > 5) //{ // splitContainer1.SplitterDistance = 16; //} //else splitContainer1.SplitterDistance = 16; this.Office2007ColorTable = DevComponents.DotNetBar.Rendering.eOffice2007ColorScheme.Blue; this.textBoxDropDown1.TextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxDropDown1_KeyPress); this.textBoxDropDown1.TextBox.Enter += new System.EventHandler(this.textBoxDropDown1_Enter); this.textBoxDropDown1.TextBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.textBoxDropDown1_MouseUp); Rectangle rect = new Rectangle(); rect = Screen.GetWorkingArea(this); this.MaximizedBounds = new Rectangle(rect.X - 4, rect.Y, rect.Width + 8, rect.Height); Global.cxdconfig = CXDConfig.GetInstance(); Global.frmDictHolder = this; RegisterHotKey(Handle, hkGrabEnable, 0, VK_F11); RegisterHotKey(Handle, hkMainFormVisble, 0, VK_F10); FloatForm = new frmFloat(); try { FloatForm.Opacity = double.Parse(Global.cxdconfig.GetSetting("Opacity")) / 100; } catch { FloatForm.Opacity = 0.9; } searcher = new DictSearcher(); Global.searcher = searcher; gp = new GrabProxy(); gp.GrabEnabled = true; try { gp.GrabInterval = int.Parse(Global.cxdconfig.GetSetting("Interval")); } catch { gp.GrabInterval = 30; } switch (Global.cxdconfig.GetSetting("GetWordMode")) { case "0": gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; break; case "1": gp.GrabMode = XDictGrabModeEnum.XDictGrabMouseWithCtrl; break; case "2": gp.GrabMode = XDictGrabModeEnum.XDictGrabMouseWithShift; break; case "3": gp.GrabMode = XDictGrabModeEnum.XDictGrabMouseWithMiddleButton; break; default: gp.GrabMode = XDictGrabModeEnum.XDictGrabMouse; break; } gp.AdviseGrab(this); icon1 = global::CardXDict.Properties.Resources.ciba; icon2 = global::CardXDict.Properties.Resources.cibastop; notifyIcon1.Icon = icon1; }