本文整理汇总了C#中System.Windows.Forms.ToolStripMenuItem.GetLength方法的典型用法代码示例。如果您正苦于以下问题:C# ToolStripMenuItem.GetLength方法的具体用法?C# ToolStripMenuItem.GetLength怎么用?C# ToolStripMenuItem.GetLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolStripMenuItem
的用法示例。
在下文中一共展示了ToolStripMenuItem.GetLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SearchMenu
private void SearchMenu(string username)
{
Hashtable userAccessInfo = clsGlobal.g_objfrmMDIMain.UserAccess.GetUserAccessInfo(username);
ToolStripMenuItem[] itemArray = new ToolStripMenuItem[] {
this.toolBarLogBtnStartLogMenu, this.toolBarLogBtnStopLogMenu, this.toolBarLogBtnDurationLogMenu, this.rxSettingsMenuItem, this.rxViewModeMenuItem, this.viewModeMenuItem, this.viewModeHexMenu, this.viewModeNmeaTextMenu, this.viewModeSSBMenu, this.viewModeGP2Menu, this.viewModeGPSMenu, this.allMessagesMenu, this.messagesFilterMenuItem, this.messagesFilterDebugMenu, this.messagesFilterResponseMenu, this.messageFilterGeneralMenu,
this.locationMapMenu, this.signalViewMenu, this.radarMapMenu, this.cwInterfenceDetectionMenu, this.lowPowerCommandBufferMenu, this.satelliteStatisticsMenuItem, this.SiRFAwareMenuItem, this.TTFFMenuItem, this.rxCommandsMenuItem, this.resetMenu, this.pollSWVersionMenu, this.pollAlmanacMenu, this.pollEphemerisMenu, this.setDevelopersDebugMenu, this.switchOperationModeMenu, this.lowPowerMenu,
this.setABPMenuItem, this.setABPEnableMenu, this.setABPDisableMenu, this.setMEMSDisableMenu, this.setMEMSEnableMenu, this.trackerConfigurationMenu, this.trackerICPeekPokeMenu, this.inputCommandMenuItem, this.predefinedMessageMenu, this.userInputMenu, this.rxSessionMenuItem, this.openSessionMenu, this.closeSessionMenu, this.autoReplySettingsMenu, this.autoReplySummaryMenu, this.timeFreqApproxPosStatusRequest,
this.TTBMenuItem, this.rxTTBConnectMenu, this.rxTTBConfigTimeAiding, this.errorLogConfigMenuItem, this.errorLogConfigMenuItem
};
for (int i = 0; i < itemArray.GetLength(0); i++)
{
ToolStripMenuItem item = itemArray[i];
string key = item.Text.TrimStart("&".ToCharArray());
if (userAccessInfo.ContainsKey(key))
{
string str3 = (string) userAccessInfo[key];
if (str3 != null)
{
if (!(str3 == "Hidden"))
{
if (str3 == "Disabled")
{
goto Label_02D2;
}
if (str3 == "Enabled")
{
goto Label_02DB;
}
}
else
{
item.Visible = false;
}
}
}
continue;
Label_02D2:
item.Enabled = false;
continue;
Label_02DB:
item.Visible = true;
item.Enabled = true;
}
}
示例2: SearchMenu
private void SearchMenu(string username)
{
Hashtable userAccessInfo = UserAccess.GetUserAccessInfo(username);
ToolStripMenuItem[] itemArray = new ToolStripMenuItem[] {
fileToolStripMenuItem, logFileToolStripMenuItem, startLogToolStripMenuItem, stopLogToolStripMenuItem, convertToolStripMenuItem, gP2GPSToolStripMenuItem, binGPSToolStripMenuItem, gPSNMEAToolStripMenuItem, gPSToKMLToolStripMenuItem, NMEAtoGPStoolStripMenuItem, ExtracttoolStripMenuItem, analysisToolStripMenuItem, toolStripMenuItem_Plot, fileOpenToolStripMenuItem, fileCloseToolStripMenuItem, fileExitToolStripMenuItem,
addReceiverToolStripMenuItem, removeReceiverToolStripMenuItem, receiverConnectToolStripMenuItem, receiverDisconnectToolStripMenuItem, signalToolStripMenuItem, radarToolStripMenuItem, mapToolStripMenuItem, tTFFAndNavAccuracyToolStripMenuItem, responseViewToolStripMenuItem, debugViewToolStripMenuItem, errorToolStripMenuItem, messageToolStripMenuItem, mEMSViewToolStripMenuItem, compassToolStripMenuItem, altitudeMeterToolStripMenuItem, receiverViewCWDetectionToolStripMenuItem,
satellitesStatisticsToolStripMenuItem, receiverViewSiRFawareToolStripMenuItem, siRFDRiveStatusToolStripMenuItem, siRFDRiveSensorToolStripMenuItem, siRFDRiveToolStripMenuItem, commandToolStripMenuItem, resetToolStripMenuItem, pollSoftwareVesrionToolStripMenuItem, pollAlmanacToolStripMenuItem, pollEphemerisToolStripMenuItem, pollNavParametersToolStripMenuItem, switchPowerModeToolStripMenuItem, switchOperationModeToolStripMenuItem, switchProtocolsToolStripMenuItem, setAlmanacToolStripMenuItem, setEphemerisToolStripMenuItem,
setEEToolStripMenuItem, setDebugLevelsToolStripMenuItem, setDGPSToolStripMenuItem, setMEMSToolStripMenuItem, enableMEMSToolStripMenuItem, disableMEMSToolStripMenuItem, setABPToolStripMenuItem, enableABPToolStripMenuItem, disableABPToolStripMenuItem, lowPowerCommandsBufferToolStripMenuItem, iCConfigureToolStripMenuItem, iCPeekPokeToolStripMenuItem, inputCommandsToolStripMenuItem, predefinedToolStripMenuItem, userDefinedToolStripMenuItem, navigationToolStripMenuItem,
set5HzNavToolStripMenuItem, enable5HzNavToolStripMenuItem, disable5HzNavToolStripMenuItem, dOPMaskToolStripMenuItem, elevationMaskToolStripMenuItem, modeMaskToolStripMenuItem, powerMaskToolStripMenuItem, sBASRangingToolStripMenuItem, plotsToolStripMenuItem, averageCNoToolStripMenuItem, navAccuracyVsTimeToolStripMenuItem, sVTrajectoryToolStripMenuItem, sVTrackedVsTimeToolStripMenuItem, setReferenceLocationToolStripMenuItem, configureDebugErrorLogToolStripMenuItem, autoTestToolStripMenuItem,
autoTestLoopitToolStripMenuItem, autoTestStandardTestsToolStripMenuItem, autoTest3GPPToolStripMenuItem, autoTestTIA916ToolStripMenuItem, autoTestStatusToolStripMenuItem, autoTestAbortToolStripMenuItem, consoleToolStripMenuItem, featuresToolStripMenuItem, powerModeToolStripMenuItem, MEMSToolStripMenuItem, featuresSiRFawareToolStripMenuItem, tTFSToolStripMenuItem, aidingConfigureToolStripMenuItem, aidingSummaryToolStripMenuItem, aidingTTBToolStripMenuItem, TTBConnectToolStripMenuItem,
TTBConfigureTimeAidingToolStripMenuItem, TTBViewToolStripMenuItem, aidingsDownloadServerAssistedDataToolStripMenuItem, instrumentControlMenuItem, rFReplayMenuItem, rfReplayConfigurationMenu, rfPlaybackCaptureMenu, rfReplayPlaybackMenu, rfReplaySynthesizerMenu, simplexMenu, sPAzMenu, signalGeneratorMenu, testRackMenu, reportMenuItem, reportE911Menu, report3GPPMenu,
reportTIA916Menu, reportPerformanceMenu, reportResetMenu, pointToPointAnalysisReportToolStripMenuItem, mPMToolStripMenuItem, sDOGenerationToolStripMenuItem, windowMenuItem, cascadeMenu, tileVerticalMenu, tileHorizontalMenu, restoreLayoutMenuItem, defaultLayoutMenu, previousSettingsLayoutMenu, userSettingsLayoutMenu, saveLayoutMenu, helpMenuItem,
aboutMenu, developerDocMenu, userManualMenu
};
for (int i = 0; i < itemArray.GetLength(0); i++)
{
ToolStripMenuItem item = itemArray[i];
string key = item.Text.Replace("&", "");
if (userAccessInfo.ContainsKey(key))
{
string str3 = (string) userAccessInfo[key];
if (str3 == null)
{
goto Label_064D;
}
if (!(str3 == "Hidden"))
{
if (str3 == "Disabled")
{
goto Label_0634;
}
if (str3 == "Enabled")
{
goto Label_063D;
}
goto Label_064D;
}
item.Visible = false;
}
continue;
Label_0634:
item.Enabled = false;
continue;
Label_063D:
item.Visible = true;
item.Enabled = true;
continue;
Label_064D:
item.Visible = false;
}
}