Exemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            this.Font = new Font(Program.myFonts.Families[0], 9);
            sayLabel.Font = new Font(Program.myBoldFonts.Families[0], 9, FontStyle.Bold);
            boardSlide.Font = new Font("Malgun Gothic", 9);

            visibleLoading();

            /************************************
             *  구성 요소 준비 단계
             ************************************/
            loadingLabel.Text = "구성 요소 준비중";
            loadingProgressBar.Value += 2;

            currentBoardMaxNum = new int[4];
            for (int i = 0; i < 4; i++)
            {
                currentBoardMaxNum[i] = 3;
            }
            currentBoardSearchQuery = new string[5];
            for (int i = 0; i < 5; i++)
            {
                currentBoardSearchQuery[i] = "";
            }

            // 브라우저 스크립트 에러 무시
            browser.ScriptErrorsSuppressed = true;
            mainBrowser.ScriptErrorsSuppressed = true;

            brows = this.browser;
            gridView = this.boardGrid;
            bbpanel = this.bbPanel;
            timer1 = this.notifyTimer;
            timer2 = this.sayTimer;
            saylabel = this.sayLabel;
            loadingprogress = this.loadingProgressBar;
            loadinglabel = this.loadingLabel;

            weatherClick = this.weatherClickBox;
            notifyPic = this.notifyBox;
            notifyClick = this.notifyClickBox;
            mailClick = this.mailClickBox;
            facebookClick = this.facebookClickBox;
            reloadClick = this.reloadClickBox;
            settingClick = this.settingClickBox;

            mailBox.Click -= new System.EventHandler(mailBox_Click);
            facebookBox.Click -= new System.EventHandler(facebookBox_Click);
            settingBox.Click -= new System.EventHandler(settingBox_Click);
            weatherBox.Click -= new System.EventHandler(weatherBox_Click);
            notifyBox.Click -= new System.EventHandler(notifyBox_Click);
            reloadBox.Click -= new System.EventHandler(reloadBox_Click);

            mailBox.Click += new System.EventHandler(loadingPictureBox_Click);
            facebookBox.Click += new System.EventHandler(loadingPictureBox_Click);
            settingBox.Click += new System.EventHandler(loadingPictureBox_Click);
            weatherBox.Click += new System.EventHandler(loadingPictureBox_Click);
            notifyBox.Click += new System.EventHandler(loadingPictureBox_Click);
            reloadBox.Click += new System.EventHandler(loadingPictureBox_Click);

            mainBrowser.Navigate("http://carpedm20.net76.net/robot_version.html");

            // 책 검색 옵션 초기화
            bookOption1.SelectedIndex = 0;
            bookOption2.SelectedIndex = 1;
            bookOperator.SelectedIndex = 0;
            roomNumberBox.SelectedIndex = 0;

            alarmForm = new AlarmForm();
            settingForm = new SettingForm();
            isLoading = true;
            autoLoginSetup();

            say = new Say();
            weather = new Weather();
            weatherTip.SetToolTip(weatherBox, weather.weather);
            weatherTip.SetToolTip(weatherClick, weather.weather);

            sayLabel.Text = say.says.ElementAt(0).Key;
            sayToolTip.SetToolTip(sayLabel, say.says.ElementAt(0).Value);
            sayLabel.ContextMenuStrip = sayStrip;

            selectedDate = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString(dateFormat);
            studyDate.Text = DateTime.Now.Year.ToString() + "." + DateTime.Now.Month.ToString(dateFormat);

            notifyTip.SetToolTip(notifyBox, "개인 알림 설정");
            reloadTip.SetToolTip(reloadBox, "세션 리로드");
            mailTip.SetToolTip(mailBox, "메일 보내기");
            settingTip.SetToolTip(settingBox, "설정");

            maxPageNumTip.SetToolTip(maxPageCountLabel, "포탈 공지에서 몇 페이지를 불러올지 정할 수 있습니다 :-)");
            announceTip.SetToolTip(announceHideCheck, "리스트에서 공지글을 숨길 수 있습니다 :^)");
            portalSearchTip.SetToolTip(portalSearchLabel, "포탈 공지에서 제목 검색을 할 수 있습니다 ;-)");
            sayTimer.Start();

            facebookForm = new FacebookForm();
        }
Exemplo n.º 2
0
        private void 페이스북ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (facebookForm == null)
            {
                facebookForm = new FacebookForm();
            }

            else
            {
                if (facebookForm.Visible == true)
                {
                    MessageBox.Show("창이 이미 열려 있습니다 :(", "Robot의 경고");
                }

                facebookForm = new FacebookForm();

                facebookForm.StartPosition = FormStartPosition.Manual;
                facebookForm.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 380, this.Location.Y);

                facebookForm.Visible = true;
            }
        }
Exemplo n.º 3
0
        private void facebookBox_Click(object sender, EventArgs e)
        {
            facebookForm = new FacebookForm();
            facebookForm.StartPosition = FormStartPosition.Manual;

            if (Screen.PrimaryScreen.Bounds.Width - this.Location.X - 850 - 359 < 0)
            {
                facebookForm.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 380, this.Location.Y);
            }

            else
            {
                facebookForm.Location = new Point(this.Location.X + 850, this.Location.Y);
            }

            facebookForm.Visible = true;
        }