Esempio n. 1
0
        private void CreateGraph(ZedGraphControl zgc)
        {
            GraphPane myPane = zgc.GraphPane;

            if (ExportMemoryEstimate.isCalculatingMemoryEstimate())
            {
                myPane.Title.Text = "Calculating Memory... Try again soon..";

                return;
            }


            myPane.Title.Text = "XBOX Memory Estimate";

            int totalMBinBytes    = ExportMemoryEstimate.giveTotalMemoryUsage();
            int totalAvailinBytes = ExportMemoryEstimate.giveTotalAvailableMemory();

            float totalMB    = bytesToMB(totalMBinBytes);
            float totalAvail = bytesToMB(totalAvailinBytes);


            myPane.AddPieSlice(totalMBinBytes, Color.Red, 0, "Used Memory");
            myPane.AddPieSlice(totalAvailinBytes, Color.White, 0, "Available Memory");


            listBox1.Items.Add("Used Memory : " + totalMB + "MB");
            listBox1.Items.Add("Available Memory : " + totalAvail + "MB");

            //this will hide the axis
            zgc.AxisChange();
        }
Esempio n. 2
0
        private void CreateComponentGraph(ZedGraphControl zgc)
        {
            GraphPane myPane = zgc.GraphPane;

            if (ExportMemoryEstimate.isCalculatingMemoryEstimate())
            {
                myPane.Title.Text = "Calculating Memory... Try again soon..";

                return;
            }

            Color[] Colors = new Color[] {
                Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Orange, Color.Teal, Color.Brown, Color.Pink, Color.Purple, Color.Tan, Color.Silver, Color.Magenta,
                Color.Maroon, Color.PeachPuff, Color.Black, Color.CornflowerBlue, Color.Cyan, Color.Khaki, Color.Azure, Color.CadetBlue, Color.Salmon, Color.Turquoise, Color.Tomato, Color.Plum
            };



            myPane.Title.Text = "XBOX Memory Estimate";


            int numMemoryElements = ExportMemoryEstimate.getNumMemoryElements();

            for (int i = 0; i < numMemoryElements; i++)
            {
                ExportMemoryEstimate.memoryElement me = ExportMemoryEstimate.getMemoryElement(i);
                myPane.AddPieSlice(me.mMemoryInBytes, Colors[i % Colors.Length], 0, me.mName);

                listBox1.Items.Add(me.mName + " : " + bytesToMB(me.mMemoryInBytes) + "MB");
            }

            listBox1.Items.Add("---------");

            int totalAvailbytes = ExportMemoryEstimate.giveTotalAvailableMemory();

            myPane.AddPieSlice(totalAvailbytes, Color.White, 0, "XBOX FREE Memory");
            listBox1.Items.Add("XBOX FREE Memory" + " : " + bytesToMB(totalAvailbytes) + "MB");
            float totalAvail = bytesToMB(totalAvailbytes);

            //this will hide the axis
            zgc.AxisChange();
        }
Esempio n. 3
0
 private void MemoryEstimate_Load(object sender, EventArgs e)
 {
     refresh(false);
     timer1.Enabled  = true;
     button2.Enabled = !ExportMemoryEstimate.isCalculatingMemoryEstimate();
 }
Esempio n. 4
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     button2.Enabled = !ExportMemoryEstimate.isCalculatingMemoryEstimate();
 }