Ejemplo n.º 1
0
        public PresenterMain()
        {
            MaterialForm = new CFormMain();
            View = (CFormMain)MaterialForm;
            FormControl = View.FormControl;
            // Initialize MaterialSkinManager
            MaterialSkinManager = MaterialSkinManager.Instance;
            MaterialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed += view_Closed;

            try
            {
                PresenterManage pManage = new PresenterManage();
                pManage.MaterialSkinManager = MaterialSkinManager;
                pManage.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pManage.MaterialForm, true);
                pManage.ViewClosed += OnTabClosed;
            }catch(Exception)
            { }

            try
            {
                PresenterChat pChat = new PresenterChat();
                pChat.MaterialSkinManager = MaterialSkinManager;
                pChat.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pChat.MaterialForm, false);
                pChat.ViewClosed += OnTabClosed;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            try
            {
                PresenterLinie pLinie = new PresenterLinie();
                pLinie.FormText = "Linie";
                pLinie.MaterialSkinManager = MaterialSkinManager;
                pLinie.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pLinie.MaterialForm, false);
                pLinie.ViewClosed += OnTabClosed;
                pLinie.DisplayWariant += pLinie_DisplayWariant;
            }
            catch (Exception)
            { }
        }
Ejemplo n.º 2
0
        public PresenterMain()
        {
            MaterialForm = new CFormMain();
            View         = (CFormMain)MaterialForm;
            FormControl  = View.FormControl;
            // Initialize MaterialSkinManager
            MaterialSkinManager       = MaterialSkinManager.Instance;
            MaterialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed      += view_Closed;

            try
            {
                PresenterManage pManage = new PresenterManage();
                pManage.MaterialSkinManager = MaterialSkinManager;
                pManage.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pManage.MaterialForm, true);
                pManage.ViewClosed += OnTabClosed;
            }catch (Exception)
            { }

            try
            {
                PresenterChat pChat = new PresenterChat();
                pChat.MaterialSkinManager = MaterialSkinManager;
                pChat.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pChat.MaterialForm, false);
                pChat.ViewClosed += OnTabClosed;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            try
            {
                PresenterLinie pLinie = new PresenterLinie();
                pLinie.FormText            = "Linie";
                pLinie.MaterialSkinManager = MaterialSkinManager;
                pLinie.MaterialForm.Parent = View.FormControl;
                View.AddMaterialPanelTab(pLinie.MaterialForm, false);
                pLinie.ViewClosed     += OnTabClosed;
                pLinie.DisplayWariant += pLinie_DisplayWariant;
            }
            catch (Exception)
            { }
        }
Ejemplo n.º 3
0
        public PresenterMain()
        {
            MaterialForm = new CFormMain();
            View = (CFormMain)MaterialForm;
            FormControl = View.FormControl;
            // Initialize MaterialSkinManager
            MaterialSkinManager = MaterialSkinManager.Instance;
            MaterialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed += view_Closed;

            try
            {
                PresenterConnectToServer pConnectToServer = new PresenterConnectToServer(true);
                pConnectToServer.MaterialSkinManager = MaterialSkinManager;
                pConnectToServer.MaterialForm.Parent = View.FormControl;
                pConnectToServer.ConnectedSuccessfully += LoggedToServer;
                View.AddMaterialPanelTab(pConnectToServer.MaterialForm, false);
                pConnectToServer.ViewClosed += OnTabClosed;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 4
0
 void pLinie_DisplayWariant(object sender, EventArgs e)
 {
     try
     {
         Query.Linie      linia    = ((PresenterLinie)sender).Linia;
         PresenterWariant pWariant = new PresenterWariant(linia);
         pWariant.FormText            = "Linia " + linia.Nazwa.Trim();
         pWariant.MaterialSkinManager = MaterialSkinManager;
         pWariant.MaterialForm.Parent = View.FormControl;
         View.AddMaterialPanelTab(pWariant.MaterialForm, false);
         pWariant.ViewClosed        += OnTabClosed;
         pWariant.DisplayPrzystanek += pWariant_DisplayPrzystanek;
     }
     catch (Exception)
     { }
 }
Ejemplo n.º 5
0
 private void OpenChat()
 {
     try
     {
         PresenterChat pChat = new PresenterChat();
         pChat.MaterialSkinManager = MaterialSkinManager;
         pChat.MaterialForm.Parent = View.FormControl;
         pChat.ShowQueryResult    += pChat_ShowQueryResult;
         View.AddMaterialPanelTab(pChat.MaterialForm, false);
         pChat.ViewClosed += OnTabClosed;
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Ejemplo n.º 6
0
        public PresenterMain()
        {
            MaterialForm = new CFormMain();
            View         = (CFormMain)MaterialForm;
            FormControl  = View.FormControl;
            // Initialize MaterialSkinManager
            MaterialSkinManager       = MaterialSkinManager.Instance;
            MaterialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            View.PropertyChanged += view_PropertyChanged;
            View.ViewClosed      += view_Closed;

            try
            {
                PresenterConnectToServer pConnectToServer = new PresenterConnectToServer(true);
                pConnectToServer.MaterialSkinManager    = MaterialSkinManager;
                pConnectToServer.MaterialForm.Parent    = View.FormControl;
                pConnectToServer.ConnectedSuccessfully += LoggedToServer;
                View.AddMaterialPanelTab(pConnectToServer.MaterialForm, false);
                pConnectToServer.ViewClosed += OnTabClosed;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }