private void IncrementVersionNumber(ViewerApplication application)
 {
     if (application != null && !string.IsNullOrWhiteSpace(application.Version))
     {
         Version version = null;
         if (Version.TryParse(application.Version, out version))
         {
             version = new Version(version.Major, version.Minor, version.Build, version.Revision + 1);
             application.Version = version.ToString();
         }
     }
 }
 void initializeDataContext(string appSettingsFileContents)
 {
     ViewerApplication = new ViewerApplication(appSettingsFileContents);
     if (DefaultApplicationSettings != null)
     {
         ViewerApplication.ArcGISOnlineSecure = DefaultApplicationSettings.ArcGISOnlineSecure;
         ViewerApplication.ArcGISOnlineSharing = DefaultApplicationSettings.ArcGISOnlineSharing;
         ViewerApplication.BingMapsAppId = DefaultApplicationSettings.BingMapsAppId;
         ViewerApplication.PortalAppId = DefaultApplicationSettings.PortalAppId;
         ViewerApplication.GeometryService = DefaultApplicationSettings.GeometryService;
         ViewerApplication.ArcGISOnlineProxy = DefaultApplicationSettings.ArcGISOnlineProxy;
         ViewerApplication.Proxy = DefaultApplicationSettings.Proxy;
     }
     this.DataContext = ViewerApplication;
     ESRI.ArcGIS.Mapping.Controls.ArcGISOnline.ArcGISOnlineEnvironment.LoadConfig(ViewerApplication.ArcGISOnlineSharing, ViewerApplication.ArcGISOnlineSecure, ViewerApplication.ArcGISOnlineProxy,
         true, false, false);
     ConfigurationStoreFilePath = getUrl("/Config/Admin/ConfigurationStore.xml");
     ConnectionsFileFilePath = getUrl("/Config/Admin/Connections.xml");
     SymbolConfigurationFilePath = getUrl("/Config/Admin/Symbols.xml");
     SymbolFolderParentUrl = getUrl("/Config/Symbols", true);
     MapConfigurationFilePath = getUrl("/Config/Map.xml");
     ToolsConfigurationFilePath = getUrl("/Config/Tools.xml");
     BehaviorsConfigurationFilePath = getUrl("/Config/Behaviors.xml");
     ControlsConfigurationFilePath = getUrl("/Config/Controls.xml");
     HeatMapColorGradientsConfigFileUrl = getUrl("/Config/ResourceDictionaries/HeatMapBrushes.xaml");
     ClassBreaksColorGradientsConfigFileUrl = getUrl("/Config/ResourceDictionaries/ThematicMapBrushes.xaml");
     ThemeFilePath = getUrl("/Themes/Theme.thmx");
     ApplicationColorsFilePath = getUrl("/Config/Layouts/ResourceDictionaries/Common/Colors.xaml");
     LayoutFilePath = getUrl(ViewerApplication.LayoutFilePath);
     downloadApplicationColorsFile();
 }