//Constructor sets the CalcInfo  and sets up the MethodInfo[] Methods
 public Kalkylator(Calcinfo CCI)
 {
     CI = CCI;
     var DLL = Assembly.LoadFrom("WinCalc.dll");
     var TH = DLL.GetType("WinCalc.Räknare");
     Methods = TH.GetMethods();
 }
Example #2
0
        //Constructor sets the CalcInfo  and sets up the MethodInfo[] Methods
        public Kalkylator(Calcinfo CCI)
        {
            CI = CCI;
            var DLL = Assembly.LoadFrom("WinCalc.dll");
            var TH  = DLL.GetType("WinCalc.Räknare");

            Methods = TH.GetMethods();
        }/// <summary>
Example #3
0
        //Deserializes "Restore1.bin" and load it into The CalcInfo
        public void LoadCurrentCalc()
        {
            //If the file exist...
            if (File.Exists("Restore1.bin"))
            {
                strömmen = File.Open("Restore1.bin", FileMode.Open, FileAccess.Read);
                //...and if the streamLength isn't 0
                if (!(strömmen.Length == 0))
                {
                    //then the stream is deserialzed into CI
                    CI = (Calcinfo)binForm.Deserialize(strömmen);
                }

                //Some textbox updates
                textBoxCalculations.Text = CI.Calculations;
                textBoxOutput.Text       = CI.Output;
                strömmen.Close();
            }
        }
Example #4
0
        //Deserializes "Restore1.bin" and load it into The CalcInfo
        public void LoadCurrentCalc()
        {
            //If the file exist...
            if (File.Exists("Restore1.bin"))
            {
                strömmen = File.Open("Restore1.bin", FileMode.Open, FileAccess.Read);
                //...and if the streamLength isn't 0
                if (!(strömmen.Length==0))
                {
                    //then the stream is deserialzed into CI
                    CI = (Calcinfo)binForm.Deserialize(strömmen);
                }

                //Some textbox updates
                textBoxCalculations.Text = CI.Calculations;
                textBoxOutput.Text = CI.Output;
                strömmen.Close();
            }
        }