Exemple #1
0
        public AboutUI(StartupOptions startup_options)
        {
            InitializeComponent();

            m_licence      = new Licence(startup_options.LicenceFilepath);
            m_installed_on = InstalledOn(startup_options);
            m_timer        = new Timer {
                Interval = 1000
            };

            // Version info
            m_edit_version.Text = string.Format(
                "{0} {1}" +
                "Version: {2}" +
                "Built: {3}" +
                "All Rights Reserved"
                , Util.GetAssemblyAttribute <AssemblyCompanyAttribute>().Company
                , Util.GetAssemblyAttribute <AssemblyCopyrightAttribute>().Copyright + Environment.NewLine
                , Util.AssemblyVersion() + Environment.NewLine
                , Util.AssemblyTimestamp() + Environment.NewLine
                );
            m_edit_version.Select(0, 0);

            // Version history
            m_btn_version_history.Click += (s, a) =>
            {
                HelpUI.ShowDialog(this, HelpUI.EContent.Html, "Version History", Resources.version_history);
            };

            // Update the text fields
            m_timer.Tick   += (s, a) => UpdateUI();
            m_timer.Enabled = true;

            UpdateUI();
        }
Exemple #2
0
 /// <summary>
 /// 帮助
 /// </summary>
 public void Help()
 {
     for (int i = 0; i < allUI.Length; i++)
     {
         allUI[i].SetActive(false);
     }
     HelpUI.SetActive(true);
 }
Exemple #3
0
    /// <summary>
    /// State exit event. Hides view elements.
    /// </summary>
    public override void Exit()
    {
        ui.Hide();
        DetachEventHandlers();
        if (selectedItem == ui.UnitsTabPane)
        {
            unitSelection.Exit();
        }

        selectedItem = null;
        ui           = null;
        base.Exit();
    }
Exemple #4
0
    /// <summary>
    /// State enter event. Initializes state internal variables and prepares view elements.
    /// </summary>
    public override void Enter()
    {
        base.Enter();
        GameManager manager = GameManager.Instance();

        ui = manager.GameUIInstance.HelpUIInstance;
        if (unitSelection == null)
        {
            unitSelection = new UnitSelection(ui.UnitsTabPane);
        }
        InferSelectedItem();
        AttachEventHandlers();
        ui.Show();
    }
Exemple #5
0
		static void Main(string[] args)
		{
			// Set up the unhandled exception handler
			var unhandled = (Exception)null;
			#if !DEBUG || TRAP_UNHANDLED_EXCEPTIONS
			try {
			#endif

				Environment.ExitCode = 0;
				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Xml_.Config
					.SupportWinFormsTypes()
					.SupportSystemDrawingPrimitiveTypes();

				// Start the main app
				Exception err = null;
				try { StartupOptions = new StartupOptions(args); }
				catch (Exception ex) { err = ex; }

				// If there was an error display the error message
				if (err != null)
				{
					MsgBox.Show(null,
						"There is an error in the startup options provided.\r\n"+
						$"Error Details:\r\n{err.Message}"
						, "Command Line Error"
						, MessageBoxButtons.OK
						, MessageBoxIcon.Error);
					HelpUI.ShowDialog(null, HelpUI.EContent.Html, Application.ProductName, Resources.command_line_ref);
					Environment.ExitCode = 1;
					return;
				}

				// If they just want help displayed...
				if (StartupOptions.ShowHelp)
				{
					HelpUI.ShowDialog(null, HelpUI.EContent.Html, Application.ProductName, Resources.command_line_ref);
					Environment.ExitCode = 0;
					return;
				}

				// If an export path is given, run as a command line tool doing an export
				if (StartupOptions.ExportPath != null)
				{
					RyLogViewer.Main.ExportToFile(StartupOptions);
					return;
				}

				// Otherwise show the app
				Application.Run(new Main(StartupOptions));

				// To catch any Disposes in the 'GC Finializer' thread
				GC.Collect();

			#if !DEBUG || TRAP_UNHANDLED_EXCEPTIONS
			} catch (Exception e) { unhandled = e; }
			#endif

			// Report unhandled exceptions
			if (unhandled != null)
				HandleTheUnhandled(unhandled);
		}
Exemple #6
0
 private void OnWenhaoBtn(ButtonScript obj, object args, int param1, int param2)
 {
     HelpUI.SwithShowMe(1, 4);
 }
Exemple #7
0
 private void zihyinBtnClick(ButtonScript obj, object args, int param1, int param2)
 {
     HelpUI.SwithShowMe();
 }
Exemple #8
0
 public void Help(GameObject MessageUI)
 {
     _helpUI = new HelpUI(MessageUI);
     StartCoroutine(AwakeMessage());
 }