public int init() { if (mQuickNoteForm == null) { Console.WriteLine("QuickNoteParameter: null"); return(-1); } // string str = ""; int d = 0; ConfigReadWrite.setSection("quick_note"); if (ConfigReadWrite.read(ref str, "path") > 0) { mQuickNoteForm.mpath = str; } if (ConfigReadWrite.read(ref str, "text_append") > 0) { mQuickNoteForm.mappendText = str; } if (ConfigReadWrite.readInt(ref d, "show_last_lines") > 0) { mQuickNoteForm.mshowLastLines = d; } return(0); }
public int init() { // read parameters from configuration file; ConfigReadWrite.setSection(msection); string str = ""; Keys k = Keys.None; if (ConfigReadWrite.read(ref str, "topkey") > 0) { if (parseKey(ref k, str)) { mRmbKey.mtopkey = k; } } int d = 0; if (ConfigReadWrite.readInt(ref d, "enable_by_count") > 0) { mRmbKey.misEnableByKey = (d > 0) ? true : false; } if (ConfigReadWrite.readInt(ref d, "enable_function_window") > 0) { mKeyCmdNmv.menWindow = (d > 0) ? true : false; } if (ConfigReadWrite.readInt(ref d, "enable_function_search") > 0) { mKeyCmdNmv.mensearch = (d > 0) ? true : false; } return(0); }
public int init() { // read parameters from configuration file; ConfigReadWrite.setSection(msection); // GesFun; string str = ""; Keys key = Keys.A; string keystr = "key"; for (int i = 0; i < 8; i++) { string ks = keystr + (i + 1).ToString(); if (ConfigReadWrite.read(ref str, ks) > 0) { if (Str2Key(ref key, str) > 0) { mgesfun.mkeys[i] = key; } } } // int d = 0; if (ConfigReadWrite.readInt(ref d, "ismodifier") > 0) { mgesfun.mismodifier = d; } if (ConfigReadWrite.read(ref str, "modifier") > 0) { if (str.Equals("ctl")) { mgesfun.mmodifier = Keys.Control; } else if (str.Equals("alt")) { mgesfun.mmodifier = Keys.Alt; } } // Gesture; return(0); }
// ---- public int init() { int d = 0; // if ((d = mconfigfile.setFilename(mfilename)) < 0) { return(d); } if (!mconfigfile.isExist()) { return(-1); } ConfigReadWrite.setFilename(mfilename); // load parameter; mconfigfile.setSection("rmbkey"); if (mconfigfile.readStr("topkey") >= 0) { topkey = mconfigfile.getStr(); } //-win; if (mconfigfile.readInt("keeptime") >= 0) { mkeeptime = mconfigfile.getInt(); } if (mconfigfile.readInt("keepnum") >= 0) { mkeepnum = mconfigfile.getInt(); } if (mconfigfile.readInt("storenum") >= 0) { mstorenum = mconfigfile.getInt(); } if (mconfigfile.readInt("restorenum") >= 0) { mrestorenum = mconfigfile.getInt(); } return(0); }