/// <summary> /// Constructor /// </summary> public UpdateManagerDialog(string message, string version, bool isRuntime, bool isSimulator) { if (!GlobalFunctions.isOnline()) { System.Windows.MessageBox.Show("You are currently experiencing internet connection issues and cannot access the Update Manager server. Please check your connection or try again later.", "Settings", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); this.Close(); } InitializeComponent(); if (version != "default") { APILevel.Visibility = System.Windows.Visibility.Collapsed; } else { APILevel.Visibility = System.Windows.Visibility.Visible; } data = new UpdateManagerData(); gridMain.DataContext = data; _version = version; _isRuntime = isRuntime; _isSimulator = isSimulator; lblMessage.Text = message; }
/// <summary> /// Uninstall button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uninstall_Click(object sender, RoutedEventArgs e) { UpdateManagerData data = gridMain.DataContext as UpdateManagerData; if (data != null) { if (data.IsInstalling) { MessageBox.Show("Visual Studio is currently already installing/uninstalling an API Level. Please wait until completion before proceeding.", "Update Manager", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } else { List <APITargetClass> apiList = APITargetListSingleton.Instance._tempAPITargetList.FindAll(i => i.IsInstalled > 0); if (apiList.Count <= 1) { MessageBox.Show("The BlackBerry Plug-in for Microsoft Visual Studio requires at least one API Target to function correctly. Removal of the last API Target is prohibited.", "Update Manager", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); } else { if (!GlobalFunctions.isOnline()) { System.Windows.MessageBox.Show("You are currently experiencing internet connection issues and cannot access the Update Manager server. Please check your connection or try again later.", "Settings", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); } else { this.Simulators.IsEnabled = false; data.UninstallAPI(((APITargetClass)((StackPanel)((Button)sender).Parent).DataContext).LatestVersion, false); } } } } }
/// <summary> /// Constructor /// </summary> public SimulatorManager() { InitializeComponent(); umData = new UpdateManagerData(); gridMain.DataContext = umData; this.Close.IsEnabled = true; }
/// <summary> /// New Start Debug Command Events Before Execution Event Handler. Call the method responsible for building the app. /// </summary> /// <param name="Guid"> Command GUID. </param> /// <param name="ID"> Command ID. </param> /// <param name="CustomIn"> Custom IN Object. </param> /// <param name="CustomOut"> Custom OUT Object. </param> /// <param name="CancelDefault"> Cancel the default execution of the command. </param> private void startDebugCommandEvents_BeforeExecute(string Guid, int ID, object CustomIn, object CustomOut, ref bool CancelDefault) { bool bbPlatform = false; if (_dte.Solution.SolutionBuild.ActiveConfiguration != null) { SolutionContexts scCollection = _dte.Solution.SolutionBuild.ActiveConfiguration.SolutionContexts; foreach (SolutionContext sc in scCollection) { if (sc.PlatformName == "BlackBerry" || sc.PlatformName == "BlackBerrySimulator") { bbPlatform = true; if (sc.PlatformName == "BlackBerrySimulator") { _isSimulator = true; } else { _isSimulator = false; } } } } Debug.WriteLine("Before Start Debug"); if (VSNDK.Package.ControlDebugEngine.isDebugEngineRunning || !bbPlatform) { // Disable the override of F5 (this allows the debugged process to continue execution) CancelDefault = false; } else { // Create a reference to the Output window. // Create a tool window reference for the Output window // and window pane. OutputWindow ow = ((DTE2)_dte).ToolWindows.OutputWindow; // Select the Build pane in the Output window. _owP = ow.OutputWindowPanes.Item("Build"); _owP.Activate(); UpdateManagerData upData = new UpdateManagerData(this); if (!upData.validateDeviceVersion(_isSimulator)) { CancelDefault = true; } else { BuildBar(); CancelDefault = true; } } }
/// <summary> /// Constructor /// </summary> private UpdateManager() { InitializeComponent(); data = new UpdateManagerData(); gridMain.DataContext = data; this.Close.IsEnabled = true; this.Simulators.IsEnabled = true; }
/// <summary> /// Constructor /// </summary> public UpdateManagerDialog() { if (!GlobalFunctions.isOnline()) { System.Windows.MessageBox.Show("You are currently experiencing internet connection issues and cannot access the Update Manager server. Please check your connection or try again later.", "Settings", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); this.Close(); } InitializeComponent(); data = new UpdateManagerData(); gridMain.DataContext = data; }
/// <summary> /// Install button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Install_Click(object sender, RoutedEventArgs e) { UpdateManagerData data = gridMain.DataContext as UpdateManagerData; if (data != null) { if (data.IsInstalling) { MessageBox.Show("Visual Studio is currently already installing/uninstalling an API Level. Please wait until completion before proceeding.", "", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } else { this.Simulators.IsEnabled = false; data.InstallAPI(((APITargetClass)((StackPanel)((Button)sender).Parent).DataContext).TargetVersion, false, false); } } }
/// <summary> /// Uninstall button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uninstall_Click(object sender, RoutedEventArgs e) { UpdateManagerData data = gridMain.DataContext as UpdateManagerData; if (data != null) { if (data.IsInstalling) { MessageBox.Show("Visual Studio is currently already installing/uninstalling an API Level. Please wait until completion before proceeding.", "Update Manager", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } else { if (((APITargetClass)((StackPanel)((Button)sender).Parent).DataContext).IsInstalled == 2) { MessageBox.Show("The API Level that you are currently trying to uninstall was not added via the Update Manager. Please remove via the Windows Add/Remove programs utility.", "Update Manager", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); } else { this.Simulators.IsEnabled = false; data.UninstallAPI(((APITargetClass)((StackPanel)((Button)sender).Parent).DataContext).TargetVersion, false); } } } }
/// <summary> /// Install button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Install_Click(object sender, RoutedEventArgs e) { UpdateManagerData data = gridMain.DataContext as UpdateManagerData; if (data != null) { if (data.IsInstalling) { MessageBox.Show("Visual Studio is currently already installing/uninstalling an API Level. Please wait until completion before proceeding.", "", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } else { if (!GlobalFunctions.isOnline()) { System.Windows.MessageBox.Show("You are currently experiencing internet connection issues and cannot access the Update Manager server. Please check your connection or try again later.", "Settings", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); } else { this.Simulators.IsEnabled = false; data.InstallAPI(((APITargetClass)((StackPanel)((Button)sender).Parent).DataContext).TargetVersion, false, false); } } } }
public void TF_Setup() { /// Create Object updateManagerDataObject = new UpdateManagerData(); }
public void Put(int managerID, [FromBody] Manager value) { IUpdateManagers editObject = new UpdateManagerData(); editObject.EditManager(value); }