Exemplo n.º 1
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();
 }
Exemplo n.º 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>
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }