Example #1
0
        protected void OnColorSaveFired(gigaFlash.ConfigObjects.ColorConfig value)
        {
            UserPrefObj userprefobj;

            if (mPrefObj == null)
            {
                userprefobj = new UserPrefObj();
                String now = DateTime.Now.ToString();
                userprefobj.DateCreated     = now;
                userprefobj.DateLastModfied = now;
                DateTime dt = DateTime.Parse(userprefobj.DateCreated);
                userprefobj.Colors.Add(value);
            }
            else
            {
                mPrefObj.Colors.Add(value);
                userprefobj = mPrefObj;
            }

            EventUtils.FireTypedEvent(RoomSaveFired, userprefobj);
        }
Example #2
0
        protected virtual void SaveColorClicked(object sender, EventArgs e)
        {
            ColorConfig colorconfig = new ColorConfig();
            colorconfig.Red = mColor.R;
            colorconfig.Green = mColor.G;
            colorconfig.Blue = mColor.B;
            ColorSaveDialog cd = new ColorSaveDialog();
            if (cd.ShowDialog(this.ParentForm) == DialogResult.OK)
            {
                colorconfig.Name = cd.ColorName;
                colorconfig.TotalUseCount = 1;
                colorconfig.LastUseDate = DateTime.Now.ToString();
                EventUtils.FireTypedEvent(SaveFired, colorconfig);

                mCustomColors.Add(colorconfig);
                ReloadCustomColors();
            }
        }
Example #3
0
 protected virtual void HandleColorSaveFired(ColorConfig value)
 {
     EventUtils.FireTypedEvent(ColorSaveFired, value);
 }