Esempio n. 1
0
 //Constructor that sets up the Kalkylator reference with the the kalkylator object used elsewhere (in Form1)
 //also adds two Methods to the events in the kalkylator object
 public Logger(Kalkylator calc)
 {
     Calc = calc;
     calc.Negative += NegativeResult;
     calc.ClearButton += ClearPressing;
     calc.DivideByZero += DividingByZero;
 }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            //Instanisering och sättning av min formateringsinfo
            fmt = new NumberFormatInfo();
            fmt.NegativeSign = "-";
            fmt.NumberDecimalSeparator = ",";

            //Instancing my binaryFormatter
            binForm = new BinaryFormatter();

            //Instansiering och sättning av min räknesättslista
            CalcMethod = new List<string>();
            CalcMethod.Add("+");
            CalcMethod.Add("-");
            CalcMethod.Add("*");
            CalcMethod.Add("/");

            //Loading previous history and calculations
            LoadHistory();
            LoadCurrentCalc();

            //Instancing the calkylator with the CalcInfo Loaded above
            Calkisen = new Kalkylator(CI);
            //Instancing the EventCatcher with the calkylator
            Loggarn = new Logger(Calkisen);
        }
Esempio n. 3
0
        public Form1()
        {
            InitializeComponent();

            //Instanisering och sättning av min formateringsinfo
            fmt = new NumberFormatInfo();
            fmt.NegativeSign           = "-";
            fmt.NumberDecimalSeparator = ",";

            //Instancing my binaryFormatter
            binForm = new BinaryFormatter();

            //Instansiering och sättning av min räknesättslista
            CalcMethod = new List <string>();
            CalcMethod.Add("+");
            CalcMethod.Add("-");
            CalcMethod.Add("*");
            CalcMethod.Add("/");

            //Loading previous history and calculations
            LoadHistory();
            LoadCurrentCalc();

            //Instancing the calkylator with the CalcInfo Loaded above
            Calkisen = new Kalkylator(CI);
            //Instancing the EventCatcher with the calkylator
            Loggarn = new Logger(Calkisen);
        }
Esempio n. 4
0
 //Constructor that sets up the Kalkylator reference with the the kalkylator object used elsewhere (in Form1)
 //also adds two Methods to the events in the kalkylator object
 public Logger(Kalkylator calc)
 {
     Calc               = calc;
     calc.Negative     += NegativeResult;
     calc.ClearButton  += ClearPressing;
     calc.DivideByZero += DividingByZero;
 }