Click here to Skip to main content
15,914,074 members
Home / Discussions / C#
   

C#

 
AnswerRe: Windows Explorer like thumbnail selection in a list view Pin
lukeer7-Jul-11 2:06
lukeer7-Jul-11 2:06 
AnswerRe: Windows Explorer like thumbnail selection in a list view Pin
9ine7-Jul-11 6:06
9ine7-Jul-11 6:06 
GeneralRe: Windows Explorer like thumbnail selection in a list view Pin
lukeer8-Jul-11 0:22
lukeer8-Jul-11 0:22 
QuestionFrom DataTable to multi-Line Chart Pin
Rminator6-Jul-11 20:49
Rminator6-Jul-11 20:49 
AnswerRe: From DataTable to multi-Line Chart Pin
BobJanova6-Jul-11 22:34
BobJanova6-Jul-11 22:34 
GeneralRe: From DataTable to multi-Line Chart Pin
Rminator6-Jul-11 22:39
Rminator6-Jul-11 22:39 
GeneralRe: From DataTable to multi-Line Chart Pin
BobJanova7-Jul-11 4:31
BobJanova7-Jul-11 4:31 
GeneralRe: From DataTable to multi-Line Chart Pin
Rminator7-Jul-11 4:59
Rminator7-Jul-11 4:59 
don´t misinterpret the way i try to expose my Problem, i am not looking for somebody who can make the work for me,but i am here because i hope that may be somebody can have the answer of my unsolved questions by the way you (may be not Laugh | :laugh: ) so about the use a Zedgraph i have a powerful documentation,and i try to make practicaly sample to understand Functionment of that tools
hier is a part of my code where i take the values(contain) in a DataTable in a List and try to Buuild Point for my Chart,just look about it please and tell me what is wrong.

thx
public void ADD_Chart_Style( ZedGraphControl ZGC, DataTable My_DT)
        {
            Graphics G= this.CreateGraphics() ;
            DataRow Dat_Row;
            DataColumn Dat_Colm;
            int Index = 0;

            //Save the value in our DataTable in a List
            List<DateTime> XDate = new List<DateTime>();
            List<double> Value = new List<double>();
            List<DataRow> My_Ro_List = new List<DataRow>();
            foreach (DataRow My_DT_Rows in My_DT.Rows)
            {
                My_Ro_List.Add(My_DT_Rows);
                foreach (var item in My_DT_Rows.ItemArray)

                    Value.Add(Convert.ToDouble(item));

            }
            String Temp = "Date";
            var Result = My_DT.AsEnumerable();
            foreach (var result in My_DT.Columns)
            {
                XDate.Add(Convert.ToDateTime(My_DT.Columns.IndexOf("Date")));
            }

            List<DataColumn> My_C_List = new List<DataColumn>();

            foreach (DataColumn MY_DT_COL in My_DT.Columns)
            {

                My_C_List.Add(MY_DT_COL);

            }
            //Draw Chart Area and PlotArea

            // make upe some Data Array BAsed on the sin function
            int len = My_DT.Columns.IndexOf("Date");
           
            DateTime[] X_ValData = new DateTime[len];
            PointPairList List1 = new PointPairList();
            for (int i = 0; i < My_DT.Rows.Count; i++)
            {
                
                List1.Add(Convert.ToDouble(XDate[i]), Convert.ToDouble(Value));
                X_ValData[i] = XDate[i];

                for (int j = 0; j < My_DT.Columns.Count; j++)
                {
                    //clear out  old Items
                    ZGC.MasterPane.PaneList.Clear();
                    GraphPane My_pane = new GraphPane();
                    My_pane.CurveList.Clear();
                    My_pane.GraphObjList.Clear();
                    // Set the Control GraphPane to my Pane
                    ZGC.GraphPane = My_pane;
                    // Get a new line Item and set it up

                    My_pane.Title.Text = "Auswerte Software Version 1.0";
                    My_pane.Title.FontSpec.Size = 14;
                    My_pane.XAxis.Title.Text = "DATE/Hour/Minutes";
                    My_pane.YAxis.Title.Text = "Value";
                    My_pane.Fill = new Fill(Color.White, Color.FromArgb(220,220,255),45F);
                    LineItem My_Curve = new LineItem("" , List1 , Color.DarkBlue , SymbolType.Diamond);
                    //My_Curve[j] = My_pane.AddCurve("", List1, Color.DarkBlue, SymbolType.Diamond);
                    My_Curve.Symbol.Size = 6;
                    My_Curve.Symbol.Fill.Color = Color.DarkBlue;
                    My_Curve.Symbol.Fill.IsVisible = true;
                    My_Curve.Line.IsVisible = false;

                    //Set the GraphicPhane Up Wit Tittle etc
                   
                    //Add the new Line Items to the GraphPane
                     
                     My_pane.CurveList.Add(My_Curve);
                    // Get the Axis to Update
                    My_pane.AxisChange();
                }
                using (Graphics g = this.CreateGraphics())
                {
                    ZGC.MasterPane.ReSize(g, ZGC.MasterPane.Rect);
                }
                ZGC.Invalidate();


in my Form this
ZedGraphControl My_ZGC = new ZedGraphControl();
       private void Form1_Load(object sender, EventArgs e)
       {

           string Use_Path = OpenFD.FileName;
           //Graphics Obj = this.CreateGraphics();

           DataTable MY_D = new DataTable();
           MY_D = BuildDataTable( Use_Path, ';');

           Cs.ADD_Chart_Style( My_ZGC, MY_D);

       }
       public void Set_SiZe()
       {
           My_ZGC.Location = new Point(10,10);
           My_ZGC.Size  = new Size(this.ClientRectangle.Width - 20,this.ClientRectangle.Height - 20);


       }
       public void Graph_load()
       {
           Form new_F = new Form();
           new_F.Controls.Add(My_ZGC);
           new_F.ShowDialog();

       }

GeneralRe: From DataTable to multi-Line Chart Pin
Rminator14-Jul-11 20:26
Rminator14-Jul-11 20:26 
QuestionWindows Name Pin
M Riaz Bashir6-Jul-11 19:47
M Riaz Bashir6-Jul-11 19:47 
AnswerRe: Windows Name Pin
Wayne Gaylard6-Jul-11 20:42
professionalWayne Gaylard6-Jul-11 20:42 
GeneralRe: Windows Name Pin
M Riaz Bashir6-Jul-11 20:43
M Riaz Bashir6-Jul-11 20:43 
QuestionWhy is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 8:20
professionalVimalsoft(Pty) Ltd6-Jul-11 8:20 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
#realJSOP6-Jul-11 8:44
professional#realJSOP6-Jul-11 8:44 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:14
professionalVimalsoft(Pty) Ltd6-Jul-11 9:14 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
GenJerDan6-Jul-11 9:19
GenJerDan6-Jul-11 9:19 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:41
professionalVimalsoft(Pty) Ltd6-Jul-11 9:41 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
PIEBALDconsult6-Jul-11 14:19
mvePIEBALDconsult6-Jul-11 14:19 
Questionhow to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 4:47
aeman6-Jul-11 4:47 
AnswerRe: how to display the output from LM35 on pc in C# Pin
Alan N6-Jul-11 7:33
Alan N6-Jul-11 7:33 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 22:14
aeman6-Jul-11 22:14 
GeneralRe: how to display the output from LM35 on pc in C# Pin
Richard MacCutchan7-Jul-11 1:51
mveRichard MacCutchan7-Jul-11 1:51 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman7-Jul-11 2:02
aeman7-Jul-11 2:02 
GeneralRe: how to display the output from LM35 on pc in C# Pin
Richard MacCutchan7-Jul-11 2:23
mveRichard MacCutchan7-Jul-11 2:23 
AnswerRe: how to display the output from LM35 on pc in C# Pin
PIEBALDconsult6-Jul-11 14:20
mvePIEBALDconsult6-Jul-11 14:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.