Example #1
0
 private void PopulateRegions()
 {
     try
     {
         var controller = new NorthwindManager();
         var data       = controller.GetRegions();
         RegionListView.DataSource = data;
         RegionListView.DataBind();
     }
     catch (Exception ex)
     {
         MessageLabel.Text = ex.Message;
     }
 }
Example #2
0
        private bool ShowRegionInfo(string name)
        {
            uint uHeight         = 0;
            uint uWidth          = 0;
            uint uPixelPerRegion = 0;
            uint uRegionCount    = 0;
            uint uMemorySize     = 0;

            uint handle = m_RegionParamDic[name].Handle;

            m_SceneEditor.GetRegionMapInfo(handle, ref uHeight, ref uWidth, ref uPixelPerRegion,
                                           ref uRegionCount, ref uMemorySize);

            HeightBox.Text      = uHeight.ToString();
            WidthBox.Text       = uWidth.ToString();
            PixelCountBox.Text  = uPixelPerRegion.ToString();
            RegionCountBox.Text = uRegionCount.ToString();
            MemoryBox.Text      = uMemorySize.ToString();

            PathBox.Text = m_RegionParamDic[name].Path;

            RegionListView.Clear();
            int value = 0;

            for (uint i = 0; i < uRegionCount; ++i)
            {
                m_SceneEditor.GetRegionDiffValue(handle, i, ref value);
                if (value == -1)
                {
                    break;
                }
                string       diff = ColorToString(value);
                ListViewItem item = new ListViewItem(diff);
                RegionListView.Items.Add(item);
            }

            m_SceneEditor.GetRegionDiffValue(handle, uRegionCount, ref value);


            return(true);
        }