Ejemplo n.º 1
0
 /*-------------------------------------------------------------------------
  * 표시항목の保存
  * ---------------------------------------------------------------------------*/
 private void save_draw_setting()
 {
     {
         DrawSettingWebIcons flag = 0;
         flag |= (checkBox100.Checked) ? DrawSettingWebIcons.wind : 0;
         flag |= (checkBox101.Checked) ? DrawSettingWebIcons.accident_0 : 0;
         flag |= (checkBox102.Checked) ? DrawSettingWebIcons.accident_1 : 0;
         flag |= (checkBox103.Checked) ? DrawSettingWebIcons.accident_2 : 0;
         flag |= (checkBox104.Checked) ? DrawSettingWebIcons.accident_3 : 0;
         flag |= (checkBox105.Checked) ? DrawSettingWebIcons.accident_4 : 0;
         m_setting.draw_setting_web_icons = flag;
     }
     {
         DrawSettingMemoIcons flag = 0;
         flag |= (checkBox200.Checked) ? DrawSettingMemoIcons.wind : 0;
         flag |= (checkBox201.Checked) ? DrawSettingMemoIcons.memo_0 : 0;
         flag |= (checkBox202.Checked) ? DrawSettingMemoIcons.memo_1 : 0;
         flag |= (checkBox203.Checked) ? DrawSettingMemoIcons.memo_2 : 0;
         flag |= (checkBox204.Checked) ? DrawSettingMemoIcons.memo_3 : 0;
         flag |= (checkBox205.Checked) ? DrawSettingMemoIcons.memo_4 : 0;
         flag |= (checkBox206.Checked) ? DrawSettingMemoIcons.memo_5 : 0;
         flag |= (checkBox207.Checked) ? DrawSettingMemoIcons.memo_6 : 0;
         flag |= (checkBox208.Checked) ? DrawSettingMemoIcons.memo_7 : 0;
         flag |= (checkBox209.Checked) ? DrawSettingMemoIcons.memo_8 : 0;
         flag |= (checkBox210.Checked) ? DrawSettingMemoIcons.memo_9 : 0;
         flag |= (checkBox211.Checked) ? DrawSettingMemoIcons.memo_10 : 0;
         flag |= (checkBox212.Checked) ? DrawSettingMemoIcons.memo_11 : 0;
         m_setting.draw_setting_memo_icons = flag;
     }
     {
         DrawSettingAccidents flag = 0;
         flag |= (checkBox300.Checked) ? DrawSettingAccidents.accident_0 : 0;
         flag |= (checkBox301.Checked) ? DrawSettingAccidents.accident_1 : 0;
         flag |= (checkBox302.Checked) ? DrawSettingAccidents.accident_2 : 0;
         flag |= (checkBox303.Checked) ? DrawSettingAccidents.accident_3 : 0;
         flag |= (checkBox304.Checked) ? DrawSettingAccidents.accident_4 : 0;
         flag |= (checkBox305.Checked) ? DrawSettingAccidents.accident_5 : 0;
         flag |= (checkBox306.Checked) ? DrawSettingAccidents.accident_6 : 0;
         flag |= (checkBox307.Checked) ? DrawSettingAccidents.accident_7 : 0;
         flag |= (checkBox308.Checked) ? DrawSettingAccidents.accident_8 : 0;
         flag |= (checkBox309.Checked) ? DrawSettingAccidents.accident_9 : 0;
         flag |= (checkBox310.Checked) ? DrawSettingAccidents.accident_10 : 0;
         m_setting.draw_setting_accidents = flag;
     }
     {
         DrawSettingMyShipAngle flag = 0;
         flag |= (checkBox400.Checked) ? DrawSettingMyShipAngle.draw_0 : 0;
         flag |= (checkBox402.Checked) ? DrawSettingMyShipAngle.draw_1 : 0;
         m_setting.draw_setting_myship_angle = flag;
         m_setting.draw_setting_myship_angle_with_speed_pos = checkBox401.Checked;
         m_setting.draw_setting_myship_expect_pos           = checkBox403.Checked;
     }
 }
Ejemplo n.º 2
0
        /*-------------------------------------------------------------------------
         * 표시항목チェック
         * ---------------------------------------------------------------------------*/
        private bool is_draw(int index)
        {
            // 그리기플래그
            DrawSettingMemoIcons flag = m_lib.setting.draw_setting_memo_icons;

            switch ((map_mark_type)index)
            {
            case map_mark_type.axis0:
            case map_mark_type.axis1:
            case map_mark_type.axis2:
            case map_mark_type.axis3:
            case map_mark_type.axis4:
            case map_mark_type.axis5:
            case map_mark_type.axis6:
            case map_mark_type.axis7:
                if ((flag & DrawSettingMemoIcons.wind) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon0:
                if ((flag & DrawSettingMemoIcons.memo_0) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon1:
                if ((flag & DrawSettingMemoIcons.memo_1) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon2:
                if ((flag & DrawSettingMemoIcons.memo_2) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon3:
                if ((flag & DrawSettingMemoIcons.memo_3) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon4:
                if ((flag & DrawSettingMemoIcons.memo_4) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon5:
                if ((flag & DrawSettingMemoIcons.memo_5) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon6:
                if ((flag & DrawSettingMemoIcons.memo_6) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon7:
                if ((flag & DrawSettingMemoIcons.memo_7) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon8:
                if ((flag & DrawSettingMemoIcons.memo_8) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon9:
                if ((flag & DrawSettingMemoIcons.memo_9) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon10:
                if ((flag & DrawSettingMemoIcons.memo_10) == 0)
                {
                    return(false);
                }
                break;

            case map_mark_type.icon11:
                if ((flag & DrawSettingMemoIcons.memo_11) == 0)
                {
                    return(false);
                }
                break;
            }
            return(true);
        }
Ejemplo n.º 3
0
        /*-------------------------------------------------------------------------
         * 표시항목の初期化
         * ---------------------------------------------------------------------------*/
        private void init_draw_setting(DrawSettingPage page)
        {
            // @Web icons
            {
                DrawSettingWebIcons flag = m_setting.draw_setting_web_icons;
                checkBox100.Checked = (flag & DrawSettingWebIcons.wind) != 0;
                checkBox101.Checked = (flag & DrawSettingWebIcons.accident_0) != 0;
                checkBox102.Checked = (flag & DrawSettingWebIcons.accident_1) != 0;
                checkBox103.Checked = (flag & DrawSettingWebIcons.accident_2) != 0;
                checkBox104.Checked = (flag & DrawSettingWebIcons.accident_3) != 0;
                checkBox105.Checked = (flag & DrawSettingWebIcons.accident_4) != 0;
            }
            // Memo icons
            {
                DrawSettingMemoIcons flag = m_setting.draw_setting_memo_icons;
                checkBox200.Checked = (flag & DrawSettingMemoIcons.wind) != 0;
                checkBox201.Checked = (flag & DrawSettingMemoIcons.memo_0) != 0;
                checkBox202.Checked = (flag & DrawSettingMemoIcons.memo_1) != 0;
                checkBox203.Checked = (flag & DrawSettingMemoIcons.memo_2) != 0;
                checkBox204.Checked = (flag & DrawSettingMemoIcons.memo_3) != 0;
                checkBox205.Checked = (flag & DrawSettingMemoIcons.memo_4) != 0;
                checkBox206.Checked = (flag & DrawSettingMemoIcons.memo_5) != 0;
                checkBox207.Checked = (flag & DrawSettingMemoIcons.memo_6) != 0;
                checkBox208.Checked = (flag & DrawSettingMemoIcons.memo_7) != 0;
                checkBox209.Checked = (flag & DrawSettingMemoIcons.memo_8) != 0;
                checkBox210.Checked = (flag & DrawSettingMemoIcons.memo_9) != 0;
                checkBox211.Checked = (flag & DrawSettingMemoIcons.memo_10) != 0;
                checkBox212.Checked = (flag & DrawSettingMemoIcons.memo_11) != 0;
            }
            // 재해
            {
                DrawSettingAccidents flag = m_setting.draw_setting_accidents;
                checkBox300.Checked = (flag & DrawSettingAccidents.accident_0) != 0;
                checkBox301.Checked = (flag & DrawSettingAccidents.accident_1) != 0;
                checkBox302.Checked = (flag & DrawSettingAccidents.accident_2) != 0;
                checkBox303.Checked = (flag & DrawSettingAccidents.accident_3) != 0;
                checkBox304.Checked = (flag & DrawSettingAccidents.accident_4) != 0;
                checkBox305.Checked = (flag & DrawSettingAccidents.accident_5) != 0;
                checkBox306.Checked = (flag & DrawSettingAccidents.accident_6) != 0;
                checkBox307.Checked = (flag & DrawSettingAccidents.accident_7) != 0;
                checkBox308.Checked = (flag & DrawSettingAccidents.accident_8) != 0;
                checkBox309.Checked = (flag & DrawSettingAccidents.accident_9) != 0;
                checkBox310.Checked = (flag & DrawSettingAccidents.accident_10) != 0;
            }
            // 예상선
            {
                DrawSettingMyShipAngle flag = m_setting.draw_setting_myship_angle;
                checkBox400.Checked = (flag & DrawSettingMyShipAngle.draw_0) != 0;
                checkBox401.Checked = m_setting.draw_setting_myship_angle_with_speed_pos;
                checkBox402.Checked = (flag & DrawSettingMyShipAngle.draw_1) != 0;
                checkBox403.Checked = m_setting.draw_setting_myship_expect_pos;
            }

            // 표시するページ설정
            if ((int)page < 0)
            {
                page = DrawSettingPage.WebIcons;
            }
            if (page > DrawSettingPage.MyShipAngle)
            {
                page = DrawSettingPage.MyShipAngle;
            }
            tabControl1.SelectTab((int)page);
        }