An event arguments class that indicates a tool want to display a view.
상속: System.EventArgs
		/// <summary>
		/// Resets archive invalidation.
		/// </summary>
		public void ResetArchiveInvalidation()
		{
			DisplayToolViewEventArgs teaArgs = new DisplayToolViewEventArgs(m_tvwToolView, true);
			DisplayToolView(this, teaArgs);
			ApplyAI();
			CloseToolView(this, teaArgs);
		}
예제 #2
0
		/// <summary>
		/// Handles the <see cref="ITool.DisplayToolView"/> event of a tool.
		/// </summary>
		/// <remarks>
		/// This shows the tool's view.
		/// </remarks>
		/// <param name="sender">The object that raised the event.</param>
		/// <param name="e">A <see cref="DisplayToolViewEventArgs"/> describing the event arguments.</param>
		private void Tool_DisplayToolView(object sender, DisplayToolViewEventArgs e)
		{
			if (e.IsModal)
				((Form)e.ToolView).ShowDialog(this);
			else
				((Form)e.ToolView).Show(this);
		}
예제 #3
0
		/// <summary>
		/// Handles the <see cref="ITool.CloseToolView"/> event of a tool.
		/// </summary>
		/// <remarks>
		/// This closes the tool's view.
		/// </remarks>
		/// <param name="sender">The object that raised the event.</param>
		/// <param name="e">A <see cref="DisplayToolViewEventArgs"/> describing the event arguments.</param>
		private void Tool_CloseToolView(object sender, DisplayToolViewEventArgs e)
		{
			((Form)e.ToolView).Close();
		}
		/// <summary>
		/// Toggles archive invalidation.
		/// </summary>
		public void ToggleArchiveInvalidation()
		{
			try
			{
				if (!File.Exists(GameMode.SettingsFiles.IniPath))
				{
					MessageBox.Show(String.Format("You have no {0} INI file. Please run {0} to initialize the file before turning on Archive Invalidation.", GameMode.Name), "Missing INI", MessageBoxButtons.OK, MessageBoxIcon.Information);
					return;
				}
				DisplayToolViewEventArgs teaArgs = new DisplayToolViewEventArgs(m_tvwToolView, true);
				DisplayToolView(this, teaArgs);
				if (Update())
					((CheckedCommand)LaunchCommand).IsChecked = IsActive();
				CloseToolView(this, teaArgs);
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}