public void loadDefaults() { IRegMemoryFolder reg = host.GetRegistryFolder("CncPlugin"); jog_key_x_minus = reg.GetInt("jog_x_minus", 37); // LEFT jog_key_x_plus = reg.GetInt("jog_x_plus", 39); // RIGHT jog_key_y_minus = reg.GetInt("jog_y_minus", 40); // DOWN jog_key_y_plus = reg.GetInt("jog_y_plus", 38); // UP jog_key_z_minus = reg.GetInt("jog_z_minus", 34); // PGDN jog_key_z_plus = reg.GetInt("jog_z_plus", 33); // PGUP jog_step_1 = reg.GetDouble("jog_step_1", 50); jog_step_2 = reg.GetDouble("jog_step_2", 10); jog_step_3 = reg.GetDouble("jog_step_3", 1); jog_step_4 = reg.GetDouble("jog_step_4", 0.1); step_key_1 = reg.GetInt("step_key_1", 120); // F9 step_key_2 = reg.GetInt("step_key_2", 121); // F10 step_key_3 = reg.GetInt("step_key_3", 122); // F11 step_key_4 = reg.GetInt("step_key_4", 123); // F12 spindle_start = reg.GetString("spindle_start", "M106 S%p"); spindle_stop = reg.GetString("spindle_stop", "M107"); spindle_pwm = reg.GetString("spindle_pwm", "M106 S%p"); jog_unit = reg.GetString("jog_unit", "mm"); globalkeys = reg.GetBool("globalkeys", false); }
// control load event private void testControl_Load(object sender, System.EventArgs e) { // translation load_Translations(); host.languageChanged += load_Translations; // Read the filament list from the registry and load into listview IRegMemoryFolder Ireg = host.GetRegistryFolder("FilamentInfo_plugin"); // items ar separed by "|" params by ";" string[] items = Ireg.GetString("filamentList", "").Split('|'); string[] allParams; listView_filament.BeginUpdate(); foreach (string item in items) { allParams = item.Split(';'); if (allParams.Count() < 8) { continue; } createAddNewItem(allParams); } listView_filament.EndUpdate(); }