public ClassRoomForm()
        {
            InitializeComponent();


            ActivationModule classRoomModule = new ActivationModule();

            classRoomModule.ModuleName         = "ClassRoom";
            classRoomModule.ModuleList_Setting = Helpers.LoadModuleSettings(classRoomModule.ModuleName);

            String classRoomUrl = "";

            foreach (ModuleSetting moduleSetting in classRoomModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("ClassRoomUrl"))
                {
                    classRoomUrl = moduleSetting.SettingData;
                }
            }
            if (NetworkInterface.GetIsNetworkAvailable() == true)
            {
                UniteEDNetwork net = new UniteEDNetwork();
                classRoomwebBrowser.Navigate(new Uri(classRoomUrl));
            }
            else
            {
                MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
        private void btnEReader_Click(object sender, EventArgs e)
        {
            ActivationModule EreaderModule = new ActivationModule();

            EreaderModule.ModuleName         = Reader.ToString();
            EreaderModule.ModuleList_Setting = Helpers.LoadModuleSettings(EreaderModule.ModuleName);

            String EreaderUrl  = "";
            String EreaderName = "";

            foreach (ModuleSetting moduleSetting in EreaderModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("DownloadURL"))
                {
                    EreaderUrl = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("Name"))
                {
                    EreaderName = moduleSetting.SettingData;
                }
            }

            if (Helpers.checkInstalled(EreaderName))
            {
                try
                {
                    System.Diagnostics.Process.Start(@"C:\Program Files\Snapplify\" + EreaderName);
                }
                catch
                {
                    try
                    {
                        System.Diagnostics.Process.Start(@"C:\Program Files (x86)\Snapplify\" + EreaderName);
                    }
                    catch {
                        MessageBox.Show("There was an Error Opening the application", "Open Snapplify", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            else
            {
                MessageBox.Show(EreaderName + " was not found on your PC. Click Ok to Download. Once you have installed " + EreaderName + ", Click on Ereader again", "Open " + EreaderName, MessageBoxButtons.OK, MessageBoxIcon.Information);

                if (NetworkInterface.GetIsNetworkAvailable() == true)
                {
                    UniteEDNetwork net = new UniteEDNetwork();

                    WebBrowser web = new WebBrowser();
                    web.ScriptErrorsSuppressed = true;

                    web.Navigate(new Uri(EreaderUrl));
                }
                else
                {
                    MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
        }
Beispiel #3
0
        private void SmartLinkForm_Load(object sender, EventArgs e)
        {
            ActivationModule smartLinkModule = new ActivationModule();

            smartLinkModule.ModuleName         = "Smartlink";
            smartLinkModule.ModuleList_Setting = Helpers.LoadModuleSettings(smartLinkModule.ModuleName);


            foreach (ModuleSetting moduleSetting in smartLinkModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("SmartLinkUrl"))
                {
                    smartLinkUrl = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("SmartLinkusername"))
                {
                    username = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("SmartLinkpassword"))
                {
                    password = moduleSetting.SettingData;
                }
            }

            if (NetworkInterface.GetIsNetworkAvailable() == true)
            {
                try
                {
                    UniteEDNetwork net = new UniteEDNetwork();
                    AutoLogin();
                    Cef.SetCookie(autoLoginUrl, cookie.Name, cookie.Value, "", cookie.Path, cookie.Secure, cookie.HttpOnly, cookie.Expired, cookie.Expires);
                    browser = new ChromiumWebBrowser(autoLoginUrl)
                    {
                        Dock = DockStyle.Fill,
                    };
                    panel1.Controls.Add(browser);
                    browser.FrameLoadEnd += OnBrowserFrameLoadEnd;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Beispiel #4
0
 public InternalModules(InternalAccessors accessors, InternalAdditionalLogics additionalLogics, LogicData data, IServerAPI api)
 {
     AchievementModule      = AchievementModule.CreateClient(accessors.AchievementAccessor, additionalLogics.ScorersLogic, additionalLogics.DropLogic, accessors.FormulaController, additionalLogics.ImpactController);
     ActivationModule       = ActivationModule.CreateClient(accessors.FormulaController, additionalLogics.ImpactController, accessors.ExplorerAccessor, accessors.ScorersAccessor, accessors.PlayerAccessor, accessors.UnitsAccessor, additionalLogics.ApplyChangeLogic);
     AutowinModule          = AutowinModule.CreateClient(additionalLogics.ImpactController, accessors.ExplorerAccessor, accessors.ScorersAccessor, additionalLogics.FormulaLogic, additionalLogics.ExplorerLogic);
     BattleModule           = BattleModule.CreateClient(accessors.BattleAccessor, accessors.ExplorerAccessor, accessors.UnitsAccessor, additionalLogics.ContextLogic, additionalLogics.ImpactController, additionalLogics.TriggerLogic, additionalLogics.BattleLogic, additionalLogics.BuffLogic);
     CheatModule            = CheatModule.CreateClient(accessors.UnitsAccessor, accessors.ScorersAccessor, accessors.BattleAccessor, accessors.InventoryAccessor, accessors.PlayerAccessor, accessors.ExplorerAccessor, accessors.LogAccessor, accessors.SettingsAccessor, additionalLogics.ExplorerLogic, additionalLogics.BattleLogic, additionalLogics.ContextLogic, additionalLogics.ImpactController, additionalLogics.DropLogic, additionalLogics.ScorersLogic);
     CutSceneModule         = CutSceneModule.CreateClient(accessors.CutSceneAccessor, additionalLogics.ImpactController, additionalLogics.ApplyChangeLogic);
     EquipmentModule        = EquipmentModule.CreateClient(accessors.InventoryAccessor, accessors.ScorersAccessor, accessors.UnitsAccessor, additionalLogics.ImpactController, additionalLogics.FormulaLogic);
     ExplorerProgressModule = ExplorerProgressModule.CreateClient(accessors.ExplorerAccessor, accessors.InventoryAccessor, accessors.UnitsAccessor, accessors.SettingsAccessor, accessors.ScorersAccessor, accessors.BattleAccessor, additionalLogics.ExplorerLogic, additionalLogics.FormulaLogic, additionalLogics.ImpactController);
     GachaModule            = GachaModule.CreateClient(additionalLogics.ImpactController, accessors.ScorersAccessor, accessors.InventoryAccessor, accessors.UnitsAccessor, accessors.ExplorerAccessor, additionalLogics.DropLogic, accessors.ConditionController, additionalLogics.FormulaLogic);
     SettingsModule         = SettingsModule.CreateClient(accessors.SettingsAccessor, accessors.ScorersAccessor, additionalLogics.ImpactController);
     ShopModule             = ShopModule.CreateClient(accessors.ScorersAccessor, accessors.ShopAccessor, additionalLogics.FormulaLogic, additionalLogics.ImpactController, additionalLogics.ShopLogic, additionalLogics.DropLogic);
     StartSessionModule     = StartSessionModule.CreateClient(accessors.UnitsAccessor, accessors.ScorersAccessor, accessors.BattleAccessor, accessors.InventoryAccessor, accessors.PlayerAccessor, accessors.ExplorerAccessor, accessors.LogAccessor, accessors.SettingsAccessor, accessors.ShopAccessor, accessors.LogAccessor, accessors.AchievementAccessor, additionalLogics.BattleLogic, additionalLogics.ShopLogic, additionalLogics.ExplorerLogic, accessors.FormulaController, additionalLogics.ImpactController);
     StorageModule          = StorageModule.CreateClient(accessors.ScorersAccessor, accessors.InventoryAccessor);
     UnitProgressModule     = UnitProgressModule.CreateClient(accessors.UnitsAccessor, accessors.ScorersAccessor, accessors.BattleAccessor, additionalLogics.FormulaLogic, accessors.PlayerAccessor, additionalLogics.ImpactController);
 }
Beispiel #5
0
        public SettingDataSource()
        {
            try
            {
                string json = (ModuleSetting.Load("AllModuleSetting")).SettingData;
                Newtonsoft.Json.Linq.JArray objs = (Newtonsoft.Json.Linq.JArray)JsonConvert.DeserializeObject(json);

                foreach (Newtonsoft.Json.Linq.JObject obj in objs)
                {
                    ActivationModule SchoolAccountActivationModule = new ActivationModule();
                    SchoolAccountActivationModule.ModuleName         = obj["ModuleName"].ToString();
                    SchoolAccountActivationModule.ModuleList_Setting = Helpers.LoadModuleSettings(SchoolAccountActivationModule.ModuleName);
                    this.ActivationModules.Add(SchoolAccountActivationModule);
                }
            }
            catch (Exception ex) {
            }
        }
Beispiel #6
0
        private void MediaForm_Load(object sender, EventArgs e)
        {
            ActivationModule cloudBancMediaModule = new ActivationModule();

            cloudBancMediaModule.ModuleName         = "media";
            cloudBancMediaModule.ModuleList_Setting = Helpers.LoadModuleSettings(cloudBancMediaModule.ModuleName);

            String cloudBancMediaUrl = "";

            foreach (ModuleSetting moduleSetting in cloudBancMediaModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("StoreURL"))
                {
                    cloudBancMediaUrl = moduleSetting.SettingData;
                }
            }
            if (NetworkInterface.GetIsNetworkAvailable() == true)
            {
                /* UniteEDNetwork net = new UniteEDNetwork();
                 * MediawebBrowser.Navigate(new Uri(cloudBancMediaUrl));*/

                try
                {
                    UniteEDNetwork net = new UniteEDNetwork();

                    //WindowState = FormWindowState.Maximized;

                    browser = new ChromiumWebBrowser(cloudBancMediaUrl)
                    {
                        Dock = DockStyle.Fill,
                    };
                    panel1.Controls.Add(browser);
                    browser.FrameLoadEnd += OnBrowserFrameLoadEnd;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
        private void EContentForm_Load(object sender, EventArgs e)
        {
            ActivationModule EduDoc = new ActivationModule();

            EduDoc.ModuleName         = "EduDoc";
            EduDoc.ModuleList_Setting = Helpers.LoadModuleSettings(EduDoc.ModuleName);

            String eduDocURL = "";

            foreach (ModuleSetting moduleSetting in EduDoc.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("eduDocURL"))
                {
                    eduDocURL = moduleSetting.SettingData;
                }
            }
            if (NetworkInterface.GetIsNetworkAvailable() == true)
            {
                try
                {
                    UniteEDNetwork net = new UniteEDNetwork();

                    //WindowState = FormWindowState.Maximized;

                    browser = new ChromiumWebBrowser(eduDocURL)
                    {
                        Dock = DockStyle.Fill,
                    };
                    panel1.Controls.Add(browser);
                    browser.FrameLoadEnd += OnBrowserFrameLoadEnd;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
        private void btnClassRoom_Click(object sender, EventArgs e)
        {
            ActivationModule classRoomModule = new ActivationModule();

            classRoomModule.ModuleName         = ClassRoom.ToString();
            classRoomModule.ModuleList_Setting = Helpers.LoadModuleSettings(classRoomModule.ModuleName);

            String ClassRoomName = "";
            String ExeName       = "";

            foreach (ModuleSetting moduleSetting in classRoomModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("Name"))
                {
                    ClassRoomName = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("ExeName"))
                {
                    ExeName = moduleSetting.SettingData;
                }
            }

            if (Helpers.checkInstalled(ClassRoomName))
            {
                goto killProcess;
killProcess:
                foreach (var process in Process.GetProcessesByName(ExeName))
                {
                    process.Kill();
                }
                LaunchApp(ExeName);
            }
            else
            {
                MessageBox.Show(ClassRoomName + " was not found on your PC. Click Ok to Download. Once you have installed " + ClassRoomName + ", Click on ClassRoom again", "Open " + ClassRoomName, MessageBoxButtons.OK, MessageBoxIcon.Information);

                new ClassRoomForm().Show();
            }
        }
Beispiel #9
0
        private void MyCourses_Load(object sender, EventArgs e)
        {
            ActivationModule MoodleAccountActivationModule = new ActivationModule();

            MoodleAccountActivationModule.ModuleName         = "moodle";
            MoodleAccountActivationModule.ModuleList_Setting = Helpers.LoadModuleSettings(MoodleAccountActivationModule.ModuleName);


            foreach (ModuleSetting moduleSetting in MoodleAccountActivationModule.ModuleList_Setting)
            {
                if (moduleSetting.SettingName.Equals("moodleCoursesUrl"))
                {
                    moodleCoursesUrl = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("moodleLoginUrl"))
                {
                    moodleLoginUrl = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("moodleUsername"))
                {
                    moodleUsername = moduleSetting.SettingData;
                }
                if (moduleSetting.SettingName.Equals("moodlePassword"))
                {
                    moodlePassword = moduleSetting.SettingData;
                }
            }


            if (NetworkInterface.GetIsNetworkAvailable() == true)
            {
                try
                {
                    UniteEDNetwork net = new UniteEDNetwork();
                    LoginCookie();


                    Cef.SetCookie(moodleCoursesUrl, cookie.Name, cookie.Value, "", cookie.Path, cookie.Secure, cookie.HttpOnly, cookie.Expired, cookie.Expires);

                    browser = new ChromiumWebBrowser(moodleCoursesUrl)
                    {
                        Dock = DockStyle.Fill,
                    };


                    panel1.Controls.Add(browser);
                    browser.FrameLoadEnd += OnBrowserFrameLoadEnd;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                /*
                 * UniteEDNetwork net = new UniteEDNetwork();
                 * string postData = "username="******"&password="******"&wantsurl=";
                 * postData += moodleLoginUrl;
                 *
                 *
                 * net.PostMoodleData((httpResponse) =>
                 * {
                 *  try
                 *  {
                 *      using (System.IO.StreamReader httpwebStreamReader = new StreamReader(httpResponse.GetResponseStream()))
                 *      {
                 *          // ProgressBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                 *          // LayoutRoot.IsTapEnabled = true;
                 *          var re = httpwebStreamReader.ReadToEnd();
                 *          //login response
                 *          string cleanstr = re.ToString().TrimStart();
                 *          cleanstr = cleanstr.TrimEnd();
                 *
                 *          this.Invoke(
                 *                      (Action)(() =>
                 *                      {
                 *                          MyCoursewebBrowser.Navigate(new Uri(moodleLoginUrl));
                 *
                 *                      }
                 *
                 *                      ));
                 *
                 *
                 *
                 *
                 *          //Check for result code..
                 *      }
                 *  }
                 *  catch (Exception ex)
                 *  {
                 *
                 *      MessageBox.Show("Opening My Courses", ex.Message + "\n" + ex.StackTrace, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 *  }
                 * }, moodleLoginUrl + "?about", postData);
                 */
            }
            else
            {
                MessageBox.Show("Could not connect to internet", "Network connection", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }