Example #1
0
        public static void setLogComponent(RichTextBox logRichTextBox)
        {
            rtfLog = logRichTextBox;
            var logContextMenu = new ContextMenu();
            var CopyItem       = new MenuItem("&Copy");

            CopyItem.Click += (s, e) => {
                if (rtfLog.SelectedText != String.Empty)
                {
                    Clipboard.SetText(rtfLog.SelectedText);
                }
            };
            logContextMenu.MenuItems.Add(CopyItem);
            rtfLog.ContextMenu = logContextMenu;

            wnmp_log_notice("Initializing Control Panel", LogSection.WNMP_MAIN);
            wnmp_log_notice("Control Panel Version: " + Constants.CPVER, LogSection.WNMP_MAIN);
            wnmp_log_notice("Wnmp Version: " + Application.ProductVersion, LogSection.WNMP_MAIN);
            var systemInfo = new SystemInfo();

            wnmp_log_notice(systemInfo.WindowsVersionString(), LogSection.WNMP_MAIN);
            if (systemInfo.icuid.CPUIDSupported())
            {
                wnmp_log_notice("CPU: " + systemInfo.icuid.GetBrandString(), LogSection.WNMP_MAIN);
                wnmp_log_notice("CPU Features: " + systemInfo.CommonCPUFeatures(), LogSection.WNMP_MAIN);
            }
            wnmp_log_notice("Wnmp Directory: " + Application.StartupPath, LogSection.WNMP_MAIN);
        }