Click here to Skip to main content
15,886,664 members
Home / Discussions / C#
   

C#

 
QuestionApply gradient in control DataGridView(c#) Pin
Emanuel vargas20-May-12 10:54
Emanuel vargas20-May-12 10:54 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Richard Andrew x6420-May-12 12:04
professionalRichard Andrew x6420-May-12 12:04 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Emanuel vargas20-May-12 15:30
Emanuel vargas20-May-12 15:30 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Luc Pattyn20-May-12 13:58
sitebuilderLuc Pattyn20-May-12 13:58 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Emanuel vargas20-May-12 15:43
Emanuel vargas20-May-12 15:43 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Luc Pattyn20-May-12 16:11
sitebuilderLuc Pattyn20-May-12 16:11 
AnswerRe: Apply gradient in control DataGridView(c#) Pin
Emanuel vargas21-May-12 5:20
Emanuel vargas21-May-12 5:20 
GeneralFuzzy C# code Pin
Cbadeg20-May-12 10:32
Cbadeg20-May-12 10:32 
hi I am going to apply fuzzy to C #
calculate the linear and triangular membership functions.
http://cdn-u.kaskus.us/72/d162lwot.png[^]
http://cdn-u.kaskus.us/72/7qhhkzn8.png[^]

download an application http://www.4shared.com/rar/wJEK9W45/fuzzy.html[^]

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace LATIHAN
{

    public partial class fuzzy : DevExpress.XtraEditors.XtraForm
      
    {

        Double MU, PA, TU;


        public fuzzy()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Double vskor = Convert.ToDouble(textBox1.Text);
            //menghitung keanggotaan muda
            if (25 <= vskor && vskor <= 45)
             {
                MU = (45 - vskor) / (45 - 25);
             }
            
            else if( vskor < 25)
             {
                MU = 1;
             }
            else
            {
                MU = 0;
            }

            //menghitung keanggotaan parobaya
            if (vskor <= 35 || vskor >= 55)
            {
                PA = 0;
            }
            else if (35 <= vskor && vskor <= 45)
            {
                PA = (vskor - 35) / (45 - 35);
            }

            else if (45 <= vskor && vskor <= 55)
            {
                PA = (55 - vskor) / (55 - 45);
            }

            //menghitung keanggotaan tua

            if (45 <= vskor && vskor <= 65)
            {
                TU = (vskor - 45) / (65 - 45);
            }
            else if (vskor <= 45)
            {
                TU = 0;
            }
            else
                TU = 1;
            
            //---------
            label1.Text = "MUDA         (" + MU + ")";
            label2.Text = "PAROBAYA (" + PA + ")";
            label3.Text = "TUA            (" + TU + ")";
            
            //--------- menghitung miu terbesar--------------//
            if (TU > MU && TU > PA )
            {
                hasil.Text = " Ternyata Ahaha anda TUA .. tuaaa tuaaaa :D  (" + TU + ")";
            }
            if (MU > PA && MU > TU)
            {
                hasil.Text = "Anda termasuk MUDA jadilah anak yang berguna  (" + MU + ")";
            }
            if (PA > MU && PA > TU)
            {
                hasil.Text = "Anda sudah PAROBAYA jangan salah langkah nanti bisa jadi BAYA  (" + PA + ")";
            }
        }

        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            RamGec_About_Box1 m = new RamGec_About_Box1();
            m.Show();
        }


        }
    }

C# fuzzy

GeneralRe: Fuzzy C# code Pin
Dave Kreskowiak20-May-12 11:39
mveDave Kreskowiak20-May-12 11:39 
GeneralRe: Fuzzy C# code Pin
BillWoodruff20-May-12 15:26
professionalBillWoodruff20-May-12 15:26 
QuestionHow to close (kill, release?) a socket, which is in FIN_WAIT_2 state? Pin
ShadowUz20-May-12 7:29
ShadowUz20-May-12 7:29 
AnswerRe: How to close (kill, release?) a socket, which is in FIN_WAIT_2 state? Pin
Ravi Bhavnani20-May-12 7:32
professionalRavi Bhavnani20-May-12 7:32 
GeneralRe: How to close (kill, release?) a socket, which is in FIN_WAIT_2 state? Pin
ShadowUz20-May-12 7:43
ShadowUz20-May-12 7:43 
AnswerRe: How to close (kill, release?) a socket, which is in FIN_WAIT_2 state? Pin
Ravi Bhavnani20-May-12 7:48
professionalRavi Bhavnani20-May-12 7:48 
QuestionHow to refresh or update DataGrid Cell Value ... Pin
nassimnastaran18-May-12 20:25
nassimnastaran18-May-12 20:25 
AnswerRe: How to refresh or update DataGrid Cell Value ... Pin
OriginalGriff18-May-12 20:51
mveOriginalGriff18-May-12 20:51 
AnswerRe: How to refresh or update DataGrid Cell Value ... Pin
Alan N19-May-12 3:06
Alan N19-May-12 3:06 
GeneralRe: How to refresh or update DataGrid Cell Value ... Pin
nassimnastaran19-May-12 9:01
nassimnastaran19-May-12 9:01 
QuestionDoes This Only Happen To Me? Pin
Roger Wright18-May-12 18:53
professionalRoger Wright18-May-12 18:53 
AnswerRe: Does This Only Happen To Me? Pin
OriginalGriff18-May-12 20:58
mveOriginalGriff18-May-12 20:58 
GeneralRe: Does This Only Happen To Me? Pin
Pete O'Hanlon18-May-12 22:42
mvePete O'Hanlon18-May-12 22:42 
GeneralRe: Does This Only Happen To Me? Pin
OriginalGriff18-May-12 22:47
mveOriginalGriff18-May-12 22:47 
GeneralRe: Does This Only Happen To Me? Pin
Pete O'Hanlon19-May-12 2:10
mvePete O'Hanlon19-May-12 2:10 
GeneralRe: Does This Only Happen To Me? Pin
OriginalGriff19-May-12 2:20
mveOriginalGriff19-May-12 2:20 
GeneralRe: Does This Only Happen To Me? Pin
BillW3319-May-12 7:05
professionalBillW3319-May-12 7:05 

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.