public SelectTargetCard(User _Player, FECipherVit _Owner, List<Card> _Cardset) { InitializeComponent(); Player = _Player; Owner = _Owner; Cardset = _Cardset; }
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; }
public CardSetView(Region _ThisRegion, string _RegionType, User _Player, FECipherVit _Owner) { InitializeComponent(); ThisRegion = _ThisRegion; RegionType = _RegionType; Player = _Player; Owner = _Owner; }
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)); } }
public UseSkill(string[] _CardInfo, FECipherVit Owner, bool isSupportSkill) { InitializeComponent(); CardInfo = _CardInfo; this.Owner = Owner; if (isSupportSkill) { pos = 17; } else { pos = 16; } }
public SelectHero(User _Player, FECipherVit _Owner) { InitializeComponent(); Player = _Player; Owner = _Owner; }
public DeckSelect(FECipherVit _Owner) { InitializeComponent(); Owner = _Owner; }
public MsgProcessor(FECipherVit _Owner) { Owner = _Owner; }
public GetInteger(string type, FECipherVit Owner) { InitializeComponent(); Type = type; this.Owner = Owner; }
public HistoryChecker(FECipherVit Owner) { InitializeComponent(); this.Owner = Owner; }
public Connection(FECipherVit _Owner) { InitializeComponent(); Owner = _Owner; }
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); }
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; }
public OverlayQues(FECipherVit Owner) { InitializeComponent(); this.Owner = Owner; }
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); } } }