ZedGraph在Asp.net中的应用

ZedGraph 是一个不错的图表报表生成器,以前曾经用过,在 asp.net2.0 beta 版里面。

现在忽然有可能用到了,但是却一时找不着以前的资料了,方才发现写blog的伟大作用。所以赶紧先把它记下来,以备后用。

1:这是for asp.net的版本。现在win版本的例子代码很多。

2:这里提供的只是一个基本的用法。

3:详细信息:http://zedgraph.org/wiki/index.php?title=Display_Dynamic_or_Real-Time_Data

 

版本:4.2.1.35091

 

1Asp页面上

   基本上没有什么技巧,放上这个控件就可以。
 

ContractedBlock.gif ExpandedBlockStart.gif Asp Control
  1None.gif<zgw:ZedGraphWeb ID="zgw_graph" runat="server" Height="600" OnRenderGraph="zgw_graph_RenderGraph"
  2None.gif        Width="800">
  3None.gif        <XAxis Color="Black" Cross="0" CrossAuto="True" GridColor="Black" GridDashOff="5"
  4None.gif            GridDashOn="1" GridPenWidth="1" IsInsideTic="True" IsMinorInsideTic="True" IsMinorOppositeTic="True"
  5None.gif            IsMinorTic="True" IsOmitMag="False" IsOppositeTic="True" IsPreventLabelOverlap="False"
  6None.gif            IsReverse="False" IsShowGrid="False" IsShowMinorGrid="False" IsShowTitle="True"
  7None.gif            IsTic="True" IsTicsBetweenLabels="True" IsUseTenPower="False" IsVisible="True"
  8None.gif            IsZeroLine="False" Max="0" MaxAuto="True" MaxGrace="0.1" Min="0" MinAuto="True"
  9None.gif            MinGrace="0.1" MinorGridColor="Gray" MinorGridDashOff="10" MinorGridDashOn="1"
 10None.gif            MinorGridPenWidth="1" MinorStepAuto="True" MinorTicSize="2.5" MinSpace="0" ScaleAlign="Center"
 11None.gif            ScaleFormat="g" ScaleFormatAuto="True" ScaleMag="0" ScaleMagAuto="True" StepAuto="True"
 12None.gif            TicPenWidth="1" TicSize="5" Title="" Type="Linear">
 13None.gif            <TitleFontSpec Angle="0" Family="Arial" FontColor="Black" IsBold="True" IsItalic="False"
 14None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 15None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 16None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 17None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 18None.gif            </TitleFontSpec>
 19None.gif            <ScaleFontSpec Angle="0" Family="Arial" FontColor="Black" IsBold="False" IsItalic="False"
 20None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 21None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 22None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 23None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 24None.gif            </ScaleFontSpec>
 25None.gif        </XAxis>
 26None.gif        <AxisBorder Color="Black" InflateFactor="0" IsVisible="True" PenWidth="1" />
 27None.gif        <Y2Axis Color="Black" Cross="0" CrossAuto="True" GridColor="Black" GridDashOff="5"
 28None.gif            GridDashOn="1" GridPenWidth="1" IsInsideTic="True" IsMinorInsideTic="True" IsMinorOppositeTic="True"
 29None.gif            IsMinorTic="True" IsOmitMag="False" IsOppositeTic="True" IsPreventLabelOverlap="False"
 30None.gif            IsReverse="False" IsShowGrid="False" IsShowMinorGrid="False" IsShowTitle="True"
 31None.gif            IsTic="True" IsTicsBetweenLabels="True" IsUseTenPower="False" IsVisible="False"
 32None.gif            IsZeroLine="True" Max="0" MaxAuto="True" MaxGrace="0.1" Min="0" MinAuto="True"
 33None.gif            MinGrace="0.1" MinorGridColor="Gray" MinorGridDashOff="10" MinorGridDashOn="1"
 34None.gif            MinorGridPenWidth="1" MinorStepAuto="True" MinorTicSize="2.5" MinSpace="0" ScaleAlign="Center"
 35None.gif            ScaleFormat="g" ScaleFormatAuto="True" ScaleMag="0" ScaleMagAuto="True" StepAuto="True"
 36None.gif            TicPenWidth="1" TicSize="5" Title="" Type="Linear">
 37None.gif            <TitleFontSpec Angle="0" Family="Arial" FontColor="Black" IsBold="True" IsItalic="False"
 38None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 39None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 40None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 41None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 42None.gif            </TitleFontSpec>
 43None.gif            <ScaleFontSpec Angle="-90" Family="Arial" FontColor="Black" IsBold="False" IsItalic="False"
 44None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 45None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 46None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 47None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 48None.gif            </ScaleFontSpec>
 49None.gif        </Y2Axis>
 50None.gif        <AxisFill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 51None.gif            RangeMax="0" RangeMin="0" Type="Brush" />
 52None.gif        <PaneBorder Color="Black" InflateFactor="0" IsVisible="True" PenWidth="1" />
 53None.gif        <AxisRect Height="0" Width="0" X="0" Y="0" />
 54None.gif        <PieRect Height="0" Width="0" X="0" Y="0" />
 55None.gif        <YAxis Color="Black" Cross="0" CrossAuto="True" GridColor="Black" GridDashOff="5"
 56None.gif            GridDashOn="1" GridPenWidth="1" IsInsideTic="True" IsMinorInsideTic="True" IsMinorOppositeTic="True"
 57None.gif            IsMinorTic="True" IsOmitMag="False" IsOppositeTic="True" IsPreventLabelOverlap="False"
 58None.gif            IsReverse="False" IsShowGrid="False" IsShowMinorGrid="False" IsShowTitle="True"
 59None.gif            IsTic="True" IsTicsBetweenLabels="True" IsUseTenPower="False" IsVisible="True"
 60None.gif            IsZeroLine="True" Max="0" MaxAuto="True" MaxGrace="0.1" Min="0" MinAuto="True"
 61None.gif            MinGrace="0.1" MinorGridColor="Gray" MinorGridDashOff="10" MinorGridDashOn="1"
 62None.gif            MinorGridPenWidth="1" MinorStepAuto="True" MinorTicSize="2.5" MinSpace="0" ScaleAlign="Center"
 63None.gif            ScaleFormat="g" ScaleFormatAuto="True" ScaleMag="0" ScaleMagAuto="True" StepAuto="True"
 64None.gif            TicPenWidth="1" TicSize="5" Title="" Type="Linear">
 65None.gif            <TitleFontSpec Angle="-180" Family="Arial" FontColor="Black" IsBold="True" IsItalic="False"
 66None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 67None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 68None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 69None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 70None.gif            </TitleFontSpec>
 71None.gif            <ScaleFontSpec Angle="90" Family="Arial" FontColor="Black" IsBold="False" IsItalic="False"
 72None.gif                IsUnderline="False" Size="14" StringAlignment="Center">
 73None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 74None.gif                    RangeMax="0" RangeMin="0" Type="None" />
 75None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 76None.gif            </ScaleFontSpec>
 77None.gif        </YAxis>
 78None.gif        <PaneFill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 79None.gif            RangeMax="0" RangeMin="0" Type="Solid" />
 80None.gif        <FontSpec Angle="0" Family="Arial" FontColor="Black" IsBold="True" IsItalic="False"
 81None.gif            IsUnderline="False" Size="16" StringAlignment="Center">
 82None.gif            <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 83None.gif                RangeMax="0" RangeMin="0" Type="None" />
 84None.gif            <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
 85None.gif        </FontSpec>
 86None.gif        <Legend IsHStack="True" IsVisible="True" Position="Top">
 87None.gif            <Location AlignH="Left" AlignV="Center" CoordinateFrame="AxisFraction" Height="0"
 88None.gif                Width="0" X="0" X1="0" Y="0" Y1="0">
 89None.gif                <Rect Height="0" Width="0" X="0" Y="0" />
 90None.gif                <TopLeft X="0" Y="0" />
 91None.gif                <BottomRight X="0" Y="0" />
 92None.gif            </Location>
 93None.gif            <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
 94None.gif                RangeMax="0" RangeMin="0" Type="Brush" />
 95None.gif            <Rect Height="0" Width="0" X="0" Y="0" />
 96None.gif            <Border Color="Black" InflateFactor="0" IsVisible="True" PenWidth="1" />
 97None.gif            <FontSpec Angle="0" Family="Arial" FontColor="Black" IsBold="False" IsItalic="False"
 98None.gif                IsUnderline="False" Size="12" StringAlignment="Center">
 99None.gif                <Fill AlignH="Center" AlignV="Center" Color="White" IsScaled="True" IsVisible="True"
100None.gif                    RangeMax="0" RangeMin="0" Type="Solid" />
101None.gif                <Border Color="Black" InflateFactor="0" IsVisible="False" PenWidth="1" />
102None.gif            </FontSpec>
103None.gif        </Legend>
104None.gif    </zgw:ZedGraphWeb>


2:连接到处理事件,

   这个和Win的处理不一样。看这里传入的参数:System.Drawing.Graphics g, MasterPane pane注意最后的更新方式:pane[0].AxisChange(g);

 

ContractedBlock.gif ExpandedBlockStart.gif Event to Draw the Chart
 1None.gif   protected void zgw_graph_RenderGraph(System.Drawing.Graphics g, MasterPane pane)
 2ExpandedBlockStart.gifContractedBlock.gif    dot.gif{
 3InBlock.gif        if (Request.Params["type"== null)
 4InBlock.gif            return;
 5InBlock.gif        //get params
 6InBlock.gif        int courseId=0,testId=0,studentId=0;
 7InBlock.gif        if (Request.Params["cid"!= null && Request.Params["cid"].ToString()!="")
 8InBlock.gif            courseId = Convert.ToInt32(Request.Params["cid"]);
 9InBlock.gif        if (Request.Params["tid"!= null && Request.Params["tid"].ToString() != "")
10InBlock.gif            testId = Convert.ToInt32(Request.Params["tid"]);
11InBlock.gif        if (Request.Params["sid"!= null && Request.Params["sid"].ToString() != "")
12InBlock.gif            studentId = Convert.ToInt32(Request.Params["sid"]);
13InBlock.gif
14InBlock.gif        SorceStat stat = new SorceStat(pane[0]);
15InBlock.gif        switch (Request.Params["type"].ToLower())
16ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
17InBlock.gif            case "all_students_score_in_one_test":
18InBlock.gif                stat.AllStudentsScore(courseId,testId);
19InBlock.gif                break;
20InBlock.gif            case "one_students_score_in_all_test":
21InBlock.gif                stat.OneStudentScore(courseId, studentId);
22InBlock.gif                break;
23InBlock.gif            case "all_students_score_in_all_test":
24InBlock.gif                stat.AllStudentsScore(courseId);
25InBlock.gif                break;
26InBlock.gif            case "scope_score_in_one_test":
27InBlock.gif                stat.ScoreScopeCompare(courseId, testId);
28InBlock.gif                break;
29InBlock.gif            case "group_avg_score_in_one_test":
30InBlock.gif                stat.GroupAvgCompare(courseId, testId);
31InBlock.gif                break;
32InBlock.gif            case "group_avg_score_in_all_test":
33InBlock.gif                //stat.GroupAvgCompare(courseId); null now
34InBlock.gif                break;
35InBlock.gif            default:
36InBlock.gif                break;
37ExpandedSubBlockEnd.gif        }

38InBlock.gif 
39InBlock.gif        pane[0].AxisChange(g);
40ExpandedBlockEnd.gif    }

41None.gif

3:几种图的使用

ContractedBlock.gif ExpandedBlockStart.gif Code to Draw every chart
  1None.gif
  2ExpandedBlockStart.gifContractedBlock.gif/**//// <summary>
  3InBlock.gif/// make all Stat info and put them into the GraphPane(ZedGraph)
  4ExpandedBlockEnd.gif/// </summary>

  5None.gifpublic class SorceStat
  6ExpandedBlockStart.gifContractedBlock.gifdot.gif{
  7InBlock.gif    private GraphPane _pane;
  8InBlock.gif    private BasePage _page = new BasePage();
  9InBlock.gif    public SorceStat(GraphPane pane)
 10ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 11InBlock.gif        this._pane = pane;
 12ExpandedSubBlockEnd.gif    }

 13ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 14InBlock.gif    /// all the test
 15InBlock.gif    /// by curve line
 16InBlock.gif    /// </summary>
 17ExpandedSubBlockEnd.gif    /// <param name="courseId"></param>

 18InBlock.gif    public void GroupAvgCompare(int courseId)
 19ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif
 20InBlock.gif    
 21ExpandedSubBlockEnd.gif    }

 22ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 23InBlock.gif    /// just a test
 24InBlock.gif    /// by baritem
 25InBlock.gif    /// </summary>
 26InBlock.gif    /// <param name="courseId"></param>
 27ExpandedSubBlockEnd.gif    /// <param name="testId"></param>

 28InBlock.gif    public void GroupAvgCompare(int courseId, int testId)
 29ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 30InBlock.gif        //
 31InBlock.gif        //get all then get the ave of it. as it can not use sql derectly
 32InBlock.gif         ObjectSet scores=_page.BizManager.GetObjectSet(typeof(EvGroupScore),"courseId='"+courseId+"' and testId='"+testId+"'");
 33InBlock.gif         Hashtable group = new Hashtable();
 34InBlock.gif         for (int i = 0; i < scores.Count; i++)
 35ExpandedSubBlockStart.gifContractedSubBlock.gif         dot.gif{
 36InBlock.gif             EvGroupScore score = scores[i] as EvGroupScore;
 37InBlock.gif             if (!group.Contains(score.GroupName))
 38InBlock.gif                 group.Add(score.GroupName, new GroupScore(score.GroupName));
 39InBlock.gif             (group[score.GroupName] as GroupScore).Count++;
 40InBlock.gif             (group[score.GroupName] as GroupScore).Score += score.Score;
 41ExpandedSubBlockEnd.gif         }

 42InBlock.gif         int index = 0;
 43InBlock.gif         foreach (DictionaryEntry de in group)
 44ExpandedSubBlockStart.gifContractedSubBlock.gif         dot.gif{
 45InBlock.gif             GroupScore score = de.Value as GroupScore;
 46ExpandedSubBlockStart.gifContractedSubBlock.gif             this._pane.AddBar(score.GroupName, new double[] dot.gif{ index++ } , new double[] dot.gif{ score.Avg }, GetRandomColor());
 47ExpandedSubBlockEnd.gif         }

 48InBlock.gif
 49ExpandedSubBlockEnd.gif     }

 50ContractedSubBlock.gifExpandedSubBlockStart.gif     private class GroupScore for recode the group info#region private class GroupScore for recode the group info
 51InBlock.gif     private class GroupScore
 52ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 53InBlock.gif        public GroupScore(string groupName)
 54ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 55InBlock.gif           this.GroupName=groupName;
 56InBlock.gif           Count = 0;
 57InBlock.gif           Score = 0;
 58ExpandedSubBlockEnd.gif        }

 59InBlock.gif        public string GroupName;
 60InBlock.gif        public int Count;
 61InBlock.gif        public int Score;
 62InBlock.gif        public int Avg
 63ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 64InBlock.gif            get
 65ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
 66InBlock.gif                if (Count != 0)
 67InBlock.gif                    return Score / Count;
 68InBlock.gif                else
 69InBlock.gif                    return 0;
 70ExpandedSubBlockEnd.gif            }

 71ExpandedSubBlockEnd.gif        }

 72InBlock.gif
 73ExpandedSubBlockEnd.gif    }

 74ExpandedSubBlockEnd.gif     #endregion

 75ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 76InBlock.gif    /// a test,50-60;60-70 how many students in that scope
 77InBlock.gif    /// by pie item
 78InBlock.gif    /// </summary>
 79InBlock.gif    /// <param name="courseId"></param>
 80ExpandedSubBlockEnd.gif    /// <param name="testId"></param>

 81InBlock.gif    public void ScoreScopeCompare(int courseId, int testId)
 82ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
 83InBlock.gif        //add 10 pies first
 84InBlock.gif        PieItem[] items = new PieItem[10];
 85InBlock.gif        for (int i = 0; i < 10; i++)
 86ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 87InBlock.gif           items[i]= this._pane.AddPieSlice(0this.GetRandomColor(), 0, (i*10).ToString() + "-" + ((i + 1* 10).ToString());
 88InBlock.gif           items[i].LabelType = PieLabelType.Name_Value_Percent;
 89ExpandedSubBlockEnd.gif        }

 90InBlock.gif        ObjectSet set = _page.BizManager.GetObjectSet(typeof(EtScore), "testId='" + testId + "'");
 91InBlock.gif        for (int i = 0; i < set.Count; i++)
 92ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 93InBlock.gif            int grad = (set[i] as EtScore).Score/10;
 94InBlock.gif            items[grad].Value++;
 95ExpandedSubBlockEnd.gif        }

 96ExpandedSubBlockEnd.gif    }

 97ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 98InBlock.gif    /// all student, all test
 99InBlock.gif    /// by curve line
100InBlock.gif    /// </summary>
101ExpandedSubBlockEnd.gif    /// <param name="courseId"></param>

102InBlock.gif    public void AllStudentsScore(int courseId)
103ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
104InBlock.gif        //y: scores
105InBlock.gif        //x: students
106InBlock.gif        //multiline
107InBlock.gif        ObjectSet set = _page.BizManager.GetObjectSet(typeof(EtSubscribe), "CourseId='" + courseId + "'");
108InBlock.gif        for (int i = 0; i < set.Count; i++)
109ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
110InBlock.gif            OneStudentScore(courseId, (set[i] as EtSubscribe).StudentId);
111ExpandedSubBlockEnd.gif        }

112ExpandedSubBlockEnd.gif    }

113InBlock.gif
114ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
115InBlock.gif    /// all student at one test
116InBlock.gif    /// by stick
117InBlock.gif    /// </summary>
118InBlock.gif    /// <param name="courseId"></param>
119ExpandedSubBlockEnd.gif    /// <param name="testId"></param>

120InBlock.gif    public void AllStudentsScore(int courseId, int testId)
121ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
122InBlock.gif        //y: score of a student
123InBlock.gif        //x: student name, one by one
124InBlock.gif        ObjectSet set = _page.BizManager.GetObjectSet(typeof(EtScore), "testId='" + testId + "'");
125InBlock.gif        this._pane.XAxis.Max = set.Count + 1;
126InBlock.gif        this._pane.XAxis.Step = 1;
127InBlock.gif        this._pane.XAxis.Title = "students";
128InBlock.gif        this._pane.YAxis.Title = "scores";
129InBlock.gif        this._pane.Title = "socres in the test";
130InBlock.gif        for(int i=0;i<set.Count;i++)
131ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
132InBlock.gif            EtScore socre = set[i] as EtScore;
133ExpandedSubBlockStart.gifContractedSubBlock.gif            this._pane.AddStick(socre.StudentName, new double[] dot.gif{ i+1 }new double[] dot.gif{ socre.Score }, GetRandomColor());
134ExpandedSubBlockEnd.gif        }

135ExpandedSubBlockEnd.gif    }

136InBlock.gif   
137ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
138InBlock.gif    /// a student,all test
139InBlock.gif    /// </summary>
140InBlock.gif    /// <param name="courseId"></param>
141ExpandedSubBlockEnd.gif    /// <param name="studentId"></param>

142InBlock.gif    public void OneStudentScore(int courseId, int studentId)
143ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
144InBlock.gif        //get all sorces in all test. 
145InBlock.gif        //then get test name
146InBlock.gif        //show
147InBlock.gif        //y: score of a student
148InBlock.gif        //x: test times, how to chang it test name and date?
149InBlock.gif        ObjectSet set = _page.BizManager.GetObjectSet(typeof(EvScore), "courseId='" + courseId + "' and studentId='" + studentId + "'");
150InBlock.gif        this._pane.XAxis.Max = set.Count + 1;
151InBlock.gif        this._pane.XAxis.Step = 1;
152InBlock.gif        this._pane.XAxis.Title = "tests";
153InBlock.gif        this._pane.YAxis.Title = "scores";
154InBlock.gif        this._pane.Title = "socres in all the test";
155InBlock.gif        double[] tests = new double[set.Count];
156InBlock.gif        double[] scores = new double[set.Count];
157InBlock.gif        string name = "";
158InBlock.gif        for (int i = 0; i < set.Count; i++)
159ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
160InBlock.gif            EvScore socre = set[i] as EvScore;
161InBlock.gif            tests[i] = i + 1;
162InBlock.gif            scores[i] = socre.Score;
163InBlock.gif            name = socre.StudentName;
164InBlock.gif
165ExpandedSubBlockEnd.gif        }

166InBlock.gif        LineItem line = this._pane.AddCurve(name + " score line.", tests, scores, GetRandomColor());
167InBlock.gif        
168ExpandedSubBlockEnd.gif    }

169InBlock.gif    private Random _random = new Random();
170InBlock.gif    private Color GetRandomColor()
171ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
172InBlock.gif       return Color.FromArgb(_random.Next()); 
173ExpandedSubBlockEnd.gif    }

174ExpandedBlockEnd.gif}

175

转载于:https://www.cnblogs.com/xiongeee/archive/2007/03/28/690796.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值