Пример #1
0
        //-------------------------------------------------------------------------------
        private void m_btnAbout_Click(object sender, EventArgs e)
        {
            AssemblyAttributeAccessors aaa = new AssemblyAttributeAccessors(this);
            string        stringTitle      = aaa.AssemblyTitle;
            FormAboutData formAboutData    = new FormAboutData(
                this,
                new Copyright[] { new Copyright(this, res.Resources.SpringAvestanEditorLogo) },
                new Credits[] { new Credits(stringTitle,
                                            new Credit[] {
                    new Credit(
                        "ArdeshirV",
                        @"ArdeshirV is 'Spring Avestan Editor' founder and developer.
Spring Avestan Editor: https://ardeshirv.github.io/SpringAvestanEditor/
Github: https://github.com/ArdeshirV/SpringAvestanEditor
Email: [email protected]",
                        af.Resources.ArdeshirV)
                }) },
                new Forms.License[] {
                new Forms.License(stringTitle, res.Resources.LICENSE, res.Resources.GPLv3)
            },
                new Donations[] {
                new Donations(stringTitle, DefaultDonationList.Items)
            },
                m_strLink,
                m_strSupportMail);

            FormAbout.Show(formAboutData);
        }
        //-------------------------------------------------------------------------------
        private void buttonFormAbout_Click(object sender, EventArgs e)
        {
            // AssemblyAttributeAccessors retrive all assembly data by reflection
            AssemblyAttributeAccessors aaa = new AssemblyAttributeAccessors(this);
            string stringAssemblyTitle     = aaa.AssemblyTitle;

            // TODO: You are allowed to add your donation addresses in your code like this:

            /*Donations[] donations = new Donations[] {
             *      new Donations(      // Donations belong to this component and you can specify
             *      stringAssemblyTitle,// several donation lists for several different component in your app
             *      new Donation[] {    // All below donations addresses are linked to
             *                          // the component with stringAssemblyTitle title
             *              new Donation("Bitcoin",                             // Donation name
             *                           "1MjwviitdNC7ndvjXL3dG7mE9Pir3ZBSBP",  // Donation address
             *                   ArdeshirV.Forms.Properties.Resources.Bitcoin), // Donation logo
             *              // if you use usual public cryptocurrency logos like bitcoin and etc...
             *              // then you can refer to ArdeshirV.Forms.Properties.Resources.Bitcoin image
             *              new Donation("Ethereum",  // Here another example about Ethereum
             *                           "0x1DBED0B76d1070a47613EdEE58D9eD8afD6A206D",
             *                           ArdeshirV.Forms.Properties.Resources.Ethereum)
             *      })};*/

            // Adding all my default donation addresses
            Donations[] donations = new Donations[] {
                // Below code add default donation list to donation tab of FormAbout:
                //new Donations(stringAssemblyTitle, DefaultDonationList.Items)
                // You can add your own donation address like this:
                //new Donations("Component Name", new Donation[] {
                //                  new Donation(
                //                      "Bitcoin",                       // Currency type
                //                      "1GtjrxH6t8om8KwHAHKpcG5SAwVSsm4PEi",  // Address
                //                      res.Resources.Bitcoin)  // Currency global symbol
                //              })
            };

            Credits[] credits = new Credits[] {
                new Credits(stringAssemblyTitle, new Credit[] {
                    DefaultCreditList.GetItem("ArdeshirV")
                })
                // TODO: You are allowed to add your credit info in your code like this:
                //new Credits("Component Name", new Credit[] {
                //	            new Credit("Credit Name", "Credit Description...", CreditAvator)
                //	        })
            };

            // You can add your copyright data about your different components like below code
            Copyright[] copyrights = new Copyright[] {
                new Copyright(this, Resources.Logo)                  // the first parameter is
                // one of your components and the Copyright constructor can retrive all
                // assembly data about title, version, copyright and description automatically
                // but you are still able to specify title, version, copyright and description
                // yourself with another constructor like below:
                //, new Copyright(Text, "2.0.0", "Company", "Copyleft", "Test", ImageAppLogo)
                // but I prefer the first professional constructor and I think it's better
                // to specify details about your component in your AssemblyInfo.cs file not here
                // You can use the first kind of constructor only if you set strongname with key
            };

            License[] licenses = new License[] {
                new License(stringAssemblyTitle,                  // The component name
                            Resources.LICENSE,                    // License Contents for specified component
                            Resources.GPLv3)                      // License Logo
            };

            FormAboutData data = new FormAboutData(this,
                                                   copyrights,
                                                   credits,
                                                   licenses,
                                                   donations,
                                                   _stringWebsite,
                                                   _stringEmail);

            FormAbout.Show(data);
        }
Пример #3
0
        //-------------------------------------------------------------------------------
        private void buttonFormAbout_Click(object sender, EventArgs e)
        {
            // if you want to create the most beautiful "About form" you just need to
            // copy below code in this method into your app and change some words
            string stringProductName = Application.ProductName;

            // TODO: You can add your donation addresses in your code like below examples
            // You just need to replace your currency-name currency-address and logos
            Donations[] donations = new Donations[] {
                new Donations(                    // Donations belong to this component and you can specify
                    stringProductName,            // several donation lists for several different component in your app
                    new Donation[] {              // All below donations addresses are linked to
                    // the component-name with stringAssemblyTitle title
                    // That means each independent component of application can refer
                    // to a large number of donation addresses just like below:

                    // Here we specify donation predefined name and address and
                    // the prdefined image-logo to specified currency name
                    // will be found in the predefined currency name/logos
                    // To visit the full predefined list of currency logos check
                    // the GlobalResouces.CurrencyLogos.NamesList
                    DefaultDonationList.CreateDonationByDefaultLogos(
                        "Bitcoin", "1GtjrxH6t8om8KwHAHKpcG5SAwVSsm4PEi"),
                    // You can also use the below code instead of above code:
                    //   new Donation("Bitcoin", "1GtjrxH6t8om8KwHAHKpcG5SAwVSsm4PEi",
                    //                GlobalResouces.CurrencyLogos.GetItemByName("Bitcoin")),
                    // but it's too longer and more complicated but with same result.
                    // Here also the Bitcoin logo will be added to the list automatically.
                    DefaultDonationList.CreateDonationByDefaultLogos(
                        // Here we used predefined logo for Ethereum but without custom address:
                        "Ethereum", "0x6E6465394D14975956cd1BD37ab4E35F2C60300E"),
                    // Here we use default predefined Binance address
                    // and logo that belong to ArdeshirV: (You don't need to use it)
                    DefaultDonationList.GetItem("Binance"),
                    DefaultDonationList.GetItem("Tron"),
                    // We use predefined Nano logo with the specified custom address:
                    DefaultDonationList.CreateDonationByDefaultLogos(
                        "Nano", "nano_3feuiaogay8zbsfye5ob1xp7obwb4syfpmc4pcb7ctckhh5z8671q4uzm9tc"),
                    DefaultDonationList.CreateDonationByDefaultLogos(
                        "Tether", "0x6E6465394D14975956cd1BD37ab4E35F2C60300E"),
                    DefaultDonationList.GetItem("Paxos Standard"),
                    DefaultDonationList.GetItem("PAX Gold"),
                    DefaultDonationList.GetItem("Monero"),
                    DefaultDonationList.GetItem("Zcash"),
                })
            };

            Credits[] credits = new Credits[] {
                new Credits(stringProductName, new Credit[] {
                    DefaultCreditList.GetItem("ArdeshirV.Forms")
                })                              //,
                // TODO: You can add your credit info in your code like this example:
                //new Credits("Component Name", new Credit[] {
                //	            new Credit("Credit Name",
                //                         "Credit Description...",
                //                          CreditAvator)  // It's an image about your specified creadit
                //	        })
            };

            // You can add your copyright data about your different components
            // that are present in your app like below code:
            Copyright[] copyrights = new Copyright[] {
                new Copyright(this, Resources.Logo)                  // the first parameter is
                // one of your components and the Copyright constructor can retrive all
                // assembly data about title, version, copyright and description automatically
                // but you are still able to specify title, version, copyright and description
                // yourself with another constructor like below:
                //, new Copyright(Text, "2.0.0", "Company", "Copyleft", "Test", ImageAppLogo)
                // but I prefer the first professional constructor and I think it's better
                // to specify details about your component in your AssemblyInfo.cs file not here
                // You can use the first kind of constructor only if you set strongname with key
            };

            License[] licenses = new License[] {
                new License(stringProductName,                              // The component name
                            GlobalResouces.Licenses.GPLLicense,             // License Contents for specified component
                            GlobalResouces.Licenses.GPLLicenseLogo)         // License Logo
            };

            FormAboutData data = new FormAboutData(this,
                                                   copyrights,
                                                   credits,
                                                   licenses,
                                                   donations,
                                                   _stringWebsite,
                                                   _stringEmail);

            FormAbout.Show(data);
        }