Exemplo n.º 1
0
 private void BigBottonOn_Tick(object sender, EventArgs e)
 {
     n++;
     if (n < 2)
     {
         button.Height -= 2;
         button.Width  -= 2;
         button.Left   += 1;
         button.Top    += 2;
     }
     else
     {
         BigButtonOn.Stop();
     }
     if (Button_Up == true)
     {
         BigButtonOn.Stop();
         BigButtonOff.Start();
     }
 }
Exemplo n.º 2
0
 private void BigBottonOff_Tick(object sender, EventArgs e)
 {
     if (n != 0)
     {
         button.Height += 2;
         button.Width  += 2;
         button.Left   -= 1;
         button.Top    -= 2;
     }
     else
     {
         if (button.Left != L | button.Top != T | button.Height != H | button.Width != W)
         {
             button.Left   = L;
             button.Top    = T;
             button.Height = H;
             button.Width  = W;
         }
         BigButtonOff.Stop();
     }
     n--;
 }
Exemplo n.º 3
0
        private void Button_MouseUp(object sender, MouseEventArgs e)
        {
            Button_Up    = true;
            this.Capture = true;
            Button S = (Button)sender;

            button = S;
            if (S.Name == "StartGame" | S.Name == "KAdd" | S.Name == "Web")
            {
                BigButtonOff.Enabled = true;
                BigButtonOff.Start();
            }
            else
            {
                ButtonOff.Enabled = true;
                ButtonOff.Start();
            }
            if (S.Name == "Exit")
            {
                try
                {
                    rcT_MessageBox2.Thread_Stop = true;
                    Environment.Exit(0);
                }
                catch (Exception err)
                {
                    MessageBox.Show("警告", "启动器退出的时候遇到了错误,请将以下信息报告开发者:" + err.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (S.Name == "QSetting")
            {
                //这一段代码里面的Activate都是为了更新控件
                SettingForm Setting = new SettingForm();
                Value.Setting_Font_Page = "QSetting";
                if (Setting_Open == false)
                {
                    Setting.Show();
                    Setting_Open = true;
                    Setting.Activate();
                    form = Setting;
                }
                else
                {
                    Value.Activate_Checked = true;
                    form.Show();
                    form.Activate();
                }
            }
            if (S.Name == "GSetting")
            {
                //这一段代码里面的Activate都是为了更新控件
                SettingForm Setting = new SettingForm();
                Value.Setting_Font_Page = "GSetting";
                if (Setting_Open == false)
                {
                    Setting.Show();
                    Setting_Open = true;
                    Setting.Activate();
                    form = Setting;
                }
                else
                {
                    Value.Activate_Checked = true;
                    form.Show();
                    form.Activate();
                }
            }
            if (S.Name == "Web")
            {
                Process.Start("http://tieba.baidu.com/f?kw=%E8%BF%87%E5%B1%B1%E8%BD%A6%E5%A4%A7%E4%BA%A83&ie=utf-8");
            }
            if (S.Name == "StartGame")
            {
                if (!(Value.Game_Address == ""))
                {
                    Process RCT3S = new Process();
                    RCT3S.StartInfo.FileName = Value.Game_Address + "//" + Game_Exe_Name;
                    RCT3S.Start();
                    if (Value.Started_Run == false)
                    {
                        this.Close();
                    }
                    Say.Text = " ";
                }
                else
                {
                    Say.Text = "启动失败!";
                    MessageBox.Show("启动失败!请检查设置的游戏目录!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (S.Name == "KAdd")
            {
                if (!(Value.Game_Address == ""))
                {
                    FolderBrowserDialog KuoChong = new FolderBrowserDialog();
                    KuoChong.ShowDialog();
                    if (!(KuoChong.SelectedPath == ""))
                    {
                        CopyDirectory(KuoChong.SelectedPath, Value.Game_Address + @"\Style\Themed");
                        Say.Text = "添加完成!";
                    }
                }
                else
                {
                    MessageBox.Show("您还未设置游戏目录!该功能尚未启用!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (S.Name == "MAdd")
            {
                if (!(Value.Game_Address == ""))
                {
                    OpenFileDialog YinYue = new OpenFileDialog
                    {
                        Filter = "mp3文件|*.mp3"
                    };
                    YinYue.ShowDialog();
                    if (!(YinYue.FileName == ""))
                    {
                        File.Copy(YinYue.FileName, Value.Game_Address + @"\Music" + Path.GetFileName(YinYue.FileName));
                        Say.Text = "添加完成!";
                    }
                }
                else
                {
                    MessageBox.Show("您还未设置游戏目录!该功能尚未启用!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (S.Name == "CRepair")
            {
                if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "//RCT3"))
                {
                    OpenFileDialog CunDang = new OpenFileDialog
                    {
                        Filter = "需要修复存档的bak文件|*.bak"
                    };
                    CunDang.ShowDialog();
                    if (!(CunDang.FileName == ""))
                    {
                        CRepair_Box.Visible = true;
                        CRepair.Text        = "\r\r\r\r\r请选择存档类型";
                        CRepair.Image       = null;
                        SavesFileName       = CunDang.FileName;
                    }
                }
                else
                {
                    MessageBox.Show("未发现游戏存档目录,请检查!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            if (S.Name == "RCT3Live")
            {
#if New_Game_Version
                MessageBox.Show("此版本已经关闭游戏修复功能。");
#else
                GameFixForm GameFix = new GameFixForm();
                GameFix.Show();
#endif
            }
            this.Capture = false;
        }