private static float RemainingScience(Biome biome)
        {
            if (biome == null || HighLogic.CurrentGame == null)
            {
                return(0.0f);
            }

            return(Science.GetSubjects(new CelestialBody[] { biome.body }, null, b => b == biome.biome).Sum(subj =>
                                                                                                            subj.scienceCap * HighLogic.CurrentGame.Parameters.Career.ScienceGainMultiplier - subj.science));
        }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Login,Password,FirstName,LastName,Science,Students")] TeacherDTO teacher)
        {
            try
            {
                var userLogins = _teachService.GetItemList().Select(t => t.Login).ToList();
                userLogins.AddRange(_studService.GetItemList().Select(t => t.Login).ToList());
                if (userLogins.Contains(teacher.Login) && _teachService.GetItem(teacher.Id).Login != teacher.Login)
                {
                    ModelState.AddModelError("Login", "User with such login already exists");
                    return(View(CreateTeacherDto(teacher)));
                }

                if (!teacher.Science.Students.Select(s => s.Checked).Contains(true))
                {
                    ModelState.AddModelError("", "Not one student is selected");
                    return(View(CreateTeacherDto(teacher)));
                }

                var scienceNames = _scieService.GetItemList().Select(s => s.Name);
                if (scienceNames.Contains(teacher.Science.Name))
                {
                    ModelState.AddModelError("Science", "This science alredy exests");
                    return(View(CreateTeacherDto(teacher)));
                }

                if (ModelState.IsValid)
                {
                    var     config      = new MapperConfiguration(cfg => cfg.CreateMap <TeacherDTO, Teacher>().ForMember(s => s.Science, opt => opt.Ignore()));
                    var     mapper      = config.CreateMapper();
                    Teacher someTeacher = mapper.Map <TeacherDTO, Teacher>(teacher);
                    Science someScience = new Science
                    {
                        Id   = teacher.Science.Id,
                        Name = teacher.Science.Name
                    };
                    someTeacher.Science = someScience;
                    var checkedList = teacher.Science.Students.Where(st => st.Checked == true).ToList();
                    someTeacher.Science.Students = new List <Student>();
                    foreach (var student in checkedList)
                    {
                        someTeacher.Science.Students.Add(_studService.GetItem(student.Id));
                    }
                    _scieService.Create(someTeacher.Science);
                    _teachService.Create(someTeacher);
                    _teachService.Save();
                    return(RedirectToAction("Index"));
                }

                return(RedirectToAction("Index"));
            }
            catch (AutoMapperConfigurationException e)
            {
                return(View(teacher));
            }
        }
        private static string SituationString(ScienceSubject subject)
        {
            if (subject == null)
            {
                return("");
            }

            ScienceExperiment experiment = Science.GetExperiment(subject);

            return(subject.title.Replace(experiment.experimentTitle + " ", ""));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 删除课程信息
        /// </summary>
        /// <param name="loginUser"></param>
        /// <returns></returns>
        public bool DeleteClassInfo(Science science)
        {
            int result;

            using (SqlConnection conn = new SqlConnection(Config.connStr))
            {
                string sql = @"update Science set IsValid=@IsValid where Cno=@Cno";
                result = conn.Execute(sql, science);
            }
            return(result > 0);
        }
Exemplo n.º 5
0
 // 减 NTGO 梁家其 引用科学计数法
 public string Sub(string num1, string num2)
 {
     if (num1.Contains('E') || num2.Contains('E'))
     {
         return(Science.Subtract(num1, num2));
     }
     else
     {
         return((Convert.ToDecimal(num1) - Convert.ToDecimal(num2)).ToString());
     }
 }
Exemplo n.º 6
0
 // 加 NTGO 梁家其 引用科学计数法
 public string Add(string num1, string num2)
 {
     if (num1.Contains('E') || num2.Contains('E'))
     {
         return(Science.Addition(num1, num2));
     }
     else
     {
         return((Convert.ToDecimal(num1) + Convert.ToDecimal(num2)).ToString());
     }
 }
Exemplo n.º 7
0
 private void Awake()
 {
     instance = this;
     foreach (ScienceTask task in tasks.scienceList)
     {
         taskList.Add(new TaskContainer()
         {
             task = task
         });
     }
 }
Exemplo n.º 8
0
        /// <summary>
        /// 添加课程信息
        /// </summary>
        /// <param name="loginUser"></param>
        /// <returns></returns>
        public bool AddClassInfo(Science science)
        {
            int result;

            using (SqlConnection conn = new SqlConnection(Config.connStr))
            {
                string sql = @"insert into Science(Course,sCredit,sCtime,Remark,IsValid) 
                                values(@Course,@sCredit,@sCtime,@Remark,@IsValid)";
                result = conn.Execute(sql, science);
            }
            return(result > 0);
        }
Exemplo n.º 9
0
    private bool CanResearch()
    {
        foreach (string s in task.requested)
        {
            TaskContainer c = Science.GetById(s);
            if (c == null || !c.completed)
            {
                return(false);
            }
        }

        return(true);
    }
Exemplo n.º 10
0
        /// <summary>
        /// 修改课程信息
        /// </summary>
        /// <param name="loginUser"></param>
        /// <returns></returns>
        public bool EditClassInfo(Science science)
        {
            int result;

            using (SqlConnection conn = new SqlConnection(Config.connStr))
            {
                string sql = @"update Science set Course=@Course,
                                sCredit=@sCredit,sCtime=@sCtime, Remark=@Remark,IsValid=@IsValid
                                where Cno=@Cno";
                result = conn.Execute(sql, science);
            }
            return(result > 0);
        }
Exemplo n.º 11
0
    /// <summary>
    /// Copy from loaded item.
    /// shouldn't copy non-serialized fields
    /// </summary>
    /// <param name="source"> source for copying </param>
    public override void Copy(AbstractObject source)
    {
        base.Copy(source);
        Science scs = (Science)source;

        for (int i = 0; i < m_dependencyCount.Length; i++)
        {
            for (int ii = 0; ii < m_dependencyCount[i].m_value.Count; ii++)
            {
                m_dependencyCount[i].m_value[ii] = scs.m_dependencyCount[i].m_value[ii];
            }
        }
    }
Exemplo n.º 12
0
    public bool CompleteExperiment(IScienceExperiment experiment)
    {
        if (experiment.Experiment == ExperimentType.BioMinilab && !this.MinilabDocked)
        {
            GuiBridge.Instance.ShowNews(NewsSource.MinilabNotDocked);
            return(false);
        }

        Science.Complete(experiment);
        CleanupExperiments(experiment);
        experiment.OnComplete();

        return(true);
    }
 private void LoadData(Science c)
 {
     ScienceImage.Source   = new BitmapImage(new Uri(c.Picture));
     ScienceName.Text      = c.Name;
     ScienceEnName.Text    = c.EnName;
     Need1PicButton.Source = StringProcess.GetGameResourcePath(c.Need1);
     Need1PicButton.Text   = $"×{c.Need1Value}";
     if (c.Need2 != null)
     {
         Need2PicButton.Source     = StringProcess.GetGameResourcePath(c.Need2);
         Need2PicButton.Text       = $"×{c.Need2Value}";
         Need2PicButton.Visibility = Visibility.Visible;
     }
     if (c.Need3 != null)
     {
         Need3PicButton.Source     = StringProcess.GetGameResourcePath(c.Need3);
         Need3PicButton.Text       = $"×{c.Need3Value}";
         Need3PicButton.Visibility = Visibility.Visible;
     }
     if (c.Unlock == null && c.UnlockCharcter == null && c.UnlockBlueprint == null)
     {
         ScienceUnlockStackPanel.Visibility = Visibility.Collapsed;
     }
     else
     {
         if (c.Unlock != null && c.Unlock.Count > 0)
         {
             UnlockPicButton.Visibility = Visibility.Visible;
             UnlockPicButton.Source     = StringProcess.GetGameResourcePath(c.Unlock[0]);
             if (c.Unlock.Count == 2)
             {
                 Unlock2PicButton.Visibility = Visibility.Visible;
                 Unlock2PicButton.Source     = StringProcess.GetGameResourcePath(c.Unlock[1]);
             }
         }
         if (c.UnlockCharcter != null)
         {
             UnlockCharcterButton.Visibility = Visibility.Visible;
             UnlockCharcterImage.Source      = new BitmapImage(new Uri(StringProcess.GetGameResourcePath(c.UnlockCharcter)));
             _unlockCharcter = StringProcess.GetGameResourcePath(c.UnlockCharcter);
         }
         if (c.UnlockBlueprint != null)
         {
             UnlockBlueprintPicButton.Visibility = Visibility.Visible;
             UnlockBlueprintPicButton.Source     = StringProcess.GetGameResourcePath(c.UnlockBlueprint);
         }
     }
     ScienceIntroduction.Text = c.Introduction;
     ConsolePre.Text          = $"c_give(\"{c.Console}\",";
 }
Exemplo n.º 14
0
    /// <summary>
    /// parsing excel data into current format
    /// </summary>
    /// <param name="itm">target</param>
    /// <param name="repItm">source</param>
    /// <returns> parsed item </returns>
    public static new AbstractObject Parse(AbstractObject itm, ExcelLoading.AbstractObject repItm)
    {
        Localization loc = Localization.GetLocalization();

        ExcelLoading.ScienceItem rep = (ExcelLoading.ScienceItem)repItm;
        Science scs = (Science)itm;

        scs.m_repItem             = rep;
        scs.m_tooltipCount        = loc.m_ui.m_scienceCount;
        scs.m_tooltipProductivity = loc.m_ui.m_scienceProductivity;
        Productions.AddProduction(scs, "science");

        return(GameAbstractItem.Parse(itm, repItm));
    }
Exemplo n.º 15
0
        static void Main(string[] args)
        {
            Console.WriteLine("***Iterator Pattern Demo***\n");
            ISubjects ScienceSubjects = new Science();
            ISubjects ArtsSubjects    = new Arts();

            IIterator IteratorForScience = ScienceSubjects.CreateIterator();
            IIterator IteratorForArts    = ArtsSubjects.CreateIterator();

            Console.WriteLine("\nScience subjects:");
            Print(IteratorForScience);

            Console.WriteLine("\nArts subjects:");
            Print(IteratorForArts);
        }
Exemplo n.º 16
0
    private void Start()
    {
        if (!pricePanel)
        {
            return;
        }

        pricePanel.SetActive(false);
        turret = Science.GetTurretById(turretId);
        if (turret == null)
        {
            return;
        }
        priceText.text = turret.price.ToString();
    }
Exemplo n.º 17
0
    public bool CompleteExperiment(IScienceExperiment experiment)
    {
        if (experiment.Experiment == ExperimentType.BioMinilab && !this.MinilabDocked)
        {
            GuiBridge.Instance.ShowNews(NewsSource.MinilabNotDocked);
            return(false);
        }

        Science.Complete(experiment);
        Game.Current.Score.AddScoringEvent(RedHomestead.Scoring.ScoreType.Science, GuiBridge.Instance);
        CleanupExperiments(experiment);
        experiment.OnComplete();

        return(true);
    }
Exemplo n.º 18
0
 // NTGO 梁家其  科学计数法四则运算
 public string Squ(string num1)
 {
     if (num1.Contains("e") || num1.Contains("E"))
     {
         return(Science.Multiply(num1, num1));
     }
     else if (num1.Contains("不") || num1.Contains("无") || num1.Contains("未") || num1.Contains("溢"))
     {
         return(num1);
     }
     else
     {
         return((Convert.ToDouble(num1) * Convert.ToDouble(num1)).ToString());
     }
 }
Exemplo n.º 19
0
        public static void BackgroundUpdate(Vessel v, ProtoPartModuleSnapshot m, Experiment exp, Resource_Info ec, double elapsed_s)
        {
            // if experiment is active
            if (Lib.Proto.GetBool(m, "recording"))
            {
                // detect conditions
                // - comparing against amount in previous step
                bool   has_ec       = ec.amount > double.Epsilon;
                bool   has_operator = new CrewSpecs(exp.crew).Check(v);
                string sit          = Science.Situation(v, exp.situations);

                // deduce issues
                string issue = string.Empty;
                if (sit.Length == 0)
                {
                    issue = "invalid situation";
                }
                else if (!has_operator)
                {
                    issue = "no operator";
                }
                else if (!has_ec)
                {
                    issue = "missing <b>EC</b>";
                }
                Lib.Proto.Set(m, "issue", issue);

                // if there are no issues
                if (issue.Length == 0)
                {
                    // generate subject id
                    string subject_id = Science.Generate_Subject(exp.experiment, v.mainBody, sit, Science.Biome(v, sit), Science.Multiplier(v, sit));

                    // record in drive
                    if (exp.transmissible)
                    {
                        DB.Vessel(v).drive.Record_File(subject_id, exp.data_rate * elapsed_s);
                    }
                    else
                    {
                        DB.Vessel(v).drive.Record_Sample(subject_id, exp.data_rate * elapsed_s);
                    }

                    // consume ec
                    ec.Consume(exp.ec_rate * elapsed_s);
                }
            }
        }
Exemplo n.º 20
0
        protected void ClassInfo_gv_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string  key     = ClassInfo_gv.DataKeys[e.RowIndex].Value.ToString().Trim();
            Science science = new Science
            {
                Cno     = int.Parse(key),
                IsValid = false
            };

            if (teacherManager.DeleteClassInfo(science))
            {
                Response.Write("<script>alert('删除成功');</script>");
            }
            else
            {
                Response.Write("<script>alert('删除失败');</script>");
            }
            IntitData();
        }
Exemplo n.º 21
0
        /// <summary>
        /// Concrete object of the Creator
        /// </summary>
        /// <param name="reportType"></param>
        /// <returns>type Report</returns>
        public static Reports CreateReports(string reportType)
        {
            Console.WriteLine($"Writing a {reportType} report");
            Reports reports = null;

            switch (reportType.ToLower())
            {
            case "news":
                reports = new News();
                break;

            case "science":
                reports = new Science();
                break;

            default:
                break;
            }
            return(reports);
        }
Exemplo n.º 22
0
    private void AddScience(Science science)
    {
        _sciencesCount [science]++;
        int complectInd   = _sciencesCount [science];
        int complectCount = 0;

        foreach (var currCount in _sciencesCount.Values)
        {
            if (complectInd <= currCount)
            {
                complectCount++;
            }
        }
        int incScore = complectCount * complectCount - (complectCount - 1) * (complectCount - 1);

        if (GameTrainingController.UsedScoreSources == GameTrainingController.ScoreSources.Any || GameTrainingController.UsedScoreSources == GameTrainingController.ScoreSources.Science)
        {
            Score += incScore;
        }
    }
Exemplo n.º 23
0
        protected void Btn_Edit_Click(object sender, EventArgs e)
        {
            Science editUser = new Science
            {
                Course  = txt_name.Text.Trim(),
                SCredit = txt_credit.Text.Trim(),
                Remark  = txt_remark.Text.Trim(),
                SCtime  = txt_time.Text.Trim(),
                IsValid = true
            };

            if (teacherManager.AddClassInfo(editUser))
            {
                Response.Write("<script>alert('添加成功');</script>");
                Server.Transfer("ClassList.aspx");
            }
            else
            {
                Response.Write("<script>alert('添加失败');</script>");
            }
        }
Exemplo n.º 24
0
        public ScienceDialog(Science s)
        {
            this.InitializeComponent();

            ScienceImage.Source = new BitmapImage(new Uri(s.Image));
            ScienceName.Text    = s.Name;
            ScienceEnName.Text  = s.EnName;
            Need1.Source        = new BitmapImage(new Uri(s.Need1));
            Need1Value.Text     = "×" + s.Need1Value;
            if (s.Need2Value != 0)
            {
                Need2.Source    = new BitmapImage(new Uri(s.Need2));
                Need2Value.Text = "×" + s.Need2Value;
            }
            if (s.Need3Value != 0)
            {
                Need3.Source = new BitmapImage(new Uri(s.Need3));
                if (s.Need3Value < 0)
                {
                    if (s.Need3Value == -20 || s.Need3Value == -35)
                    {
                        Need3Value.Text = s.Need3Value.ToString() + "%";
                    }
                    else
                    {
                        Need3Value.Text = s.Need3Value.ToString();
                    }
                }
                else
                {
                    Need3Value.Text = "×" + s.Need3Value;
                }
            }
            ROG.IsChecked            = s.IsROG;
            SW.IsChecked             = s.IsSW;
            DST.IsChecked            = s.IsDST;
            UnLock.Source            = new BitmapImage(new Uri(s.Unlock));
            ScienceIntroduction.Text = s.Introduction;
            Console.Text             = s.Console;
        }
Exemplo n.º 25
0
        public static void WriteIndvidualClasses(Dictionary <int, Student> students)
        {
            int pos = 1;

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\individuals.txt"))
            {
                foreach (var student in students)
                {
                    Class_ c = student.Value.classes[3];

                    if (c == null)
                    {
                        c = new Science(CourseHandler.COURSENAME.None);
                    }

                    if ((student.Key > 70) && student.Value.Grade == 10)
                    {
                        file.WriteLine(String.Format("{0}.) {1} \t {2} {3} \t {4}", pos++, student.Key, student.Value.FirstName, student.Value.LastName, c.course.ToString()));
                    }
                }
            }
        }
Exemplo n.º 26
0
    /// <summary>
    /// loading data from xml files
    /// </summary>
    public void Loading()
    {
        //order is important! from parents to children, science the last one
        EffectTypeHolder.Load("effect_map");
        MineralResource.Load("mineralResource_Map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Resource.Load("resource_Map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        GameMaterial.Load("materials_Map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Items.Load("items_Map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Buildings.Load("buildings_Map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Army.Load("army_map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Process.Load("process_map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        Science.Load("science_map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        DomesticAnimal.Load("domesticAnimal_map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());
        WildAnimal.Load("wildAnimal_map");
        //Debug.Log("all items amount:" + GameAbstractItem.ItemsCount());

        LearningTip.Load("AllTips_Map");

        GameAbstractItem.ParseDependency();
        Population ppl = new Population {
            m_people = GetComponent <People>(), m_isItOpen = 1
        };

        AbstractObject.m_sEverything.Add(ppl);
        Localization.GetLocalization().FirstLoad();
        Localization.GetLocalization().ChangeLanguage(Localization.GetLocalization().m_currentLanguage);
        AbstractObject.ClearUnparsed();

        Debug.Log("loading finished");
    }
Exemplo n.º 27
0
        public ActionResult Edit([Bind(Include = "Id,Login,Password,FirstName,LastName,Science,Students")] TeacherDTO teacherDto)
        {
            try
            {
                if (!teacherDto.Science.Students.Select(s => s.Checked).Contains(true))
                {
                    ModelState.AddModelError("", "Not one student is selected");
                    return(View(CreateTeacherDto(teacherDto)));
                }
                if (ModelState.IsValid)
                {
                    Teacher teacherDomain = _teachService.GetItem(teacherDto.Id);
                    teacherDomain.FirstName = teacherDto.FirstName;
                    teacherDomain.LastName  = teacherDto.LastName;
                    teacherDomain.Password  = teacherDto.Password;

                    Science scienceDomain = _scieService.GetItem(teacherDto.Id);
                    scienceDomain.Name = teacherDto.Science.Name;
                    scienceDomain.Students.Clear();
                    foreach (var stud in teacherDto.Science.Students.Where(s => s.Checked == true))
                    {
                        scienceDomain.Students.Add(_studService.GetItem(stud.Id));
                    }

                    teacherDomain.Science = scienceDomain;
                    scienceDomain.Teacher = teacherDomain;
                    _scieService.Update(scienceDomain);
                    _teachService.Update(teacherDomain);
                    _scieService.Save();
                    return(RedirectToAction("Index"));
                }
            }
            catch (Exception e)
            {
                return(View(CreateTeacherDto(teacherDto)));
            }
            return(View(teacherDto));
        }
Exemplo n.º 28
0
        public MetaData(ScienceData data, Part host)
        {
            // find the part containing the data
            part = host;

            // get the vessel
            vessel = part.vessel;

            // get the container module storing the data
            container = Science.Container(part, Science.Experiment(data.subjectID).id);

            // get the stock experiment module storing the data (if that's the case)
            experiment = container != null ? container as ModuleScienceExperiment : null;

            // determine if this is a sample (non-transmissible)
            // - if this is a third-party data container/experiment module, we assume it is transmissible
            // - stock experiment modules are considered sample if xmit scalar is below a threshold instead
            is_sample = experiment != null && experiment.xmitDataScalar < 0.666f;

            // determine if the container/experiment can collect the data multiple times
            // - if this is a third-party data container/experiment, we assume it can collect multiple times
            is_rerunnable = experiment == null || experiment.rerunnable;
        }
Exemplo n.º 29
0
    public static void ShowDescription(string scienceID, Vector3 pos)
    {
        Plane plane = new Plane(instance.descriptionPanel.transform.forward, instance.descriptionPanel.transform.position);
        // create a ray from the mousePosition
        Ray ray = Camera.main.ScreenPointToRay(Camera.main.WorldToScreenPoint(pos) + new Vector3(40, 10, 0));
        // plane.Raycast returns the distance from the ray start to the hit point
        float distance;

        if (plane.Raycast(ray, out distance))
        {
            // some point of the plane was hit - get its coordinates
            Vector3 hitPoint = ray.GetPoint(distance);
            instance.descriptionPanel.transform.position = hitPoint;

            TaskContainer task = Science.GetById(scienceID);

            instance.descriptionPanel.caption          = task.task.caption;
            instance.descriptionPanel.description      = task.task.description;
            instance.descriptionPanel.iconImage.sprite = task.task.icon;

            instance.descriptionPanel.gameObject.SetActive(true);
        }
    }
Exemplo n.º 30
0
    private void Start()
    {
        pop        = GetComponent <Population>();
        energy     = GetComponent <Energy>();
        food       = GetComponent <Food>();
        technology = GetComponent <Technology>();
        army       = GetComponent <Army>();
        science    = GetComponent <Science>();

        //if was randomized the numbers just load their
        if (PlayerPrefs.GetInt("FrontGroundSpawnPosition0") > 0 || PlayerPrefs.GetInt("FrontGroundSpawnPosition1") > 0)
        {
            LoadNumbers();
        }
        //else wasn't randomize new numbers
        else
        {
            RandomizeGroundNumbers();
            RandomizeWaterNumbers();
            SavaNumbers();
        }
        //Put the random itens on te scripts
        RandomizePositions();
    }
Exemplo n.º 31
0
        private void Entertainment_btn1_Click(object sender, EventArgs e)
        {
            if (RB1.Checked)
            {
                if (!File.Exists(Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Pastor Rick Warren, author of The Purpose-Driven Life, reflects on his own crisis of purpose in the wake of his book's wild success. He explains his belief that God's intention is for each of us to use our talents and influence to do good.Pastor Rick Warren is the author of The Purpose-Driven Life, which has sold more than 30 million copies worldwide. His has become an immensely influential voice seeking to apply the values of his faith to issues such as global poverty, HIV/AIDS and injustice.");
                    sw.WriteLine("Speaking at TED in 1998, Rev. Billy Graham marvels at technology's power to improve lives and change the world -- but says the end of evil, suffering and death will come only after the world accepts Christ. A legendary talk from TED's archives. The Rev. Billy Graham is a religious leader with a worldwide reach. In his long career as an evangelist, he has spoken to millions and been an advisor to US presidents");
                    sw.WriteLine("Julia Sweeney (God Said, Ha!) performs the first 15 minutes of her 2006 solo show Letting Go of God. When two young Mormon missionaries knock on her door one day, it touches off a quest to completely rethink her own beliefs. As a solo performer, comic actor Julia Sweeney explores love, cancer, family and faith. Her latest solo show and CD, Letting Go of God, is about the quest for something I could really believe in -- which turns out to be no God at all");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Pastor Rick Warren, author of The Purpose-Driven Life, reflects on his own crisis of purpose in the wake of his book's wild success. He explains his belief that God's intention is for each of us to use our talents and influence to do good.Pastor Rick Warren is the author of The Purpose-Driven Life, which has sold more than 30 million copies worldwide. His has become an immensely influential voice seeking to apply the values of his faith to issues such as global poverty, HIV/AIDS and injustice.");
                    sw.WriteLine("Speaking at TED in 1998, Rev. Billy Graham marvels at technology's power to improve lives and change the world -- but says the end of evil, suffering and death will come only after the world accepts Christ. A legendary talk from TED's archives. The Rev. Billy Graham is a religious leader with a worldwide reach. In his long career as an evangelist, he has spoken to millions and been an advisor to US presidents");
                    sw.WriteLine("Julia Sweeney (God Said, Ha!) performs the first 15 minutes of her 2006 solo show Letting Go of God. When two young Mormon missionaries knock on her door one day, it touches off a quest to completely rethink her own beliefs. As a solo performer, comic actor Julia Sweeney explores love, cancer, family and faith. Her latest solo show and CD, Letting Go of God, is about the quest for something I could really believe in -- which turns out to be no God at all");
                    sw.Close();
                    aFile.Close();
                }
            }

            else if (RB2.Checked)
            {
                if (!File.Exists(Not_Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Pastor Rick Warren, author of The Purpose-Driven Life, reflects on his own crisis of purpose in the wake of his book's wild success. He explains his belief that God's intention is for each of us to use our talents and influence to do good.Pastor Rick Warren is the author of The Purpose-Driven Life, which has sold more than 30 million copies worldwide. His has become an immensely influential voice seeking to apply the values of his faith to issues such as global poverty, HIV/AIDS and injustice.");
                    sw.WriteLine("Speaking at TED in 1998, Rev. Billy Graham marvels at technology's power to improve lives and change the world -- but says the end of evil, suffering and death will come only after the world accepts Christ. A legendary talk from TED's archives. The Rev. Billy Graham is a religious leader with a worldwide reach. In his long career as an evangelist, he has spoken to millions and been an advisor to US presidents");
                    sw.WriteLine("Julia Sweeney (God Said, Ha!) performs the first 15 minutes of her 2006 solo show Letting Go of God. When two young Mormon missionaries knock on her door one day, it touches off a quest to completely rethink her own beliefs. As a solo performer, comic actor Julia Sweeney explores love, cancer, family and faith. Her latest solo show and CD, Letting Go of God, is about the quest for something I could really believe in -- which turns out to be no God at all");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Pastor Rick Warren, author of The Purpose-Driven Life, reflects on his own crisis of purpose in the wake of his book's wild success. He explains his belief that God's intention is for each of us to use our talents and influence to do good.Pastor Rick Warren is the author of The Purpose-Driven Life, which has sold more than 30 million copies worldwide. His has become an immensely influential voice seeking to apply the values of his faith to issues such as global poverty, HIV/AIDS and injustice.");
                    sw.WriteLine("Speaking at TED in 1998, Rev. Billy Graham marvels at technology's power to improve lives and change the world -- but says the end of evil, suffering and death will come only after the world accepts Christ. A legendary talk from TED's archives. The Rev. Billy Graham is a religious leader with a worldwide reach. In his long career as an evangelist, he has spoken to millions and been an advisor to US presidents");
                    sw.WriteLine("Julia Sweeney (God Said, Ha!) performs the first 15 minutes of her 2006 solo show Letting Go of God. When two young Mormon missionaries knock on her door one day, it touches off a quest to completely rethink her own beliefs. As a solo performer, comic actor Julia Sweeney explores love, cancer, family and faith. Her latest solo show and CD, Letting Go of God, is about the quest for something I could really believe in -- which turns out to be no God at all");
                    sw.Close();
                    aFile.Close();
                }
            }

            if (length == 4 || length == 3 || length == 1)
            {

                 if (Next == "Environment")
                {
                    Environment frm = new Environment(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Sports")
                {
                    Sports_1 frm = new Sports_1(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Politics")
                {
                    Politics frm = new Politics(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Medical")
                {
                    Medical frm = new Medical(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Science")
                {
                    Science frm = new Science(NewUserSlections);
                    frm.Show();
                }
                 else
                 {
                     Finish frm = new Finish();
                     frm.Show();
                 }
            }

                else
                {
                    Finish frm = new Finish();
                    frm.Show();
                }

            this.Close();
        }
Exemplo n.º 32
0
        private void Entertainment_btn1_Click(object sender, EventArgs e)
        {
            if (RB1.Checked)
            {
                if (!File.Exists(Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Lewis Pugh talks about his record-breaking swim across the North Pole. He braved the icy waters (in a Speedo) to highlight the melting icecap. Watch for astonishing footage -- and some blunt commentary on the realities of supercold-water swims. Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest.");
                    sw.WriteLine("After he swam the North Pole, Lewis Pugh vowed never to take another cold-water dip. Then he heard of Lake Imja in the Himalayas, created by recent glacial melting, and Lake Pumori, a body of water at an altitude of 5300 m on Everest -- and so began a journey that would teach him a radical new way to approach swimming and think about climate change.Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Lewis Pugh talks about his record-breaking swim across the North Pole. He braved the icy waters (in a Speedo) to highlight the melting icecap. Watch for astonishing footage -- and some blunt commentary on the realities of supercold-water swims. Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest.");
                    sw.WriteLine("After he swam the North Pole, Lewis Pugh vowed never to take another cold-water dip. Then he heard of Lake Imja in the Himalayas, created by recent glacial melting, and Lake Pumori, a body of water at an altitude of 5300 m on Everest -- and so began a journey that would teach him a radical new way to approach swimming and think about climate change.Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest");
                    sw.Close();
                    aFile.Close();
                }
            }

            else if (RB2.Checked)
            {
                if (!File.Exists(Not_Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Lewis Pugh talks about his record-breaking swim across the North Pole. He braved the icy waters (in a Speedo) to highlight the melting icecap. Watch for astonishing footage -- and some blunt commentary on the realities of supercold-water swims. Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest.");
                    sw.WriteLine("After he swam the North Pole, Lewis Pugh vowed never to take another cold-water dip. Then he heard of Lake Imja in the Himalayas, created by recent glacial melting, and Lake Pumori, a body of water at an altitude of 5300 m on Everest -- and so began a journey that would teach him a radical new way to approach swimming and think about climate change.Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("Lewis Pugh talks about his record-breaking swim across the North Pole. He braved the icy waters (in a Speedo) to highlight the melting icecap. Watch for astonishing footage -- and some blunt commentary on the realities of supercold-water swims. Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest.");
                    sw.WriteLine("After he swam the North Pole, Lewis Pugh vowed never to take another cold-water dip. Then he heard of Lake Imja in the Himalayas, created by recent glacial melting, and Lake Pumori, a body of water at an altitude of 5300 m on Everest -- and so began a journey that would teach him a radical new way to approach swimming and think about climate change.Pushing his body through epic cold-water swims, Lewis Gordon Pugh wants to draw attention to our global climate. He's just back from swimming in a meltwater lake on the slopes of Mount Everest");
                    sw.Close();
                    aFile.Close();
                }
            }

            if (length == 4 || length == 3 || length == 1)
            {

                if (Next == "Politics")
                {
                    Politics frm = new Politics(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Medical")
                {
                    Medical frm = new Medical(NewUserSlections);
                    frm.Show();
                }

                else if (Next == "Science")
                {
                    Science frm = new Science(NewUserSlections);
                    frm.Show();
                }
                else
                {
                    Finish frm = new Finish();
                    frm.Show();
                }

            }
                else
                {
                    Finish frm = new Finish();
                    frm.Show();
                }

            this.Close();
        }
Exemplo n.º 33
0
        private void Entertainment_btn1_Click(object sender, EventArgs e)
        {
            if (RB1.Checked)
            {
                if (!File.Exists(Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("James Cameron's big-budget (and even bigger-grossing) films create unreal worlds all their own. In this talk, he reveals his childhood fascination with the fantastic  from reading science fiction to deep-sea diving and how it ultimately drove the success of his blockbuster hits Aliens,The Terminator,Titanic and Avatar.James Cameron is the director of Avatar, Titanic, Terminator, The Abyss and many other blockbusters. While his outsize films push the bounds of technology, they're always anchored in human stories with heart and soul.");
                    sw.WriteLine("Film producer Jeff Skoll (An Inconvenient Truth) talks about his film company, Participant Productions, and the people who've inspired him to do good.Jeff Skoll was the first president of eBay; he used his dot-com fortune to found the film house Participant Productions, making movies to inspire social change, including Syriana; Good Night, and Good Luck; Murderball; An Inconvenient Trut");
                    sw.WriteLine("Movies have the power to create a shared narrative experience and to shape memories and worldviews. British film director Beeban Kidron invokes iconic film scenes -- from Miracle in Milan to Boyz n the Hood -- as she shows how her group FILMCLUB shares great films with kids. Beeban Kidron directed Bridget Jones: The Edge of Reason and Oranges Are Not the Only Fruit. She also cofounded FILMCLUB, a charity for students devoted to the art of storytelling through film");
                    sw.WriteLine("Nathaniel Kahn shares clips from his documentary My Architect, about his quest to understand his father, the legendary architect Louis Kahn. It's a film with meaning to anyone who seeks to understand the relationship between art and love. Nathaniel Kahn is an Oscar- and Emmy-nominated maker of documentary films. His journey to understand his distant father -- the legendary modern architect Louis Kahn -- became the film My Architect.");
                    sw.WriteLine("Every act of communication is, in some way, an act of translation. Onstage at TEDxRainier, writer Chris Bliss thinks hard about the way that great comedy can translate deep truths for a mass audience. (Filmed at TEDxRainier.) Chris Bliss explores the inherent challenge of communication, and how comedy opens paths to new perspectives.");
                    sw.WriteLine("At TED2012, filmmaker Karen Bass shares some of the astonishing nature footage she's shot for the BBC and National Geographic -- including brand-new, previously unseen footage of the tube-lipped nectar bat, who feeds in a rather unusual way … Karen Bass has traveled the world to explore and capture footage from every environment across the Earth");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("James Cameron's big-budget (and even bigger-grossing) films create unreal worlds all their own. In this talk, he reveals his childhood fascination with the fantastic  from reading science fiction to deep-sea diving and how it ultimately drove the success of his blockbuster hits Aliens,The Terminator,Titanic and Avatar.James Cameron is the director of Avatar, Titanic, Terminator, The Abyss and many other blockbusters. While his outsize films push the bounds of technology, they're always anchored in human stories with heart and soul.");
                    sw.WriteLine("Film producer Jeff Skoll (An Inconvenient Truth) talks about his film company, Participant Productions, and the people who've inspired him to do good.Jeff Skoll was the first president of eBay; he used his dot-com fortune to found the film house Participant Productions, making movies to inspire social change, including Syriana; Good Night, and Good Luck; Murderball; An Inconvenient Trut");
                    sw.WriteLine("Movies have the power to create a shared narrative experience and to shape memories and worldviews. British film director Beeban Kidron invokes iconic film scenes -- from Miracle in Milan to Boyz n the Hood -- as she shows how her group FILMCLUB shares great films with kids. Beeban Kidron directed Bridget Jones: The Edge of Reason and Oranges Are Not the Only Fruit. She also cofounded FILMCLUB, a charity for students devoted to the art of storytelling through film");
                    sw.WriteLine("Nathaniel Kahn shares clips from his documentary My Architect, about his quest to understand his father, the legendary architect Louis Kahn. It's a film with meaning to anyone who seeks to understand the relationship between art and love. Nathaniel Kahn is an Oscar- and Emmy-nominated maker of documentary films. His journey to understand his distant father -- the legendary modern architect Louis Kahn -- became the film My Architect.");
                    sw.WriteLine("Every act of communication is, in some way, an act of translation. Onstage at TEDxRainier, writer Chris Bliss thinks hard about the way that great comedy can translate deep truths for a mass audience. (Filmed at TEDxRainier.) Chris Bliss explores the inherent challenge of communication, and how comedy opens paths to new perspectives.");
                    sw.WriteLine("At TED2012, filmmaker Karen Bass shares some of the astonishing nature footage she's shot for the BBC and National Geographic -- including brand-new, previously unseen footage of the tube-lipped nectar bat, who feeds in a rather unusual way … Karen Bass has traveled the world to explore and capture footage from every environment across the Earth");
                    sw.Close();
                    aFile.Close();
                }
            }

            else if (RB2.Checked)
            {
                if (!File.Exists(Not_Watch_fileLoc))
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Create, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                    sw.WriteLine("James Cameron's big-budget (and even bigger-grossing) films create unreal worlds all their own. In this talk, he reveals his childhood fascination with the fantastic  from reading science fiction to deep-sea diving and how it ultimately drove the success of his blockbuster hits Aliens,The Terminator,Titanic and Avatar.James Cameron is the director of Avatar, Titanic, Terminator, The Abyss and many other blockbusters. While his outsize films push the bounds of technology, they're always anchored in human stories with heart and soul.");
                    sw.WriteLine("Film producer Jeff Skoll (An Inconvenient Truth) talks about his film company, Participant Productions, and the people who've inspired him to do good.Jeff Skoll was the first president of eBay; he used his dot-com fortune to found the film house Participant Productions, making movies to inspire social change, including Syriana; Good Night, and Good Luck; Murderball; An Inconvenient Trut");
                    sw.WriteLine("Movies have the power to create a shared narrative experience and to shape memories and worldviews. British film director Beeban Kidron invokes iconic film scenes -- from Miracle in Milan to Boyz n the Hood -- as she shows how her group FILMCLUB shares great films with kids. Beeban Kidron directed Bridget Jones: The Edge of Reason and Oranges Are Not the Only Fruit. She also cofounded FILMCLUB, a charity for students devoted to the art of storytelling through film");
                    sw.WriteLine("Nathaniel Kahn shares clips from his documentary My Architect, about his quest to understand his father, the legendary architect Louis Kahn. It's a film with meaning to anyone who seeks to understand the relationship between art and love. Nathaniel Kahn is an Oscar- and Emmy-nominated maker of documentary films. His journey to understand his distant father -- the legendary modern architect Louis Kahn -- became the film My Architect.");
                    sw.WriteLine("Every act of communication is, in some way, an act of translation. Onstage at TEDxRainier, writer Chris Bliss thinks hard about the way that great comedy can translate deep truths for a mass audience. (Filmed at TEDxRainier.) Chris Bliss explores the inherent challenge of communication, and how comedy opens paths to new perspectives.");
                    sw.WriteLine("At TED2012, filmmaker Karen Bass shares some of the astonishing nature footage she's shot for the BBC and National Geographic -- including brand-new, previously unseen footage of the tube-lipped nectar bat, who feeds in a rather unusual way … Karen Bass has traveled the world to explore and capture footage from every environment across the Earth");
                    sw.Close();
                    aFile.Close();
                }
                else
                {
                    FileStream aFile = new FileStream(Not_Watch_fileLoc, FileMode.Append, FileAccess.Write);
                    StreamWriter sw = new StreamWriter(aFile);
                  sw.WriteLine("James Cameron's big-budget (and even bigger-grossing) films create unreal worlds all their own. In this talk, he reveals his childhood fascination with the fantastic  from reading science fiction to deep-sea diving and how it ultimately drove the success of his blockbuster hits Aliens,The Terminator,Titanic and Avatar.James Cameron is the director of Avatar, Titanic, Terminator, The Abyss and many other blockbusters. While his outsize films push the bounds of technology, they're always anchored in human stories with heart and soul.");
                    sw.WriteLine("Film producer Jeff Skoll (An Inconvenient Truth) talks about his film company, Participant Productions, and the people who've inspired him to do good.Jeff Skoll was the first president of eBay; he used his dot-com fortune to found the film house Participant Productions, making movies to inspire social change, including Syriana; Good Night, and Good Luck; Murderball; An Inconvenient Trut");
                    sw.WriteLine("Movies have the power to create a shared narrative experience and to shape memories and worldviews. British film director Beeban Kidron invokes iconic film scenes -- from Miracle in Milan to Boyz n the Hood -- as she shows how her group FILMCLUB shares great films with kids. Beeban Kidron directed Bridget Jones: The Edge of Reason and Oranges Are Not the Only Fruit. She also cofounded FILMCLUB, a charity for students devoted to the art of storytelling through film");
                    sw.WriteLine("Nathaniel Kahn shares clips from his documentary My Architect, about his quest to understand his father, the legendary architect Louis Kahn. It's a film with meaning to anyone who seeks to understand the relationship between art and love. Nathaniel Kahn is an Oscar- and Emmy-nominated maker of documentary films. His journey to understand his distant father -- the legendary modern architect Louis Kahn -- became the film My Architect.");
                    sw.WriteLine("Every act of communication is, in some way, an act of translation. Onstage at TEDxRainier, writer Chris Bliss thinks hard about the way that great comedy can translate deep truths for a mass audience. (Filmed at TEDxRainier.) Chris Bliss explores the inherent challenge of communication, and how comedy opens paths to new perspectives.");
                    sw.WriteLine("At TED2012, filmmaker Karen Bass shares some of the astonishing nature footage she's shot for the BBC and National Geographic -- including brand-new, previously unseen footage of the tube-lipped nectar bat, who feeds in a rather unusual way … Karen Bass has traveled the world to explore and capture footage from every environment across the Earth");
                    sw.Close();
                    aFile.Close();
                }
            }

             if (length == 4 || length == 3 || length == 1)
             {

                 if (Next == "Business")
                 {
                     Business frm = new Business(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Religious")
                 {
                     Religious_1 frm = new Religious_1(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Environment")
                 {
                     Environment frm = new Environment(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Sports")
                 {
                     Sports_1 frm = new Sports_1(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Politics")
                 {
                     Politics frm = new Politics(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Medical")
                 {
                     Medical frm = new Medical(NewUserSlections);
                     frm.Show();
                 }

                 else if (Next == "Science")
                 {
                     Science frm = new Science(NewUserSlections);
                     frm.Show();
                 }

                 else
                 {
                     Finish frm = new Finish();
                     frm.Show();
                 }
             }

             else
             {
                 Finish frm = new Finish();
                 frm.Show();
             }

             this.Close();
        }