public void TestServiceFactorySavingSvc()
        {
            Console.WriteLine("Inside " + GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name);

            ServiceFactory myServiceFactory = ServiceFactory.GetInstance();
            ISavingSvc     savingService    = (ISavingSvc)myServiceFactory.GetService(typeof(ISavingSvc).Name);

            Console.WriteLine("savingService type: " + savingService.GetType());

            Assert.IsInstanceOf <SavingJsonSvcImpl>(savingService, GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name + " Failed");
            Console.WriteLine(GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name + " Passed");
        }
Ejemplo n.º 2
0
        public Meet openMeet(string filePath)
        {
            ISavingSvc saveSvc    = (ISavingSvc)GetService(typeof(ISavingSvc).Name);
            Meet       meetToOpen = saveSvc.openMeet(filePath);

            if (meetToOpen == null)
            {
                MessageBox.Show("Meet did NOT open correctly!");
            }
            else
            {
                MessageBox.Show("Meet opened correctly!");
            }
            return(meetToOpen);
        }
Ejemplo n.º 3
0
        public bool saveMeet(string filePath, Meet meetToSave)
        {
            ISavingSvc saveSvc = (ISavingSvc)GetService(typeof(ISavingSvc).Name);
            bool       didSave = saveSvc.saveMeet(filePath, meetToSave);

            if (!didSave)
            {
                ScriptManager.RegisterClientScriptBlock(null, this.GetType(), "Error", "Meet did NOT save!", true);
                return(false);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(null, this.GetType(), "Success", "Meet saved correctly at: " + filePath, true);
                return(true);
            }
        }
Ejemplo n.º 4
0
        public Meet openMeet(string filePath)
        {
            ISavingSvc saveSvc    = (ISavingSvc)GetService(typeof(ISavingSvc).Name);
            Meet       meetToOpen = saveSvc.openMeet(filePath);

            if (meetToOpen == null)
            {
                //null is probably inaccurate here
                ScriptManager.RegisterClientScriptBlock(null, this.GetType(), "Error", "Meet did NOT open correctly!", true);
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(null, this.GetType(), "Success", "Meet opened correctly!", true);
            }
            return(meetToOpen);
        }
Ejemplo n.º 5
0
        public bool saveMeet(string filePath, Meet meetToSave)
        {
            ISavingSvc saveSvc = (ISavingSvc)GetService(typeof(ISavingSvc).Name);
            bool       didSave = saveSvc.saveMeet(filePath, meetToSave);

            if (!didSave)
            {
                if (!filePath.StartsWith("backups\\"))
                {
                    MessageBox.Show("Meet did NOT save!");
                }
                return(false);
            }
            else
            {
                if (!filePath.StartsWith("backups\\"))
                {
                    MessageBox.Show("Meet saved correctly at: " + filePath);
                }
                return(true);
            }
        }