Example #1
0
        private void aboutToolStripMenuItem_Click( object sender, EventArgs e )
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            AssemblyCopyrightAttribute copyright =
                (AssemblyCopyrightAttribute)AssemblyCopyrightAttribute.GetCustomAttribute(
                    assembly, typeof( AssemblyCopyrightAttribute ) );
            AssemblyTitleAttribute title =
                (AssemblyTitleAttribute)AssemblyTitleAttribute.GetCustomAttribute(
                    assembly, typeof( AssemblyTitleAttribute ) );
            System.IO.FileInfo info = new System.IO.FileInfo( assembly.Location );
            DateTime date = info.LastWriteTime;

            // Create an area class just so we can get info about the base assembly.
            HelpData.Help area = new HelpData.Help();
            string BaseName = area.GetType().Assembly.GetName().Name;
            string BaseVersion = area.GetType().Assembly.GetName().Version.ToString();
            System.IO.FileInfo BaseInfo = new System.IO.FileInfo( area.GetType().Assembly.Location );
            DateTime BaseDate = info.LastWriteTime;

            MessageBox.Show(
                title.Title +
                " version " +
                assembly.GetName().Version.ToString() +
                " built on " +
                date.ToShortDateString() +
                ".\nBased on version " +
                BaseVersion +
                " of " +
                BaseName +
                " built on " +
                BaseDate.ToShortDateString() +
                ".\nThis application is " +
                copyright.Copyright +
                "\nWritten by Jason Champion (Xangis).\nFor the latest version, visit http://basternae.org.",
                "About " + title.Title );
        }
Example #2
0
 private void btnNew_Click( object sender, EventArgs e )
 {
     StoreWindowContents();
     HelpData.Help help = new HelpData.Help();
     _helpData.Add( help );
     _selectedItem = _helpData.Count - 1;
     UpdateWindowContents( help );
 }