public ViewTypeChangedEventArgs(SuiteViewType view, string mapname) { this._view = view; this._mapname = mapname; }
private void toolStripComboBox3_SelectedIndexChanged(object sender, EventArgs e) { // refresh the mapviewer with the values like selected if (m_prohibit_viewchange) return; switch (toolStripComboBox3.SelectedIndex) { case -1: case 0: m_viewtype = SuiteViewType.Hexadecimal; break; case 1: m_viewtype = SuiteViewType.Decimal; break; case 2: m_viewtype = SuiteViewType.Easy; break; case 3: m_viewtype = SuiteViewType.ASCII; break; default: m_viewtype = SuiteViewType.Hexadecimal; break; } ReShowTable(); CastViewTypeChangedEvent(); }
private void toolStripButton2_Click(object sender, EventArgs e) { // m_isHexMode = !m_isHexMode; if (m_viewtype != SuiteViewType.Hexadecimal) m_viewtype = SuiteViewType.Hexadecimal; else m_viewtype = m_previousviewtype; ShowTable(m_TableWidth, m_issixteenbit); }
private void CastViewTypeChangedEvent() { if (onViewTypeChanged != null) { onViewTypeChanged(this, new ViewTypeChangedEventArgs(m_viewtype, m_map_name)); m_previousviewtype = m_viewtype; } }
public AppSettings(SuiteRegistry suiteRegistry) { _suiteRegistry = suiteRegistry; // laad alle waarden uit het register RegistryKey SoftwareKey = Registry.CurrentUser.CreateSubKey("Software"); RegistryKey ManufacturerKey = SoftwareKey.CreateSubKey("MattiasC"); using (RegistryKey Settings = ManufacturerKey.CreateSubKey(_suiteRegistry.getRegistryPath())) { if (Settings != null) { string[] vals = Settings.GetValueNames(); foreach (string a in vals) { try { if (a == "MeasureAFRInLambda") { m_MeasureAFRInLambda = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "MapDetectionActive") { m_MapDetectionActive = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ViewInHex") { m_viewinhex = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DebugMode") { m_debugmode = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AdminMode") { m_adminmode = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "LastFilename") { m_lastfilename = Settings.GetValue(a).ToString(); } else if (a == "AutoExtractSymbols") { m_AutoExtractSymbols = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "LastOpenedType") { m_LastOpenedType = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "PanelMode") { _panelmode = (PanelMode)Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "StandardFill") { m_StandardFill = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "thermochannelname") { _thermochannelname = Settings.GetValue(a).ToString(); } else if (a == "adc1channelname") { _adc1channelname = Settings.GetValue(a).ToString(); } else if (a == "adc2channelname") { _adc2channelname = Settings.GetValue(a).ToString(); } else if (a == "adc3channelname") { _adc3channelname = Settings.GetValue(a).ToString(); } else if (a == "adc4channelname") { _adc4channelname = Settings.GetValue(a).ToString(); } else if (a == "adc5channelname") { _adc5channelname = Settings.GetValue(a).ToString(); } else if (a == "usethermo") { _usethermo = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "useadc1") { _useadc1 = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "useadc2") { _useadc2 = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "useadc3") { _useadc3 = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "useadc4") { _useadc4 = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "useadc5") { _useadc5 = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "adc1highvalue") { _adc1highvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc2highvalue") { _adc2highvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc3highvalue") { _adc3highvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc4highvalue") { _adc4highvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc5highvalue") { _adc5highvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc1lowvalue") { _adc1lowvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc2lowvalue") { _adc2lowvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc3lowvalue") { _adc3lowvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc4lowvalue") { _adc4lowvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc5lowvalue") { _adc5lowvalue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc1lowvoltage") { _adc1lowvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc2lowvoltage") { _adc2lowvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc3lowvoltage") { _adc3lowvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc4lowvoltage") { _adc4lowvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc5lowvoltage") { _adc5lowvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc1highvoltage") { _adc1highvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc2highvoltage") { _adc2highvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc3highvoltage") { _adc3highvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc4highvoltage") { _adc4highvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "adc5highvoltage") { _adc5highvoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "WidebandLowVoltage") { m_WidebandLowVoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "WidebandHighVoltage") { m_WidebandHighVoltage = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "WidebandLowAFR") { m_WidebandLowAFR = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "WidebandHighAFR") { m_WidebandHighAFR = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "LastProjectname") { m_lastprojectname = Settings.GetValue(a).ToString(); } else if (a == "WriteECUBatchfile") { m_write_ecubatchfile = Settings.GetValue(a).ToString(); } else if (a == "ProjectFolder") { m_ProjectFolder = Settings.GetValue(a).ToString(); } else if (a == "TargetECUReadFile") { m_TargetECUReadFile = Settings.GetValue(a).ToString(); } else if (a == "AutoChecksum") { m_AutoChecksum = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "RequestProjectNotes") { m_RequestProjectNotes = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowAddressesInHex") { m_ShowAddressesInHex = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "HideSymbolTable") { m_HideSymbolTable = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowGraphs") { m_ShowGraphs = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoSizeNewWindows") { m_AutoSizeNewWindows = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoSizeColumnsInWindows") { m_AutoSizeColumnsInWindows = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "Skinname") { m_skinname = Settings.GetValue(a).ToString(); } else if (a == "Showpopupmap") { m_Showpopupmap = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ReadECUBatchfile") { m_read_ecubatchfile = Settings.GetValue(a).ToString(); } else if (a == "ShowRedWhite") { m_ShowRedWhite = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DisableMapviewerColors") { m_DisableMapviewerColors = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoDockSameFile") { m_AutoDockSameFile = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoDockSameSymbol") { m_AutoDockSameSymbol = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowViewerInWindows") { m_ShowViewerInWindows = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "NewPanelsFloating") { m_NewPanelsFloating = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowMapPreviewPopup") { m_ShowMapPreviewPopup = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AlwaysRecreateRepositoryItems") { m_AlwaysRecreateRepositoryItems = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoLoadLastFile") { m_AutoLoadLastFile = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "FancyDocking") { m_FancyDocking = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DefaultViewType") { m_DefaultViewType = (SuiteViewType)Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "DefaultViewSize") { m_DefaultViewSize = (ViewSize)Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "SynchronizeMapviewers") { m_SynchronizeMapviewers = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AllowAskForPartnumber") { m_AllowAskForPartnumber = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowTablesUpsideDown") { m_ShowTablesUpsideDown = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "MeasureAFRInLambda") { m_MeasureAFRInLambda = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "WriteTimestampInBinary") { m_WriteTimestampInBinary = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ShowMenu") { m_ShowMenu = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "RequestProjectNotes") { m_RequestProjectNotes = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ProjectFolder") { m_ProjectFolder = Settings.GetValue(a).ToString(); } else if (a == "LastProjectname") { m_lastprojectname = Settings.GetValue(a).ToString(); } else if (a == "AutoFixFooter") { m_AutoFixFooter = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "EnableCanLog") { m_EnableCanLog = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "OnlyPBus") { m_OnlyPBus = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DisableCanCheck") { m_DisableCanCheck = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "InterpolateLogWorksTimescale") { m_InterpolateLogWorksTimescale = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoUpdateSRAMViewers") { m_AutoUpdateSRAMViewers = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "UseAdditionalCanbusFrames") { m_UseAdditionalCanbusFrames = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "ResetRealtimeSymbolOnTabPageSwitch") { m_ResetRealtimeSymbolOnTabPageSwitch = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "UseWidebandLambda") { m_UseWidebandLambda = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "UseDigitalWidebandLambda") { m_UseDigitalWidebandLambda = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "WideBandSymbol") { m_WideBandSymbol = Settings.GetValue(a).ToString(); } else if (a == "AutoCreateAFRMaps") { m_AutoCreateAFRMaps = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "UseNewMapViewer") { m_UseNewMapViewer = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "Skinname") { m_skinname = Settings.GetValue(a).ToString(); } else if (a == "RealtimeFont") { //m_RealtimeFont = new Font(Settings.GetValue(a).ToString(), 10F); TypeConverter tc = TypeDescriptor.GetConverter(typeof(Font)); //string fontString = tc.ConvertToString(font); //logger.Debug("Font as string: {0}", fontString); m_RealtimeFont = (Font)tc.ConvertFromString(Settings.GetValue(a).ToString()); } else if (a == "ApplicationLanguage") { m_ApplicationLanguage = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "AutoUpdateInterval") { m_AutoUpdateInterval = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "PlayCellProcessedSound") { m_PlayCellProcessedSound = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AllowIdleAutoTune") { m_AllowIdleAutoTune = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AcceptableTargetErrorPercentage") { m_AcceptableTargetErrorPercentage = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "AreaCorrectionPercentage") { m_AreaCorrectionPercentage = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "AutoUpdateFuelMap") { m_AutoUpdateFuelMap = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "AutoTuneFuelMap") { m_AutoTuneFuelMap = Settings.GetValue(a).ToString(); } else if (a == "CellStableTime_ms") { m_CellStableTime_ms = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "CorrectionPercentage") { m_CorrectionPercentage = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "DiscardClosedThrottleMeasurements") { m_DiscardClosedThrottleMeasurements = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DiscardFuelcutMeasurements") { m_DiscardFuelcutMeasurements = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "DisableClosedLoopOnStartAutotune") { m_DisableClosedLoopOnStartAutotune = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "EnrichmentFilter") { m_EnrichmentFilter = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "FuelCutDecayTime_ms") { m_FuelCutDecayTime_ms = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "MaximumAdjustmentPerCyclePercentage") { m_MaximumAdjustmentPerCyclePercentage = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "MaximumAFRDeviance") { m_MaximumAFRDeviance = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "MinimumAFRMeasurements") { m_MinimumAFRMeasurements = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "autoLoggingEnabled") { m_autoLoggingEnabled = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "autoLogStartSign") { m_autoLogStartSign = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "autoLogStopSign") { m_autoLogStopSign = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "autoLogStartValue") { m_autoLogStartValue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "autoLogStopValue") { m_autoLogStopValue = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "autoLogTriggerStartSymbol") { m_autoLogTriggerStartSymbol = Settings.GetValue(a).ToString(); } else if (a == "autoLogTriggerStopSymbol") { m_autoLogTriggerStopSymbol = Settings.GetValue(a).ToString(); } else if (a == "Baudrate") { _Baudrate = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "LastXAxisFromMatrix") { _LastXAxisFromMatrix = Settings.GetValue(a).ToString(); } else if (a == "LastYAxisFromMatrix") { _LastYAxisFromMatrix = Settings.GetValue(a).ToString(); } else if (a == "LastZAxisFromMatrix") { _LastZAxisFromMatrix = Settings.GetValue(a).ToString(); } else if (a == "notification1Active") { _notification1Active = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "notification2Active") { _notification2Active = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "notification3Active") { _notification3Active = Convert.ToBoolean(Settings.GetValue(a).ToString()); } else if (a == "notification1condition") { _notification1condition = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "notification2condition") { _notification2condition = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "notification3condition") { _notification3condition = Convert.ToInt32(Settings.GetValue(a).ToString()); } else if (a == "notification1sound") { _notification1sound = Settings.GetValue(a).ToString(); } else if (a == "notification2sound") { _notification2sound = Settings.GetValue(a).ToString(); } else if (a == "notification3sound") { _notification3sound = Settings.GetValue(a).ToString(); } else if (a == "notification1symbol") { _notification1symbol = Settings.GetValue(a).ToString(); } else if (a == "notification2symbol") { _notification2symbol = Settings.GetValue(a).ToString(); } else if (a == "notification3symbol") { _notification3symbol = Settings.GetValue(a).ToString(); } else if (a == "notification1value") { _notification1value = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "notification2value") { _notification2value = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "notification3value") { _notification3value = ConvertToDouble(Settings.GetValue(a).ToString()); } else if (a == "WbPort") { _WbPort = Settings.GetValue(a).ToString(); } else if (a == "WidebandDevice") { m_WidebandDevice = Settings.GetValue(a).ToString(); } else if (a == "Adapter") { m_Adapter = Settings.GetValue(a).ToString(); } else if (a == "AdapterType") { m_AdapterType = Settings.GetValue(a).ToString(); } else if (a == "WifiPort") { _WifiPort = Convert.ToInt32(Settings.GetValue(a).ToString()); } } catch (Exception E) { logger.Debug("error retrieving registry settings: " + E.Message); } } } } }