Click here to Skip to main content
15,893,622 members
Home / Discussions / C#
   

C#

 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre23-May-15 8:04
professionalSascha Lefèvre23-May-15 8:04 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre8-Jun-15 20:20
professionalSascha Lefèvre8-Jun-15 20:20 
GeneralRe: Grammar in GOLD for generic constructs Pin
Manfred Rudolf Bihy8-Jun-15 20:28
professionalManfred Rudolf Bihy8-Jun-15 20:28 
GeneralRe: Grammar in GOLD for generic constructs Pin
Sascha Lefèvre8-Jun-15 20:33
professionalSascha Lefèvre8-Jun-15 20:33 
Questionhelppppp Pin
Member 1169697217-May-15 2:38
Member 1169697217-May-15 2:38 
AnswerRe: helppppp Pin
Kornfeld Eliyahu Peter17-May-15 3:33
professionalKornfeld Eliyahu Peter17-May-15 3:33 
AnswerRe: helppppp Pin
OriginalGriff17-May-15 3:59
mveOriginalGriff17-May-15 3:59 
GeneralRe: helppppp Pin
Member 1169697217-May-15 6:39
Member 1169697217-May-15 6:39 
I have done this so far:

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Apostash_Simeiwn
{
    class Simeio
    {
        private double x;
        private double y;


        public Simeio(double x, double y)
        {
            this.x = x;
            this.y = y;

        }
    }
}




C#
{
    public partial class Form1 : Form
    {


        public Form1()
        {
            InitializeComponent();
        }

        private void bttApostash_Click(object sender, EventArgs e)
        {
            txtApostash.Text += Environment.NewLine + Convert.ToString(GetDistance(double.Parse(txtXa.Text),double.Parse(txtXb.Text),double.Parse(txtYa.Text),double.Parse(txtYb.Text)));
        }
        public static double GetDistance(double txtXa, double txtYa, double txtXb, double txtYb)
        {
            double a = txtXa - txtXb;
            double b = txtYa - txtYb;
            double distance;
            return  distance = Math.Sqrt(a * a + b * b);

        }

        private void bttOO_Click(object sender, EventArgs e)
        {
            if (Math.Sqrt(Math.Pow(double.Parse(txtXa.Text), 2) + Math.Pow(double.Parse(txtYa.Text), 2)) < Math.Sqrt(Math.Pow(double.Parse(txtXb.Text), 2) + Math.Pow(double.Parse(txtYb.Text), 2)))
            {
                txtOO.Text += Environment.NewLine + "Το σημείο Α";
            }
            else
            {
                txtOO.Text += Environment.NewLine + "Το σημείο Β";

            }
        }

        private void bttTermatismos_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);
        }

        private void bttSineuthiaka_Click(object sender, EventArgs e)
        {
            double l1 = (double.Parse(txtYb.Text) - double.Parse(txtYa.Text)) / (double.Parse(txtXb.Text) - double.Parse(txtXa.Text));
            double l2 = (double.Parse(txtYc.Text) - double.Parse(txtYb.Text)) / (double.Parse(txtXc.Text) - double.Parse(txtXb.Text));

            if (l1 == l2)
            {
                txtSineuthiaka.Text += Environment.NewLine + "Τα σημεία είναι συνευθειακά ";
            }
            else
            {
                MessageBox.Show("Δεν είναι συνευθειακά.Εισάγετε νέα");
            }
        }


    }
}

GeneralRe: helppppp Pin
Sascha Lefèvre17-May-15 7:20
professionalSascha Lefèvre17-May-15 7:20 
GeneralRe: helppppp Pin
Member 1169697217-May-15 7:51
Member 1169697217-May-15 7:51 
GeneralRe: helppppp Pin
Dave Kreskowiak17-May-15 10:59
mveDave Kreskowiak17-May-15 10:59 
QuestionCrystal Report - object reference not set to an instance while loading subreport Pin
vijay vk16-May-15 22:20
vijay vk16-May-15 22:20 
AnswerRe: Crystal Report - object reference not set to an instance while loading subreport Pin
OriginalGriff16-May-15 22:50
mveOriginalGriff16-May-15 22:50 
AnswerRe: Crystal Report - object reference not set to an instance while loading subreport Pin
Member 1125513321-May-15 3:44
Member 1125513321-May-15 3:44 
Questionadding a list to a class Pin
yikes12316-May-15 17:59
yikes12316-May-15 17:59 
AnswerRe: adding a list to a class Pin
OriginalGriff16-May-15 23:34
mveOriginalGriff16-May-15 23:34 
AnswerRe: adding a list to a class Pin
BillWoodruff17-May-15 6:14
professionalBillWoodruff17-May-15 6:14 
QuestionComplete simple project for Opening Cash Drawer and Printer tm-u220 Pin
Member 1169213814-May-15 19:26
Member 1169213814-May-15 19:26 
AnswerRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
Richard MacCutchan14-May-15 20:55
mveRichard MacCutchan14-May-15 20:55 
AnswerRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
OriginalGriff14-May-15 21:34
mveOriginalGriff14-May-15 21:34 
RantRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
Sascha Lefèvre15-May-15 2:23
professionalSascha Lefèvre15-May-15 2:23 
GeneralRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
OriginalGriff15-May-15 4:11
mveOriginalGriff15-May-15 4:11 
GeneralRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
Sascha Lefèvre15-May-15 4:38
professionalSascha Lefèvre15-May-15 4:38 
GeneralRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
OriginalGriff15-May-15 4:46
mveOriginalGriff15-May-15 4:46 
GeneralRe: Complete simple project for Opening Cash Drawer and Printer tm-u220 Pin
Afzaal Ahmad Zeeshan15-May-15 4:50
professionalAfzaal Ahmad Zeeshan15-May-15 4:50 

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.