示例#1
0
 public update(base_form parent)
 {
     // Global.FW_add(this, parent);
     FormManager.VoegToe(this, parent);
     _parent   = parent;
     this.Text = Global.WTitle;
     InitializeComponent();
 }
        public static void VoegToe(base_form huidig, base_form sluit_naar)
        {
            Forms_OD.Add(huidig, sluit_naar);
            String log_line = "open venster @ " + DateTime.Now.ToString() + ": huidig: " + huidig.ToString() + ": close_naar: " + sluit_naar.ToString();

            System.IO.StreamWriter file = new System.IO.StreamWriter(Global.log_file_path, true);
            file.WriteLine(log_line);
            file.Close();
        }
        public static void Sluit_forms(base_form sluit_vanaf)
        {
            DE = Forms_OD.GetEnumerator();
            int       index          = 0;
            bool      gevonden       = false;
            base_form herlaad_scherm = new base_form();

            while (DE.MoveNext())
            {
                if (DE.Key == sluit_vanaf && !gevonden)
                {
                    herlaad_scherm = (base_form)Forms_OD[index];
                    KillStack.Push((base_form)DE.Key);
                    gevonden = true;
                }
                else if (gevonden)
                {
                    KillStack.Push((base_form)DE.Key);
                }

                ++index;
            }
            int KillCount = KillStack.Count;

            for (int j = 0; j < KillCount; j++)
            {
                base_form tmp = KillStack.Pop();

                if (Sluitbaar(tmp))
                {
                    Forms_OD.Remove(tmp);
                    tmp.program_closes = true;
                    tmp.Close();
                    String log_line             = "sluit venster @ " + DateTime.Now.ToString() + ": huidig: " + tmp.ToString() + ": close_naar: " + herlaad_scherm.ToString();
                    System.IO.StreamWriter file = new System.IO.StreamWriter(Global.log_file_path, true);
                    file.WriteLine(log_line);
                    file.Close();
                }
                else
                {
                    herlaad_scherm = tmp;
                    break;
                }
            }

            if (gevonden)
            {
                herlaad_scherm.herlaad();
            }
            KillStack.Clear();
        }
示例#4
0
        public Adminscreen(base_form parent)
        {
            bsetvar_adapt.Connection.ConnectionString        = Global.ConnectionString_fileserver;
            psetvar_adapt.Connection.ConnectionString        = Global.ConnectionString_fileserver;
            bdr_var_funct_adapt.Connection.ConnectionString  = Global.ConnectionString_fileserver;
            pers_var_funct_adapt.Connection.ConnectionString = Global.ConnectionString_fileserver;
            bdr_nr_loc_adapt.Connection.ConnectionString     = Global.ConnectionString_fileserver;
            pers_nr_loc_adapt.Connection.ConnectionString    = Global.ConnectionString_fileserver;

            mParent = parent;
            InitializeComponent();
            initialiseer();
            button5.Enabled = false;
            button6.Enabled = false;
        }
 public TextBrowser(String txt, TextBox tb, bool edit, string veldnaam, string ownernaam, int id, base_form _parent)
 {
     InitializeComponent();
     btnopslaan.Hide();
     werktext          = txt;
     koppelbox         = tb;
     _Editing          = edit;
     textBox1.ReadOnly = true;
     this.Text         = Global.WTitle;
     label1.Text       = "Info " + veldnaam + "van project " + ownernaam;;
     label2.Text       = "Memo";
     label3.Text       = "ID " + id + " - " + ownernaam;
     //handelingen_logger.log_handeling(id, 1, 4);
     _ParentForm = _parent;
 }
        public static void Sluit_form(base_form enkel_sluit)
        {
            base_form tmpfrm;

            if (Forms_OD.Contains(enkel_sluit))
            {
                tmpfrm = (base_form)Forms_OD[enkel_sluit];
                enkel_sluit.program_closes = true;
                enkel_sluit.Close();
                Forms_OD.Remove(enkel_sluit);

                String log_line             = "sluit venster @ " + DateTime.Now.ToString() + ": huidig: " + enkel_sluit.ToString() + ": close_naar: " + tmpfrm.ToString();
                System.IO.StreamWriter file = new System.IO.StreamWriter(Global.log_file_path, true);
                file.WriteLine(log_line);
                file.Close();
            }
        }
 private static bool Sluitbaar(base_form bf)
 {
     if (bf.kan_sluiten())
     {
         return(true);
     }
     else
     {
         DialogResult dr = MessageBox.Show("Uw wijzigingen gaan verloren. Doorgaan?", "sluiten", MessageBoxButtons.OKCancel);
         if (dr == DialogResult.Cancel)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
        public void Start_route(int type, int route, base_form start_scherm, base_form pa_scherm, int Parent_ID, String veldnaam, String ownernaam)
        {
            m_type         = type;
            m_route        = route;
            m_start_scherm = start_scherm;
            m_pa_scherm    = pa_scherm;
            m_Parent_ID    = Parent_ID;
            m_veldnaam     = veldnaam;
            m_ownernaam    = ownernaam;

            switch (route)
            {
            case 0:    // normaal
                switch (m_type)
                {
                case 1:        //project
                    Norm_proj();
                    break;

                case 2:        //bedrijf
                    Norm_bdr();
                    break;

                case 3:        //persoon
                    Norm_pers();
                    break;
                }
                break;

            case 1:    // rood
                switch (m_type)
                {
                case 1:        //project
                    Rood_proj();
                    break;

                case 2:        //bedrijf
                    Rood_bdr();
                    break;

                case 3:        //persoon
                    Rood_pers();
                    break;
                }
                break;

            case 2:    // groen
                switch (m_type)
                {
                case 1:        //project
                    Groen_proj();
                    break;

                case 2:        //bedrijf
                    Groen_bdr();
                    break;

                case 3:        //persoon
                    Groen_pers();
                    break;
                }
                break;

            case 3:    //menu>listview
                Norm_ov();
                break;

            case 4:    //route *, nieuw-aanmaken
                Open_record();
                break;

            case 5:    //dubbelinvoer listv
                Dubbel_invoer();
                break;

            case 6:    //dubbel_inv dublicate found
                Dubbel_found();
                break;
            }
        }
示例#9
0
 public void Change_parents(base_form s_parent, base_form c_parent)
 {
     start_parent = s_parent;
     close_parent = c_parent;
 }
示例#10
0
 public instellingen_zb(base_form parent)
 {
     mParent = parent;
     InitializeComponent();
 }