Exemplo n.º 1
0
        private static void hide_menu(object sender, EventArgs e)
        {
            Startmenue startmenue = (Startmenue)sender;
            Form1      form1      = startmenue.attachedForm1;

            form1.lb_language.Text = $"Sprache: {type}";
            if (form1.first)
            {
                form1.first = false;
            }
            else
            {
                form1.mS.Visible = true;
                if (path != "")
                {
                    StreamReader sr = new StreamReader(path);
                    form1.tB_sourcecode.Text = sr.ReadToEnd();
                    sr.Close();
                }
                else
                {
                    form1.tB_sourcecode.Text = "";
                }
                form1.saved = true;
            }
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            bt_stop.BackColor       = customcolors[1];
            bt_start.BackColor      = customcolors[2];
            tB_sourcecode.BackColor = customcolors[4];
            tolock = new List <Button> {
                bt_start, bt_stop, bt_save, bt_open
            };
            mS.Visible = false;
            Startmenue startmenue1 = new Startmenue(true, this);

            startmenue1.Dock = DockStyle.Fill;
            Controls.Add(startmenue1);
            startmenue1.BringToFront();
            startmenue1.VisibleChanged += end_defs;
        }
Exemplo n.º 3
0
        private void mS_new_Click(object sender, EventArgs e)
        {
            if (!(tB_sourcecode.Text == "" || saved))
            {
                DialogResult dialogResult1 = MessageBox.Show("Willst du vor dem Schließen speichern?", "Speichern", MessageBoxButtons.YesNo);
                if (dialogResult1 == DialogResult.Yes)
                {
                    Save(false);
                }
            }
            //first = true;
            mS.Visible = false;
            type       = "";
            path       = "";
            Startmenue startmenue1 = new Startmenue(false, this);

            startmenue1.Dock = DockStyle.Fill;
            Controls.Add(startmenue1);
            startmenue1.BringToFront();
            startmenue1.VisibleChanged += end_defs;
        }