教学软件设计方案及程序

发布时间 2023-07-05 22:40:59作者: da0505

很多人在教学行业使用久远,在教学道路上缺少很多多媒体工具:例如计算器,多媒体助手等,今天推荐一款软件,作者原创开发,C#编译,可教学使用,不可商用!

软件下载(推荐,下载不限速):https://www.123pan.com/s/e7LDVv-ImFmH.html

github:https://github.com/da0505/C-sharp

软件代码(本代码已经过测试,测试版本VS2022):

1.圆角设计

public Form1()
        {
            this.StartPosition = FormStartPosition.CenterScreen;
            InitializeComponent();
            Type(this, 18, 0.15);
        }
        private void Type(Control sender, int p_1, double p_2)//圆角函数
        {
            GraphicsPath oPath = new GraphicsPath();

            oPath.AddClosedCurve(

                new Point[] {
            new Point(0, sender.Height / p_1),

            new Point(sender.Width / p_1, 0),

            new Point(sender.Width - sender.Width / p_1, 0),

            new Point(sender.Width, sender.Height / p_1),

            new Point(sender.Width, sender.Height - sender.Height / p_1),

            new Point(sender.Width - sender.Width / p_1, sender.Height),

            new Point(sender.Width / p_1, sender.Height),

            new Point(0, sender.Height - sender.Height / p_1) },
                (float)p_2);
            sender.Region = new Region(oPath);

        }

2.总程序跳转小程序

Process p = Process.Start("shutdown\\shutdown.exe");
                Application.ExitThread();

3.检测文件是否存在

if (File.Exists(filename))
            {
                //MessageBox.Show("文件存在");
                new Form5().Show();
            }
            else
            {
                MessageBox.Show("检测到未安装必要组件,请进行安装!\n如使用的为Edge Dev或Beta版,请安装正式版!");
                // 判断操作系统位数 64位&32位
                if (Environment.Is64BitOperatingSystem)
                {
                    Process.Start(@"download\\MicrosoftEdgeWebView2RuntimeInstallerX64.exe");
                    Application.ExitThread();
                }

                else
                {
                    Process.Start(@"download\\MicrosoftEdgeWebView2RuntimeInstallerX86.exe");
                    Application.ExitThread();
                }

                //File.Create(filename);//创建文件
            }

4.系统版本限制

 Version currentVersion = Environment.OSVersion.Version;
                Version compareToVersion = new Version("11.0");
                    if (currentVersion.CompareTo(compareToVersion) >= 0)
                    {
                        new Form7().Show();
                      }
                    else
                    {
                        MessageBox.Show("该模式仅支持Windows11及以上操作系统!");
                    }