Ejemplo n.º 1
0
        public MainWindow()
        {
            //init UI
            InitializeComponent();

            //init delegates
            DelWriteLog = writeInLog_RichTextBox;
            DelAskNewAccount = askNewAccount;
            DelSetRecoverInfos = setRecoverInfos;
            DelSetInterfaceLoggedMode = SetInterfaceLoggedMode;
            //DelYesNoQuestion = AskYesNoQuestion;
            DelShowOkMsg = ShowOkMsg;
            DelSetProgressValues = SetProgressValues;

            //init accessory classes
            MyLogger.init(this);

            //load last settings from file
            LoadSettings();

            this.CycleNowEvent = new EventWaitHandle(false, EventResetMode.ManualReset);
            //this.CheckForAbortEvent = new EventWaitHandle(false, EventResetMode.ManualReset);

            SyncTimer = new System.Windows.Threading.DispatcherTimer();
            SyncTimer.Tick += new EventHandler(SyncTimerHandler);
            AbortTimer = new System.Windows.Threading.DispatcherTimer();
            AbortTimer.Tick += new EventHandler(AbortTimerHandler);
            AbortTimer.Interval = checkForAbortTimeSpan;

            ApplySettings();

            //imposta modalità interfaccia a not logged
            interfaceMode = interfaceMode_t.notLogged;

            //let's start
            MyLogger.debug("si comincia\n");
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            //init UI
            InitializeComponent();

            //init delegates
            DelWriteLog               = writeInLog_RichTextBox;
            DelAskNewAccount          = askNewAccount;
            DelSetRecoverInfos        = setRecoverInfos;
            DelSetInterfaceLoggedMode = SetInterfaceLoggedMode;
            //DelYesNoQuestion = AskYesNoQuestion;
            DelShowOkMsg         = ShowOkMsg;
            DelSetProgressValues = SetProgressValues;

            //init accessory classes
            MyLogger.init(this);

            //load last settings from file
            LoadSettings();

            this.CycleNowEvent = new EventWaitHandle(false, EventResetMode.ManualReset);
            //this.CheckForAbortEvent = new EventWaitHandle(false, EventResetMode.ManualReset);

            SyncTimer           = new System.Windows.Threading.DispatcherTimer();
            SyncTimer.Tick     += new EventHandler(SyncTimerHandler);
            AbortTimer          = new System.Windows.Threading.DispatcherTimer();
            AbortTimer.Tick    += new EventHandler(AbortTimerHandler);
            AbortTimer.Interval = checkForAbortTimeSpan;

            ApplySettings();

            //imposta modalità interfaccia a not logged
            interfaceMode = interfaceMode_t.notLogged;

            //let's start
            MyLogger.debug("si comincia\n");
        }