• 大小: 416KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: 圣诞树  C#  

资源简介

很漂亮的C#版的圣诞树程序,可以自己研究一下。当圣诞礼物也不错!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Diagnostics;

namespace XmasTree
{
    /************************************************************
     * 
     * Code License: GNU General Public License v3  
     * 
     * 本程序来源于速特网http://www.sooot.cn
     * 
     * 本程序仅供学习和研究,不得用于商业和非法用途。
     * 本程序版权归速特网所有。
     * 
     * **********************************************************/
    public partial class frmMain : Form
    {
        #region field

        private bool blnMouseDown;
        private ToolStripMenuItem activeToolStripMenuItem;
        private Point ptMouseCurrrnetPos ptMouseNewPos ptFormPos ptFormNewPos;

        private RegistryKey STARTKEY = Registry.CurrentUser;
        private const string REGKEY = @“SoftWare\MicroSoft\Windows\CurrentVersion\Run“;

        private Bitmap bitMap = null;
        private int i = 0;

        #endregion

        #region Init

        public frmMain()
        {
            InitializeComponent();
        }

        #endregion

        #region Method

        private void frmMain_Load(object sender EventArgs e)
        {
            try
            {
                this.FormBorderstyle = FormBorderstyle.None;

                int width = Screen.PrimaryScreen.WorkingArea.Width;
                int height = Screen.PrimaryScreen.WorkingArea.Height;

                Random random = new Random();
                this.Location = new Point(random.Next(width - 180) random.Next(height - 200));
                this.ShowInTaskbar = false;
                activeToolStripMenuItem = this.tsmi100;
                activeToolStripMenuItem.Image = XmasTree.Properties.Resources.check;

                RegistryKey regKey = STARTKEY;
                regKey = regKey.OpenSubKey(REGKEY true);
                object key = regKey.GetValue(“XmasTree“ null);
                if (key == null)
                {
                    this.tsmiStartUp.Image = null;
                }
                else
                {
                    this.tsmiStartUp.Image = XmasTree.Properties.Resources.check;
                }
            }
            catch (Exception ex)
            {
                ThrowError(ex);
            }
        }

        private void frmMain_MouseDown(object sender MouseEventArgs e)
        {
            try
            {
                if (e.Button == MouseButtons.Left)
                {
                    this.Cursor = Cursors.SizeAll;
                    blnMouseDown = true;

                    ptMouseCurrrnetPos = Control.MousePosition;
                    ptFormPos = Location;
                }
                if (e.Button == MouseButtons.Right)
                {
                    this.contextMenuStrip1.Show(Control.MousePosition

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     792064  2009-01-30 04:26  XmasTree\XmasTree\bin\Debug\XmasTree.exe

     文件      34304  2009-01-30 04:26  XmasTree\XmasTree\bin\Debug\XmasTree.pdb

     文件      69902  2009-01-30 04:19  XmasTree\XmasTree\bin\Debug\XmasTree.rar

     文件       8630  2009-01-30 04:25  XmasTree\XmasTree\frmMain.cs

     文件      13565  2009-01-30 04:25  XmasTree\XmasTree\frmMain.Designer.cs

     文件      18614  2009-01-30 04:25  XmasTree\XmasTree\frmMain.resx

     文件     108054  2008-12-31 09:36  XmasTree\XmasTree\images\1.bmp

     文件     108054  2008-12-31 09:35  XmasTree\XmasTree\images\2.bmp

     文件     108054  2008-12-31 09:36  XmasTree\XmasTree\images\3.bmp

     文件     108054  2008-12-31 09:36  XmasTree\XmasTree\images\4.bmp

     文件     108054  2008-12-31 09:35  XmasTree\XmasTree\images\5.bmp

     文件     108054  2008-12-31 09:35  XmasTree\XmasTree\images\6.bmp

     文件     108054  2008-12-31 09:35  XmasTree\XmasTree\images\7.bmp

     文件        822  2008-12-31 10:31  XmasTree\XmasTree\images\check.bmp

     文件       8062  2008-12-31 11:48  XmasTree\XmasTree\logo.ico

     文件       5632  2009-01-30 01:42  XmasTree\XmasTree\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        845  2009-01-30 02:32  XmasTree\XmasTree\obj\Debug\XmasTree.csproj.FileListAbsolute.txt

     文件       1109  2009-01-30 04:26  XmasTree\XmasTree\obj\Debug\XmasTree.csproj.GenerateResource.Cache

     文件     792064  2009-01-30 04:26  XmasTree\XmasTree\obj\Debug\XmasTree.exe

     文件       8628  2009-01-30 04:26  XmasTree\XmasTree\obj\Debug\XmasTree.frmMain.resources

     文件      34304  2009-01-30 04:26  XmasTree\XmasTree\obj\Debug\XmasTree.pdb

     文件     758930  2009-01-30 02:55  XmasTree\XmasTree\obj\Debug\XmasTree.Properties.Resources.resources

     文件        491  2009-01-30 01:37  XmasTree\XmasTree\Program.cs

     文件       1385  2009-01-30 02:57  XmasTree\XmasTree\Properties\AssemblyInfo.cs

     文件       4790  2009-01-30 01:42  XmasTree\XmasTree\Properties\Resources.Designer.cs

     文件       7804  2009-01-30 01:42  XmasTree\XmasTree\Properties\Resources.resx

     文件       1093  2009-01-30 01:37  XmasTree\XmasTree\Properties\Settings.Designer.cs

     文件        249  2009-01-30 01:37  XmasTree\XmasTree\Properties\Settings.settings

     文件       4268  2009-01-30 02:54  XmasTree\XmasTree\XmasTree.csproj

     文件        168  2009-01-30 01:42  XmasTree\XmasTree\XmasTree.csproj.user

............此处省略17个文件信息

评论

共有 条评论