Esempio n. 1
0
        public void setIconLayout(IconLayout iconLayout)
        {
            HomeProperty home = MainForm.m_mainForm.m_home;

            if (home == null)
            {
                return;
            }
            if (0 > iconLayout.m_pagePos && 0 <= iconLayout.m_iconPos)
            {
                m_iconPos_ = iconLayout.m_iconPos;
                return;
            }
            if (0 > iconLayout.m_iconPos && 0 <= iconLayout.m_pagePos)
            {
                m_pagePos_ = iconLayout.m_pagePos;
                return;
            }
            if (!MainForm.m_mainForm.m_load)
            {
                IconParam iconParam = home.m_bgParam[iconLayout.m_pagePos].m_iconLayouts[iconLayout.m_iconPos];
                if (iconParam != null)
                {
                    if (iconLayout.m_pagePos != m_pagePos && iconLayout.m_pagePos == MainForm.m_mainForm.homeScreenTab.SelectedIndex)
                    {
                        iconParam.unsetHomePanel();
                    }
                    home.m_bgParam[m_pagePos].m_iconLayouts[m_iconPos] = iconParam;
                    iconParam.m_pagePos_ = m_pagePos;
                    iconParam.m_iconPos_ = m_iconPos;
                    if (m_pagePos == MainForm.m_mainForm.homeScreenTab.SelectedIndex)
                    {
                        iconParam.setHomePanel(m_iconPos, home.m_bgParam[m_pagePos].m_fontColor);
                    }
                }
                else
                {
                    home.m_bgParam[m_pagePos].m_iconLayouts[m_iconPos] = null;
                }
            }
            if (iconLayout.m_pagePos != m_pagePos && m_pagePos == MainForm.m_mainForm.homeScreenTab.SelectedIndex)
            {
                unsetHomePanel();
            }
            home.m_bgParam[iconLayout.m_pagePos].m_iconLayouts[iconLayout.m_iconPos] = this;
            if (iconLayout.m_pagePos == MainForm.m_mainForm.homeScreenTab.SelectedIndex)
            {
                setHomePanel(iconLayout.m_iconPos, home.m_bgParam[iconLayout.m_pagePos].m_fontColor);
            }
            m_pagePos_ = iconLayout.m_pagePos;
            m_iconPos_ = iconLayout.m_iconPos;
            MainForm.m_mainForm.setBackHomePictureBox();
            if (!MainForm.m_mainForm.m_refreshInvalid)
            {
                MainForm.m_mainForm.homePropertyGrid.Refresh();
            }
        }
Esempio n. 2
0
 public void initIconLayout(HomeProperty homeProperty, IconLayout iconLayout)
 {
     m_pagePos_ = iconLayout.m_pagePos;
     m_iconPos_ = iconLayout.m_iconPos;
     if (0 <= m_pagePos && 0 <= m_iconPos)
     {
         homeProperty.m_bgParam[m_pagePos].m_iconLayouts[m_iconPos] = this;
     }
 }