本文整理汇总了C#中System.Windows.StartupEventArgs.get_InitParams方法的典型用法代码示例。如果您正苦于以下问题:C# StartupEventArgs.get_InitParams方法的具体用法?C# StartupEventArgs.get_InitParams怎么用?C# StartupEventArgs.get_InitParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.StartupEventArgs
的用法示例。
在下文中一共展示了StartupEventArgs.get_InitParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application_Startup
private void Application_Startup(object sender, StartupEventArgs e)
{
int nTrainGraphHourHeight = 15;
int nTrainGraphAutoScrollTimeout = 30;
int nMaxPositionGap = 100;
int nMaxTimeGap = 15;
string strPartOfVersionName = "";
string userName = "";
LayoutParameters = TISLayoutParameters.GetLayoutParameters(new Dictionary<string, string>(e.get_InitParams()));
try
{
nTrainGraphHourHeight = Convert.ToInt32(e.get_InitParams()["TrainGraphHourHeight"]);
}
catch
{
}
try
{
nTrainGraphAutoScrollTimeout = Convert.ToInt32(e.get_InitParams()["TrainGraphScrollTimeout"]);
}
catch
{
}
try
{
nMaxPositionGap = Convert.ToInt32(e.get_InitParams()["MaxPositionGap"]);
}
catch
{
}
try
{
nMaxTimeGap = Convert.ToInt32(e.get_InitParams()["MaxTimeGap"]);
}
catch
{
}
try
{
strPartOfVersionName = e.get_InitParams()["PartOfVersionName"].ToString();
}
catch
{
}
try
{
userName = e.get_InitParams()["UserName"].ToString();
}
catch
{
}
base.set_RootVisual(new MainPage(nTrainGraphHourHeight, nTrainGraphAutoScrollTimeout, nMaxTimeGap, nMaxPositionGap, strPartOfVersionName, userName));
}
示例2: Application_Startup
private void Application_Startup(object sender, StartupEventArgs e)
{
this.userCount++;
foreach (KeyValuePair<string, string> pair in e.get_InitParams())
{
if (pair.Key == "WebCountsText")
{
this.WebCountsText = pair.Value;
}
else if (pair.Key == "LocalMapImage")
{
if (pair.Value == "1")
{
this.bLocalMapImage = true;
}
else
{
this.bLocalMapImage = false;
}
}
else if (pair.Key == "AQILevelColors")
{
foreach (string str in pair.Value.Split(new char[] { '/' }))
{
string[] strArray2 = str.Split(new char[] { ';' });
this.AQILevelColorsList.Add(new SolidColorBrush(Color.FromArgb(0xff, byte.Parse(strArray2[0]), byte.Parse(strArray2[1]), byte.Parse(strArray2[2]))));
}
}
else if (pair.Key.Contains("AlertLevelDesc"))
{
AlertDesc item = new AlertDesc();
foreach (string str2 in pair.Value.Split(new char[] { '/' }))
{
string str4;
string[] source = str2.Split(new char[] { '=' });
if (((source != null) && (source.Count<string>() == 2)) && ((str4 = source[0]) != null))
{
if (!(str4 == "Color"))
{
if (str4 == "Name")
{
goto Label_0229;
}
if (str4 == "Desc")
{
goto Label_0236;
}
}
else
{
string[] strArray5 = source[1].Split(new char[] { ';' });
item.AlertColor = new SolidColorBrush(Color.FromArgb(0xff, byte.Parse(strArray5[0]), byte.Parse(strArray5[1]), byte.Parse(strArray5[2])));
}
}
continue;
Label_0229:
item.AlertLevel = source[1];
continue;
Label_0236:
item.AlertDescText = source[1];
}
this.AlertLevelDescsList.Add(item);
}
else
{
StationData data = new StationData();
foreach (string str3 in pair.Value.Split(new char[] { ';' }))
{
string[] strArray7 = str3.Split(new char[] { '=' });
if ((strArray7 != null) && (strArray7.Count<string>() == 2))
{
switch (strArray7[0])
{
case "StationType":
data.Group = strArray7[1];
break;
case "Name":
data.Station = strArray7[1];
break;
case "ShortName":
data.ShortName = strArray7[1];
break;
case "Lat":
data.Lat = Convert.ToDouble(strArray7[1]);
break;
case "Lon":
data.Lon = Convert.ToDouble(strArray7[1]);
break;
case "Area":
data.Area = strArray7[1];
break;
case "Zone":
data.Zone = strArray7[1];
break;
//.........这里部分代码省略.........