示例#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)
            { }
        }
示例#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)
            { }
        }