\r
private void updateSelectedObject()\r
{\r
- bool isInstalledPackage = pkg is InstalledPackage;\r
+ InstalledPackage instPkg = pkg as InstalledPackage;\r
+ bool isInstalledPackage = instPkg != null;\r
\r
iconLabel.Image = null;\r
iconLabel.Size = Size.Empty;\r
if (isInstalledPackage) {\r
- Icon icon = AppliStation.Util.GUIUtils.GetIconForPackage((InstalledPackage) pkg);\r
+ Icon icon = AppliStation.Util.GUIUtils.GetIconForPackage(instPkg);\r
if (icon != null) {\r
iconLabel.Image = icon.ToBitmap();\r
iconLabel.Size = icon.Size;\r
summaryTextBox.Text = pkg.Summary;\r
\r
if (isInstalledPackage) {\r
- UninstallInformation uninstInfo = ((InstalledPackage) pkg).UninstallInfo;\r
+ UninstallInformation uninstInfo = instPkg.UninstallInfo;\r
\r
string instPath = null;\r
if ((pkg.Type == InstallerType.ARCHIVE)\r
}\r
\r
tabControl1.TabPages.Clear();\r
- if (pkg is InstalledPackage && string.IsNullOrEmpty(pkg.Version)) {\r
+ if (isInstalledPackage && string.IsNullOrEmpty(pkg.Version)) {\r
tabControl1.Visible = false;\r
} else {\r
tabControl1.Visible = true;\r