Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
 public SelectTargetCard(User _Player, FECipherVit _Owner, List<Card> _Cardset)
 {
     InitializeComponent();
     Player = _Player;
     Owner = _Owner;
     Cardset = _Cardset;
 }
Exemplo n.º 2
0
 public CardPic(Card card, string type, FECipherVit Owner)
 {
     this.Owner = Owner;
     NumberInDeck = card.NumberInDeck;
     SerialNo = card.SerialNo;
     SizeMode = PictureBoxSizeMode.StretchImage;
     ratio = Owner.ratio;
     WIDTH = (int)(80 * Owner.ratio);
     HEIGHT = (int)(112 * Owner.ratio);
     Width = WIDTH;
     Height = HEIGHT;
     if (File.Exists(@"img/thumbnails/" + ratio.ToString()+"/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg"))
     {
         Image = Image.FromFile(@"img/thumbnails/" + ratio.ToString()+"/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg");
     }
     else if (File.Exists(@"img/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg"))
     {
         Image = Image.FromFile(@"img/(" + Owner.CardData[SerialNo][1] + ")" + Owner.CardData[SerialNo][2] + ".jpg");
     }
     else
     {
         Image = ErrorImage;
     }
     thisCard = card;
     Type = type;
     FrontShown = card.FrontShown;
     IsHorizontal = card.IsHorizontal;
     Visible = card.Visible;
 }
Exemplo n.º 3
0
 public CardSetView(Region _ThisRegion, string _RegionType, User _Player, FECipherVit _Owner)
 {
     InitializeComponent();
     ThisRegion = _ThisRegion;
     RegionType = _RegionType;
     Player = _Player;
     Owner = _Owner;
 }
Exemplo n.º 4
0
 public SelectTargetCard(User _Player, FECipherVit _Owner, List<int> _Cardset)
 {
     InitializeComponent();
     Player = _Player;
     Owner = _Owner;
     Cardset = new List<Card>();
     foreach(int cardnumindeck in _Cardset)
     {
         Cardset.Add(Player.SearchCard(cardnumindeck));
     }
 }
Exemplo n.º 5
0
 public UseSkill(string[] _CardInfo, FECipherVit Owner, bool isSupportSkill)
 {
     InitializeComponent();
     CardInfo = _CardInfo;
     this.Owner = Owner;
     if (isSupportSkill)
     {
         pos = 17;
     }
     else
     {
         pos = 16;
     }
 }
Exemplo n.º 6
0
 public SelectHero(User _Player, FECipherVit _Owner)
 {
     InitializeComponent();
     Player = _Player;
     Owner = _Owner;
 }
Exemplo n.º 7
0
 public DeckSelect(FECipherVit _Owner)
 {
     InitializeComponent();
     Owner = _Owner;
 }
Exemplo n.º 8
0
 public MsgProcessor(FECipherVit _Owner)
 {
     Owner = _Owner;
 }
Exemplo n.º 9
0
 public GetInteger(string type, FECipherVit Owner)
 {
     InitializeComponent();
     Type = type;
     this.Owner = Owner;
 }
Exemplo n.º 10
0
 public HistoryChecker(FECipherVit Owner)
 {
     InitializeComponent();
     this.Owner = Owner;
 }
Exemplo n.º 11
0
 public Connection(FECipherVit _Owner)
 {
     InitializeComponent();
     Owner = _Owner;
 }
Exemplo n.º 12
0
 public User(string UserAsString, FECipherVit Owner)
 {
     this.Owner = Owner;
     List<string> temp = new List<string>();
     temp.AddRange(UserAsString.Replace("#", "").Replace("#", "").Split(new string[] { "},{" }, StringSplitOptions.None));
     Deck = new Region(temp[0], this);
     Hand = new Region(temp[1], this);
     Grave = new Region(temp[2], this);
     Support = new Region(temp[3], this);
     Kizuna = new Region(temp[4], this);
     KizunaUsed = new Region(temp[5], this);
     Orb = new Region(temp[6], this);
     FrontField = new Region(temp[7], this);
     BackField = new Region(temp[8], this);
     Overlay = new Region(temp[9], this);
     AllRegions = new List<Region>();
     AllRegions.Add(Deck);
     AllRegions.Add(Hand);
     AllRegions.Add(Grave);
     AllRegions.Add(Support);
     AllRegions.Add(Kizuna);
     AllRegions.Add(KizunaUsed);
     AllRegions.Add(Orb);
     AllRegions.Add(FrontField);
     AllRegions.Add(BackField);
     AllRegions.Add(Overlay);
 }
Exemplo n.º 13
0
 public User(FECipherVit Owner)
 {
     Deck = new Region(this);
     Hand = new Region(this);
     Grave = new Region(this);
     Support = new Region(this);
     Kizuna = new Region(this);
     KizunaUsed = new Region(this);
     Orb = new Region(this);
     FrontField = new Region(this);
     BackField = new Region(this);
     Overlay = new Region(this);
     AllRegions = new List<Region>();
     AllRegions.Add(Deck);
     AllRegions.Add(Hand);
     AllRegions.Add(Grave);
     AllRegions.Add(Support);
     AllRegions.Add(Kizuna);
     AllRegions.Add(KizunaUsed);
     AllRegions.Add(Orb);
     AllRegions.Add(FrontField);
     AllRegions.Add(BackField);
     AllRegions.Add(Overlay);
     this.Owner = Owner;
 }
Exemplo n.º 14
0
 public OverlayQues(FECipherVit Owner)
 {
     InitializeComponent();
     this.Owner = Owner;
 }
Exemplo n.º 15
0
        static void Main()
        {
            try
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                Mutex mutex = new Mutex(false, "FECipherVit");
                bool existed = false;
                try
                {
                    if (!mutex.WaitOne(0, false))
                    {
                        existed = true;
                    }
                }
                catch
                {
                    existed = true;
                }
                if (existed)
                {
                    Directory.CreateDirectory("tempconfigs");
                    File.SetAttributes("tempconfigs", FileAttributes.Hidden);
                    int i = 1;
                    while (true)
                    {
                        if (File.Exists("tempconfigs\\" + i.ToString()))
                        {
                            i++;
                        }
                        else
                        {
                            File.Create("tempconfigs\\" + i.ToString());
                            File.Copy("FECipherVit.exe.Config", "tempconfigs\\" + i.ToString() + ".config");
                            AppConfig.config = ConfigurationManager.OpenExeConfiguration("tempconfigs\\" + i.ToString());
                            break;
                        }
                    }
                }
                else
                {
                    try
                    {
                        Directory.Delete("tempconfigs", true);
                    }
                    catch { }
                }
                //处理未捕获的异常
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常
                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
                //处理非UI线程异常
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                main = new FECipherVit();
                Application.Run(main);
                mutex.Dispose();
            }
            catch (Exception ex)
            {
                string str = "";
                string strDateInfo = "出现应用程序未处理的异常:" + DateTime.Now.ToString() + "\r\n";
                if (ex != null)
                {
                    str = string.Format(strDateInfo + "异常类型:{0}\r\n异常消息:{1}\r\n异常信息:{2}\r\n",
                         ex.GetType().Name, ex.Message, ex.StackTrace);
                }
                else
                {
                    str = string.Format("应用程序线程错误:{0}", ex);
                }

                writeLog(str);
                if (main.Language == Language.Chinese)
                {
                    MessageBox.Show("程序出现错误,请将ErrLog文件夹下的ErrLog.txt文件发送给作者,谢谢合作!" + Environment.NewLine + "如果可能,请您立刻导出战报与场面信息。", "错误", MessageBoxButtons.OK);
                }
                else
                {
                    MessageBox.Show("An error occured. Please send the Errlog/Errlog.txt file to the writer, thanks! " + Environment.NewLine + "You may export your field status.", "Error", MessageBoxButtons.OK);
                }
            }
        }