Example #1
0
        public AboutWindow()
        {
            InitializeComponent();

            object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
            AssemblyProduct = (attributes.Length == 0) ? "" : ((AssemblyProductAttribute)attributes[0]).Product;

            AssemblyVersion = "Version " + Assembly.GetExecutingAssembly().GetName().Version;

            attributes        = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
            AssemblyCopyright = (attributes.Length == 0) ? "" : ((AssemblyCopyrightAttribute)attributes[0]).Copyright;

            attributes      = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
            AssemblyCompany = (attributes.Length == 0) ? "" : ((AssemblyCompanyAttribute)attributes[0]).Company;

            attributes          = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
            AssemblyDescription = (attributes.Length == 0) ? "" : ((AssemblyDescriptionAttribute)attributes[0]).Description;

            SKTextDisplay.Text = MainWindow.SKText;
            SKLinkDisplay.Text = MainWindow.SKLinkText;
            SKLinkDisplay.Tag  = MainWindow.SKLinkAddress;

            if (File.Exists("about.html"))
            {
                CustomLogoDisplayer.Navigate(new Uri(String.Format("file:///{0}/about.html", Directory.GetCurrentDirectory())));
                CustomLogoPanel.Visibility = Visibility.Visible;
            }

            Loaded   += OnLoaded;
            Unloaded += OnUnloaded;
        }
Example #2
0
        public AboutWindow(Vendor vendor)
        {
            InitializeComponent();

            AssemblyVersion = "Version " + Assembly.GetExecutingAssembly().GetName().Version;

            switch (vendor)
            {
            case Vendor.CiscoASA:
                AssemblyProduct     = SupportedVendors.CiscoProduct;
                AssemblyDescription = SupportedVendors.CiscoProductDescription;
                break;

            case Vendor.JuniperJunosOS:
                AssemblyProduct     = SupportedVendors.JuniperProduct;
                AssemblyDescription = SupportedVendors.JuniperProductDescription;
                break;

            case Vendor.JuniperScreenOS:
                AssemblyProduct     = SupportedVendors.NetScreenProduct;
                AssemblyDescription = SupportedVendors.NetScreenProductDescription;
                break;

            case Vendor.FortiGate:
                AssemblyProduct     = SupportedVendors.FortiGateProduct;
                AssemblyDescription = SupportedVendors.FortiGateProductDescription;
                break;
            }

            object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
            AssemblyCopyright = (attributes.Length == 0) ? "" : ((AssemblyCopyrightAttribute)attributes[0]).Copyright;

            attributes      = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
            AssemblyCompany = (attributes.Length == 0) ? "" : ((AssemblyCompanyAttribute)attributes[0]).Company;

            SKTextDisplay.Text = MainWindow.SKText;
            SKLinkDisplay.Text = MainWindow.SKLinkText;
            SKLinkDisplay.Tag  = MainWindow.SKLinkAddress;

            if (File.Exists("about.html"))
            {
                CustomLogoDisplayer.Navigate(new Uri(String.Format("file:///{0}/about.html", Directory.GetCurrentDirectory())));
                CustomLogoPanel.Visibility = Visibility.Visible;
            }

            Loaded   += OnLoaded;
            Unloaded += OnUnloaded;
        }
Example #3
0
 private void OnUnloaded(object sender, RoutedEventArgs routedEventArgs)
 {
     CustomLogoDisplayer.Dispose();
     CustomLogoDisplayer = null;
 }