Beispiel #1
0
        void save(object sender, EventArgs e)
        {
            switchToRed(null, null);
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Title  = "Save UTB attack";
            sfd.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
            sfd.ShowDialog();
            if (sfd.FileName != "")
            {
                //FileStream fs = new FileStream(sfd.FileName, FileMode.Create);
                System.IO.File.WriteAllText(@sfd.FileName, SectionPurple.makeResult());
            }
            else
            {
                MessageBox.Show("So...it was all a lie?\nYou never really wanted to save your attack to load it later.\nYou just felt like clicking the save button for no reason.\nThat's right, you've been exposed.");
            }
        }
Beispiel #2
0
        public MainForm(RealWindow _rw)
        {
            rw = _rw;

            try {
                Holder.happyIcon = new Icon(Directory.GetCurrentDirectory() + "/Assets/icon.ico");
                this.Icon        = Holder.happyIcon;
            }
            catch (Exception ex) {
                MessageBox.Show("error loading icon file.\n" + ex.ToString());
                Application.Exit();
            }

            this.Text      = "UTB thing";
            this.Name      = "NoobThingForRob";
            sectionList[0] = (Section) new SectionRed();
            sectionList[1] = new SectionOrange(this);
            sectionList[2] = new SectionYellow();
            sectionList[3] = new SectionGreen();
            sectionList[4] = new SectionCyan();
            sectionList[5] = new SectionBlue(this);
            sectionList[6] = new SectionPurple();
            sectionList[7] = new SectionLinks();
            sectionList[8] = new SectionAbout();
            currentSection = sectionList[0];

            currentSection.initSection(this);

            this.FormBorderStyle = FormBorderStyle.None;

            this.MaximizeBox = false;

            this.Move += new EventHandler(moved);
            //this.Activated += new EventHandler(gotFocused);



            mf               = new MoveForm(this);
            mf.TopLevel      = false;
            mf.happyMainForm = this;
            //mf.Show();
        }