Esempio n. 1
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);
 }
Esempio n. 2
0
 private void UpdateWindowContents(HelpData.Help help)
 {
     txtContents.Text = help.Text;
     txtKeywords.Text = help.Keyword;
     txtSyntax.Text   = help.Syntax;
     cbLevel.Text     = help.MinimumLevel.ToString();
     txtSeeAlso.Text  = help.SeeAlso;
     lblPosition.Text = (_selectedItem + 1).ToString() + " of " + _helpData.Count.ToString();
 }
Esempio n. 3
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);
        }
Esempio n. 4
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 );
        }
Esempio n. 5
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 );
 }