Exemple #1
0
        /* ----------------------- Serialization ------------------------ */
        /* Saving and Loading data (Serialize and Deserialize) */

        // Load (special constructor) :
        public Preset(SerializationInfo info, StreamingContext ctxt)
        {
            mMonitorNum     = (int)info.GetValue("monitorNum", typeof(int));
            mSizeType       = (int)info.GetValue("sizeType", typeof(int));
            mLocation_x     = (int)info.GetValue("loc_x", typeof(int));
            mLocation_y     = (int)info.GetValue("loc_y", typeof(int));
            mSize           = (int)info.GetValue("size", typeof(int));
            mClockType      = (int)info.GetValue("clockType", typeof(int));
            mName           = (string)info.GetValue("name", typeof(string));
            mAnalogLayout   = (AnalogLayout)info.GetValue("analog", typeof(AnalogLayout));
            mDigitalColours = (ColourScheme)info.GetValue("colourScheme", typeof(ColourScheme));
            mDisplaySeconds = (bool)info.GetValue("displaySeconds", typeof(bool));
        }
Exemple #2
0
        public Preset()
        {
            mMonitorNum = 1;
            mSizeType   = (int)SIZETYPE.CUSTOMSIZE;
            mLocation_x = 0;
            mLocation_y = 0;
            mSize       = 300;
            mClockType  = (int)CLOCKTYPE.E24hour;
            mName       = "Undefined - Default";

            mAnalogLayout   = new AnalogLayout(new AnalogClock.AnalogClock());
            mDigitalColours = new ColourScheme();

            mDisplaySeconds = false;
        }
Exemple #3
0
        /* ------------------------ Constructor ------------------------ */
        public Preset(int monitorNum, int sizeType, int loc_x, int loc_y, int size, int clockType, string name, AnalogLayout layout, ColourScheme digitalColours, bool displaySeconds)
        {
            mMonitorNum = monitorNum;

            mSizeType   = sizeType;
            mLocation_x = loc_x;
            mLocation_y = loc_y;
            mSize       = size;

            mClockType = clockType;

            mName = name;

            mAnalogLayout = layout;

            mDigitalColours = digitalColours;

            mDisplaySeconds = displaySeconds;
        }
Exemple #4
0
        public void addPreset(int monitorNum, int sizeType, int loc_x, int loc_y, int size, int clockType, string name, AnalogLayout layout, ColourScheme digitalColour, bool displaySeconds)
        {
            Preset preset = new Preset(monitorNum, sizeType, loc_x, loc_y, size, clockType, name, layout, digitalColour, displaySeconds);

            pList.Add(preset);
        }