public Dorm(string cookie, MainForm mainForm) { this.cookie = cookie; this.mainForm = mainForm; for (int i = 0; i < MAXPAGE; i++) boards[i] = new DormBoard(); setBoard(); }
public Portal(string cookie, MainForm mainForm) { this.cookie = cookie; this.mainForm = mainForm; // board 초기화 for (int i = 0; i < 10 * 10; i++) { board1[i] = new PortalBoard(); board2[i] = new PortalBoard(); board3[i] = new PortalBoard(); board4[i] = new PortalBoard(); } for (int i = 0; i < 3 * 10; i++) { new_board4[i] = new PortalBoard(); } setBoard(board1, a1, 1, 3); setBoard(board2, a2, 1, 3); setBoard(board3, a3, 1, 3); setLastestBoard(1, 3); taskbarNotifier = new TaskbarNotifier(); taskbarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "skin.bmp"), Color.FromArgb(255, 0, 255)); taskbarNotifier.SetCloseBitmap(new Bitmap(GetType(), "close.bmp"), Color.FromArgb(255, 0, 255), new Point(121, 13)); taskbarNotifier.TitleRectangle = new Rectangle(30, 13, 80, 25); taskbarNotifier.ContentRectangle = new Rectangle(12, 30, 125, 72); taskbarNotifier.CloseClickable = true; taskbarNotifier.TitleClickable = false; taskbarNotifier.ContentClickable = true; taskbarNotifier.EnableSelectionRectangle = true; taskbarNotifier.KeepVisibleOnMousOver = true; taskbarNotifier.ReShowOnMouseOver = true; taskbarNotifier.Show("새 글 알리미", "\n포탈 공지의 새 글을\n 알려줍니다 :)", 500, 3000, 500); }
static void Main() { if (myFonts == null) { myFonts = new PrivateFontCollection(); byte[] font = Properties.Resources.malgun; fontBuffer = Marshal.AllocCoTaskMem(font.Length); Marshal.Copy(font, 0, fontBuffer, font.Length); myFonts.AddMemoryFont(fontBuffer, font.Length); } if (myBoldFonts == null) { myBoldFonts = new PrivateFontCollection(); byte[] font = Properties.Resources.malgunbd; fontBuffer = Marshal.AllocCoTaskMem(font.Length); Marshal.Copy(font, 0, fontBuffer, font.Length); myBoldFonts.AddMemoryFont(fontBuffer, font.Length); } // Application.Run(new Snake.SnakeForm()); // Application.Run(new FacebookForm()); // Application.Run(new Forms.BrowserForm("http://google.com", "")); isExit = true; Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); AutoLogin loginReg = new AutoLogin(); string regId = "", regPw = ""; if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) { Application.Exit(); MessageBox.Show("인터넷 연결에 문제가 있습니다.\r\n 프로그램을 종료합니다. :^(", "Robot의 경고"); System.Diagnostics.Process[] mProcess = System.Diagnostics.Process.GetProcessesByName(Application.ProductName); foreach (System.Diagnostics.Process p in mProcess) p.Kill(); return; } if (loginReg.ReadRegistry(ref regId, ref regPw)) { if (regPw == "") { f2 = new LoginForm(regId); Application.Run(f2); } else { id = regId; password = regPw; autoLogin = true; f1 = new MainForm(); Application.Run(f1); } } else { f2 = new LoginForm(); Application.Run(f2); } if (login == true) { f1 = new MainForm(); Application.Run(f1); } }