Ejemplo n.º 1
0
        private void ParceAndPaint(string value)
        {
            DesignTypes designType = Utils.ParseEnum(value);

            actSettings.currentDesign = designType;

            MyPaint(DesignFactory.Create(designType));
        }
Ejemplo n.º 2
0
        private void LoadMyINI(string path)
        {
            INIManager manager = new INIManager(path);

            workDuration  = int.Parse(manager.GetPrivateString("durations", "workDuration"));
            breakDuration = int.Parse(manager.GetPrivateString("durations", "breakDuration"));

            showMessage     = bool.Parse(manager.GetPrivateString("break_settings", "showMessage"));
            playSound       = bool.Parse(manager.GetPrivateString("break_settings", "playSound"));
            disableMouse    = bool.Parse(manager.GetPrivateString("break_settings", "disableMouse"));
            disableKeyboard = bool.Parse(manager.GetPrivateString("break_settings", "disableKeyboard"));

            trackActive    = bool.Parse(manager.GetPrivateString("operation_mode", "trackActive"));
            trackBlackList = bool.Parse(manager.GetPrivateString("operation_mode", "trackBlackList"));

            currentDesign = Utils.ParseEnum(manager.GetPrivateString("design", "type"));
        }
Ejemplo n.º 3
0
        public static Design Create(DesignTypes type)
        {
            switch (type)
            {
            case DesignTypes.DESIGN1:
                return(new Design1());

            case DesignTypes.DESIGN2:
                return(new Design2());

            case DesignTypes.DESIGN3:
                return(new Design3());

            default:
                return(new Design1());
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// "Reset" the DataModel for a new design
        /// </summary>
        public static void Reinitialize(FContext context, DesignTypes type)
        {
            DesignType = type;
            Context    = context;

            if (Model != null)
            {
                Model.OnDataModelModified -= OnDataModelModified;
            }
            Model = new OGDataModel();
            Model.Reinitialize(Context);
            Model.OnDataModelModified += notifyDataModelModified;

            OGActions.InitializeSocketDataModel();

            OGActions.InitializeCancelRouter();
            OGActions.InitializeAcceptRouter();

            WorkflowInitialized = true;
            OnWorfklowInitialized?.Invoke(null, EventArgs.Empty);
        }