コード例 #1
0
        private void mnModuleMenuAbout_activate(object sender, EventArgs a)
        {
            BModuleItem module = BModuleManager.GetInstance().GetModule(OID);
              	  BConfigItem config = BConfigManager.GetInstance().GetModuleConfig(module.ConfigOID);

              	  string name="", version="", description="";
              	  BValueType hodnota = config["/beline/conf/module[@name]"];
              	  if (hodnota != null) name = hodnota.ToString();
              	  hodnota = config["/beline/conf/module[@version]"];
              	  if (hodnota != null) version = hodnota.ToString();
              	  hodnota = config["/beline/conf/module[@description]"];
              	  if (hodnota != null) description = hodnota.ToString();

              	  AboutWindow about = new AboutWindow();
              	  about.Show(name, version, description, "");
        }
コード例 #2
0
        ///<summary> Handle Help -> About command from menu</summary>
        private void mnAbout_activate(object sender, EventArgs a)
        {
            Assembly asmbly = Assembly.GetEntryAssembly();
              string version = "", name="", description="", copyright="";
              Attribute attrib = Attribute.GetCustomAttribute(asmbly, typeof(AssemblyTitleAttribute));
              if (attrib != null)
            name = ((AssemblyTitleAttribute)attrib).Title;

              attrib = Attribute.GetCustomAttribute(asmbly, typeof(AssemblyConfigurationAttribute));
            if (attrib != null)
              version = ((AssemblyConfigurationAttribute)attrib).Configuration;

            attrib = Attribute.GetCustomAttribute(asmbly, typeof(AssemblyDescriptionAttribute));
              		if (attrib != null)
              		  description = ((AssemblyDescriptionAttribute)attrib).Description;

              		attrib = Attribute.GetCustomAttribute(asmbly, typeof(AssemblyCopyrightAttribute));
              		if (attrib != null)
              		  copyright = ((AssemblyCopyrightAttribute)attrib).Copyright;

              	  AboutWindow about = new AboutWindow();
              	  about.Show(name, version, description, copyright);
        }