예제 #1
0
        private void NewFormB_Load(object sender, EventArgs e)
        {
            // this.BackColor = Color.FromArgb(0, 1, 1);
            Bitmap b = new Bitmap(Properties.Resources.UI_BG);

            BitmapRegion.CreateControlRegion(this, b);

            //TransparencyKey = Color.FromArgb(0, 255, 0);

            downloadFollow                         = new UpdateSystem.DownloadFormFollow();
            downloadFollow.form                    = this;
            downloadFollow.doDownloadOver         += SetBtnText;
            downloadFollow.doShowFilesCountBar    += SetProgressBar;
            downloadFollow.doShowDownloadFileInfo += ShowDownloadFileInfo;
            downloadFollow.doShowDownloadSpeed    += ShowDownloadSpeed;
            downloadFollow.doShowTimes            += ShowGameTime;
            downloadFollow.doShowVersion          += ShowVersion;
            downloadFollow.doShowUpdateInfo       += ShowUpdateContentInfo;

            installFollow = new UpdateSystem.InstallFollow();
            installFollow.doChangeProgressBarValue += SetProgressBar;
            installFollow.doShowInstallInfo        += ShowDownloadFileInfo;
            installFollow.doShowMessageBox         += ShowMessageBox;

            OnShow();
        }
예제 #2
0
        public Form1()
        {
            InitializeComponent();

            BitmapRegion.CreateRegion(this, bmForm);
            BitmapRegion.CreateRegion(btnExit, bmExit);
        }
예제 #3
0
        private void SettingForm_Load(object sender, EventArgs e)
        {
            //初始化调用不规则窗体生成代码
            BitmapRegion BitmapRegion = new BitmapRegion();//此为生成不规则窗体和控件的类

            //BitmapRegion.CreateControlRegion(this, EJZLibrary.Properties.ResourceBackgroundImage.configFormBackground_01);
            //打开窗体特效
            AnimateWindow(this.Handle, 1000, AW_CENTER | AW_ACTIVATE);

            tckback.Value = Convert.ToInt32(PublicClass.Diaphaneity);
        }
예제 #4
0
        public Form1()
        {
            InitializeComponent();

            bmpFrmBack = new Bitmap(dir + "transparent.gif");
            BitmapRegion.CreateControlRegion(this, bmpFrmBack);
            this.Width  = bmpFrmBack.Width;
            this.Height = bmpFrmBack.Height;

            btn1.SetSkin(dir, "max");
            btn2.SetSkin(dir, "max");
        }
예제 #5
0
        public void SetSkin(string dir, string buttonName)
        {
            if (File.Exists(dir + buttonName + "_normal.png") == true)
            {
                bmp[0] = new Bitmap(dir + buttonName + "_normal.png");
            }
            else
            {
                throw (new SystemException("File: " + dir + buttonName + "_normal.png" + " does not exists"));
            }

            if (File.Exists(dir + buttonName + "_enter.png") == true)
            {
                bmp[1] = new Bitmap(dir + buttonName + "_enter.png");
            }
            else
            {
                throw (new SystemException("File: " + dir + buttonName + "_enter.png" + " does not exists"));
            }

            if (File.Exists(dir + buttonName + "_press.png") == true)
            {
                bmp[2] = new Bitmap(dir + buttonName + "_press.png");
            }
            else
            {
                throw (new SystemException("File: " + dir + buttonName + "_press.png" + " does not exists"));
            }

            if (File.Exists(dir + buttonName + "_disable.png") == true)
            {
                bmp[3] = new Bitmap(dir + buttonName + "_disable.png");
            }
            else
            {
                throw (new SystemException("File: " + dir + buttonName + "_disable.png" + " does not exists"));
            }

            this.MouseEnter += SkinCheckBox_MouseEnter;
            this.MouseLeave += SkinCheckBox_MouseLeave;

            BitmapRegion.CreateControlRegion(this, bmp[0]);
        }
예제 #6
0
 public void Checked(bool c)
 {
     m_checked = c;
     if (c)
     {
         BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.DOWN]);
     }
     else
     {
         if (m_isEnter == false)
         {
             BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.LEAVE]);
         }
         else
         {
             BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.ENTER]);
         }
     }
 }
예제 #7
0
 public void Checked(Action <bool> cb)
 {
     m_checked = !m_checked;
     if (m_checked == true)
     {
         BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.DOWN]);
     }
     else
     {
         if (m_isEnter == false)
         {
             BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.UP]);
         }
         else
         {
             BitmapRegion.CreateControlRegion(this, bmp[CommonApi.Common.ENTER]);
         }
     }
     cb(m_checked);
 }
예제 #8
0
 public Startup()
 {
     InitializeComponent();
     BitmapRegion.CreateRegion(this, Properties.Resources.logo);
 }
예제 #9
0
 public ServerStatus()
 {
     InitializeComponent();
     this.BackgroundImage = global::Pulsar.Properties.Resources.offline;
     BitmapRegion.CreateControlRegion(this, global::Pulsar.Properties.Resources.offline);
 }
예제 #10
0
파일: ASCII.cs 프로젝트: gsdt/olala-pascal
 public ASCII()
 {
     InitializeComponent();
     BitmapRegion.CreateRegion(this.button1, Properties.Resources.next);
 }
예제 #11
0
        private void NewMainUI_Load(object sender, EventArgs e)
        {
            Bitmap b = new Bitmap(Properties.Resources.UI_BG);

            BitmapRegion.CreateControlRegion(this, b);
        }