Example #1
0
 public HomeProperty()
 {
     for (int i = 0; i < m_bgParam_.Length; i++)
     {
         m_bgParam_[i] = new BackgroundParam(i);
     }
     MainForm.m_mainForm.homeBgPictureBox1.ImageLocation = null;
     MainForm.m_mainForm.homeBgPictureBox1.Image         = null;
     MainForm.m_mainForm.homePictureBox1.Image           = BackgroundParam.s_waveImage[1];
     m_browser     = new IconParam(MainForm.m_mainForm.browserIcon, MainForm.m_mainForm.browserLabel, null);
     m_video       = new IconParam(MainForm.m_mainForm.videoIcon, MainForm.m_mainForm.videoLabel, null);
     m_music       = new IconParam(MainForm.m_mainForm.musicIcon, MainForm.m_mainForm.musicLabel, null);
     m_ps3Link     = new IconParam(MainForm.m_mainForm.ps3LinkIcon, MainForm.m_mainForm.ps3LinkLabel, null);
     m_party       = new IconParam(MainForm.m_mainForm.partyIcon, MainForm.m_mainForm.partyLabel, null);
     m_trophy      = new IconParam(MainForm.m_mainForm.trophyIcon, MainForm.m_mainForm.trophyLabel, null);
     m_near        = new IconParam(MainForm.m_mainForm.nearIcon, MainForm.m_mainForm.nearLabel, null);
     m_hostCollabo = new IconParam(MainForm.m_mainForm.hostCollaboIcon, MainForm.m_mainForm.hostCollaboLabel, null);
     m_welcomePark = new IconParam(MainForm.m_mainForm.welcomeParkIcon, MainForm.m_mainForm.welcomeParkLabel, null);
     m_ps4Link     = new IconParam(MainForm.m_mainForm.ps4LinkIcon, MainForm.m_mainForm.ps4LinkLabel, null);
     m_friend      = new IconParam(MainForm.m_mainForm.friendIcon, MainForm.m_mainForm.friendLabel, null);
     m_email       = new IconParam(MainForm.m_mainForm.emailIcon, MainForm.m_mainForm.emailLabel, MainForm.m_mainForm.notificationEmailIcon);
     m_calendar    = new IconParam(MainForm.m_mainForm.calendarIcon, MainForm.m_mainForm.calendarLabel, MainForm.m_mainForm.notificationCalendarIcon);
     m_store       = new IconParam(MainForm.m_mainForm.storeIcon, MainForm.m_mainForm.storeLabel, null);
     m_message     = new IconParam(MainForm.m_mainForm.messageIcon, MainForm.m_mainForm.messageLabel, MainForm.m_mainForm.notificationMessageIcon);
     m_parental    = new IconParam(MainForm.m_mainForm.parentalIcon, MainForm.m_mainForm.parentalLabel, null);
     m_camera      = new IconParam(MainForm.m_mainForm.cameraIcon, MainForm.m_mainForm.cameraLabel, null);
     m_settings    = new IconParam(MainForm.m_mainForm.settingsIcon, MainForm.m_mainForm.settingsLabel, null);
     m_power       = new IconParam(MainForm.m_mainForm.powerIcon, MainForm.m_mainForm.powerLabel, null);
     resetLayout();
 }
Example #2
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();
            }
        }
Example #3
0
        private bool checkEmptyPage()
        {
            bool   result = true;
            string msg    = string.Empty;

            int[]          array      = new int[10];
            PropertyInfo[] properties = GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.FlattenHierarchy);
            PropertyInfo[] array2     = properties;
            foreach (PropertyInfo propertyInfo in array2)
            {
                object value = propertyInfo.GetValue(this, null);
                if (!(value is IconParam))
                {
                    continue;
                }
                object[] customAttributes = propertyInfo.GetCustomAttributes(typeof(SaveAttribute), false);
                if (0 >= customAttributes.Length)
                {
                    continue;
                }
                string empty = string.Empty;
                empty = empty + "[" + GetPropertyCategory(propertyInfo) + "] -> ";
                empty = empty + "[" + GetPropertyDisplayName(propertyInfo) + "]";
                IconParam iconParam = value as IconParam;
                if (!checkImageFile(out msg, iconParam.m_iconFilePath, 32, false, 128, 128, 32768L))
                {
                    msg = empty + " -> [" + GetPropertyDisplayName(iconParam, "m_iconFilePath") + "] : " + iconParam.m_iconFilePath + "\n" + msg;
                    Dialog.AddMsg(msg);
                    result = false;
                }
                if (iconParam.m_pagePos != -1)
                {
                    if (checkPageIndex(out msg, iconParam.m_pagePos, 10))
                    {
                        array[iconParam.m_pagePos]++;
                        continue;
                    }
                    msg = empty + " -> [" + GetPropertyDisplayName(iconParam, "m_pagePos") + "] : \n" + msg;
                    Dialog.AddMsg(msg);
                    result = false;
                }
            }
            string text = string.Empty;

            for (int j = 0; j < 10; j++)
            {
                if (array[j] != 0)
                {
                    continue;
                }
                bool flag = false;
                for (int k = j + 1; k < 10; k++)
                {
                    if (array[k] != 0)
                    {
                        flag = true;
                    }
                }
                if (flag)
                {
                    text += ErrorMsg.GetString(ErrorMsg.DEFINES.NON_CONTIGUOUS_PAGE);
                    text  = text + " : Page " + j + "\n";
                }
            }
            if (!string.IsNullOrEmpty(text))
            {
                Dialog.AddMsg(text);
                result = false;
            }
            return(result);
        }