コード例 #1
0
ファイル: FwXWindow.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <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
ファイル: FwMainWnd.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <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
ファイル: FieldWorks.cs プロジェクト: sillsdev/FieldWorks
		/// ------------------------------------------------------------------------------------
		/// <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
ファイル: FwApp.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Opens the New Project dialog
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected DialogResult DeleteProjectDialog(Form newWindowToAdjustFrom)
		{
			using (FwDeleteProjectDlg dlg = new FwDeleteProjectDlg())
			{
				dlg.SetDialogProperties(this);
				return dlg.ShowDialog();
			}
		}