Example #1
0
        private void open()
        {
            // Configure open file dialog box
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
            dlg.FileName   = "File";                               // Default file name
            dlg.DefaultExt = ".ltf";                               // Default file extension
            dlg.Filter     = "Lecturer Trainer File (.ltf)|*.ltf"; // Filter files by extension

            // Show open file dialog box
            Nullable <bool> result = dlg.ShowDialog();

            // Process open file dialog box results
            if (result == true)
            {
                // Open document
                ToolBarView tbv = ToolBarView.Get();
                tbv.closeSession.IsEnabled       = true;
                tbv.openChartsAnalysis.IsEnabled = true;
                tbv.createSession.IsEnabled      = false;
                tbv.openSession.IsEnabled        = false;
                tbv.RecordingSession.IsEnabled   = true;
                Session.openSession(dlg.FileName);
                SessionName            = Main.session.sessionName;
                SessionLaunchedMessage = Main.session.sessionLaunchMessage;
            }
        }
    private void Init()
    {
        m_ToolBarModel = gameObject.GetComponent <ToolBarModel>();
        m_ToolBarView  = gameObject.GetComponent <ToolBarView>();

        slotList  = new List <GameObject>();
        modelList = new Dictionary <GameObject, GameObject>();
    }
Example #3
0
        private void close()
        {
            ToolBarView tbv = ToolBarView.Get();

            tbv.closeSession.IsEnabled       = false;
            tbv.createSession.IsEnabled      = true;
            tbv.openSession.IsEnabled        = true;
            tbv.RecordingSession.IsEnabled   = false;
            tbv.openChartsAnalysis.IsEnabled = false;
            Main.session.serializeSession(Main.session.sessionPath);
            Main.session           = new Session();
            SessionName            = Main.session.sessionName;
            SessionLaunchedMessage = Main.session.sessionLaunchMessage;
        }
Example #4
0
        public ToDoListView(AbsViewController ctrl) : base(ctrl)
        {
            todoListToDoView     = new ToDoListToDoView(eventKey);
            todoListHideView     = new ToDoListHideView(eventKey);
            todoListFinishedView = new ToDoListFinishedView(eventKey);


            todoListToolBarView = new ToolBarView {
                style = "box"
            }.FontSize(15).Height(40).AddTo(this);


            AddMenu(todoListToolBarView,
                    ("进行", todoListToDoView),
                    ("隐藏", todoListHideView),
                    ("完成", todoListFinishedView));
        }
        protected override void SetUpView()
        {
            eventKey = GetHashCode();

            todoListNoteView         = new ToDoListNoteView(this);
            todoListView             = new ToDoListView(this);
            todoListCategoryListView = new ToDoListCategoryListView(this);
            todoListProductView      = new ToDoListProductView(this);

            todoListToolBarView = new ToolBarView {
                style = "box"
            }.FontSize(15).Height(40);
            AddView(todoListToolBarView);

            // todoListToolBarView
            //  .AddMenu("笔记", () => ChangePage(todoListNoteView.eventKey))
            //  .AddMenu("清单", () => ChangePage(todoListView.eventKey))
            //  .AddMenu("隐藏", () => ChangePage(todoListHideView.eventKey))
            //  .AddMenu("分类管理", () => ChangePage(todoListCategoryListView.eventKey))
            //  .AddMenu("已完成", () => ChangePage(todoListFinishedView.eventKey))
            //  .AddMenu("产品", () => ChangePage(todoListProductView.eventKey));
            // views.Add(todoListNoteView);
            // views.Add(todoListView);
            // views.Add(todoListHideView);
            // views.Add(todoListCategoryListView);
            // views.Add(todoListFinishedView);
            // views.Add(todoListProductView);

            AddMenu(todoListToolBarView,
                    ("笔记", todoListNoteView),
                    ("清单", todoListView),
                    ("分类管理", todoListCategoryListView),
                    ("产品", todoListProductView)
                    );


            todoListToolBarView.ForceClick(1);
        }
        /// <summary>
        /// Modified by Baptiste Germond
        /// </summary>
        public void LaunchOk()
        {
            try
            {
                Session.CreateSessionFolder(pathName, fileName, Main.session);
                ToolBarView tbv = ToolBarView.Get();
                //Enabling the menu item if the user is connected
                tbv.RecordingSession.IsEnabled   = true;
                tbv.closeSession.IsEnabled       = true;
                tbv.createSession.IsEnabled      = false;
                tbv.openSession.IsEnabled        = false;
                tbv.openChartsAnalysis.IsEnabled = true;
            }
            catch (CantCreateFileException e)
            {
                Main.session.eraseName();
                errorBox = new ErrorMessageBox(e.Message, e.textError);
                errorBox.Show();
            }


            this.newUserView.Close();
        }
Example #7
0
 public ToolbarPresenter(ToolBarView toolbarView, IToolbarCommand[] commands)
 {
     toolbarView.SetCommands(commands);
 }
Example #8
0
 public void AddMenu(ToolBarView bar, params (string title, ToDoListPage page)[] tilePages)