示例#1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handle the File/"Project Management"/Delete... menu command
		/// </summary>
		/// <param name="arg"></param>
		/// <returns><c>true</c> if handled, otherwise <c>false</c></returns>
		/// ------------------------------------------------------------------------------------
		protected bool OnDeleteProject(object args)
		{
			FwDeleteProjectDlg deleteDialog = new FwDeleteProjectDlg();
			deleteDialog.SetDialogProperties(FwApp.App);

			deleteDialog.ShowDialog(this);
			return true;
		}
示例#2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Close this window
		/// </summary>
		/// <param name="args">The menu item</param>
		/// <returns><c>true</c> because we handled the message.</returns>
		/// ------------------------------------------------------------------------------------
		protected bool OnFileDelete(object args)
		{
			using (FwDeleteProjectDlg dlg = new FwDeleteProjectDlg())
			{
				dlg.SetDialogProperties(FwApp.App);
				dlg.ShowDialog();
			}
			return true;
		}
示例#3
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Lets the user delete any FW databases that are not currently open
		/// </summary>
		/// <param name="dialogOwner">The owner of the dialog</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// ------------------------------------------------------------------------------------
		internal static void DeleteProject(Form dialogOwner, IHelpTopicProvider helpTopicProvider)
		{
			Set<string> projectsInUse = new Set<string>(ProjectsInUseLocally());
			IClientServerServices css = ClientServerServices.Current;
			ILocalClientServerServices local = null;
			if (css != null)
			{
				local = css.Local;
				if (local != null && local.ShareMyProjects)
					projectsInUse.AddRange(local.ListOpenProjects());
			}
			using (FwDeleteProjectDlg dlg = new FwDeleteProjectDlg(projectsInUse))
			{
				dlg.SetDialogProperties(helpTopicProvider);
				dlg.ShowDialog(dialogOwner);
			}
			if (local != null)
				local.RefreshProjectNames();
		}
示例#4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Opens the New Project dialog
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected DialogResult DeleteProjectDialog(Form newWindowToAdjustFrom)
		{
			using (FwDeleteProjectDlg dlg = new FwDeleteProjectDlg())
			{
				dlg.SetDialogProperties(this);
				return dlg.ShowDialog();
			}
		}