예제 #1
0
 private void ResumeSession_Click(object sender, RoutedEventArgs e)
 {
     ResetSession();
     if (!_currentSession.ResumeSession())
     {
         return;
     }
     StateMove(Session.SessionStartingStage.Notes, true);
     _currentSession.UpdateNotes("Note", "Resuming Session...");
     NoteContent.Focus();
 }
예제 #2
0
        RTFNote rtf            = new RTFNote();     // The enhanced note window

        /** Starting Process **/
        /**********************/
        /// The application starts by asking for tester and charter information. Only then the session starts

        // Default constructor, everything is empty/default values
        public SMWidget()
        {
            Logger.record("[SMWidget]: App constructor. Initializing.", "SMWidget", "info");
            InitializeComponent();
            rtf.InitializeComponent();
            rtf.sm = this;
            NoteContent.Focus();

            parseCLI();
            handleCLI();
            Logger.record("[SMWidget]: App constructor initialized and CLI executed.", "SMWidget", "info");
        }
예제 #3
0
        // Prepare the session report log (adds the notes types, for example)
        private void SMWidgetForm_Loaded(object sender, RoutedEventArgs e)
        {
            Logger.Record("[SMWidgetForm_Loaded]: Form loading to windows", "SMWidget", "info");

            SMWidgetForm.Title = Application.ProductName;
            SetWorkingDir(_currentSession.WorkingDir);
            StateMove(Session.SessionStartingStage.Tester);

            // Some of the actions in the tool are recurrent. We do them every 30 seconds.
            _recurrenceTimer.Tick    += TimerEventProcessor; // this is the function called everytime the timer expires
            _recurrenceTimer.Interval = 90 * 1000;           // 30 times 1 second (1000 milliseconds)
            _recurrenceTimer.Start();

            NoteContent.Focus();
        }
예제 #4
0
        private void CloseAndStartSession()
        {
            // Session
            Logger.Record("[SaveAndNewOption_Click]: Closing Session...", "SMWidget", "info");
            _currentSession.CloseSession();
            // PT Note
            Logger.Record("[SaveAndNewOption_Click]: Closing PlainText Note (force = true)...", "SMWidget", "info");
            _ptn.ForceClose = true; // We keep the RTF open (hidden), so we have to force it out
            Logger.Record("[SaveAndNewOption_Click]: Closing PlainText Note...", "SMWidget", "info");
            _ptn.Close();

            Logger.Record("[SaveAndNewOption_Click]: Resetting session variables", "SMWidget", "info");
            ResetSession();
            Logger.Record("[SaveAndNewOption_Click]: Restarting session", "SMWidget", "info");
            StateMove(Session.SessionStartingStage.Tester);
            NoteContent.Focus();
        }
예제 #5
0
        readonly PlainTextNote _ptn = new PlainTextNote(); // The enhanced note window

        /** Starting Process **/
        /**********************/
        /// The application starts by asking for tester and charter information. Only then the session starts

        // Default constructor, everything is empty/default values
        public SmWidget()
        {
            RegUtil.InitReg();
            var trans = GetTransparencyFromReg();

            Logger.Record("[SMWidget]: App constructor. Initializing.", "SMWidget", "info");
            InitializeComponent();
            SetBgColor(GetBgColorFromReg());
            TransparencySlide.Value = trans;
            _ptn.InitializeComponent();
            _ptn.Sm = this;
            TextCompositionManager.AddPreviewTextInputHandler(NoteContent, OnPreviewTextInput);
            TextCompositionManager.AddPreviewTextInputUpdateHandler(NoteContent, OnPreviewTextInputUpdate);
            Task.Run((Action)Updater.CheckVersion);
            NoteContent.Focus();
            Logger.Record("[SMWidget]: App constructor initialized and CLI executed.", "SMWidget", "info");
        }
예제 #6
0
        RTFNote rtf            = new RTFNote();     // The enhanced note window

        /** Starting Process **/
        /**********************/
        /// The application starts by asking for tester and charter information. Only then the session starts

        // Default constructor, everything is empty/default values
        public SMWidget()
        {
            /*MessageBoxResult result = System.Windows.MessageBox.Show("Do you want to login to Flickr?", "Flickr Login", MessageBoxButton.YesNo);
             * if (result == MessageBoxResult.Yes)
             * {
             *
             *  m_flickr.Login();
             *  m_flickrLoggedIn = true;  BAJSKORV!!!!!!!!!!!!!!!!!
             * }
             * else
             * {
             *  m_flickrLoggedIn = false;
             * }*/

            Logger.record("[SMWidget]: App constructor. Initializing.", "SMWidget", "info");
            InitializeComponent();
            rtf.InitializeComponent();
            rtf.sm = this;
            NoteContent.Focus();

            parseCLI();
            handleCLI();
            Logger.record("[SMWidget]: App constructor initialized and CLI executed.", "SMWidget", "info");
        }