示例#1
0
        public MainWindow(bool IsPreview, bool IsSilence = false)
        {
            rs = new RegSettings("SteamInventoryMonitor");
            App.NOTIFICATION_DELAY_S = rs.GetValue("NOTIFICATION_DELAY_S", 5);

            InitializeComponent();

            timer          = new DispatcherTimer();
            timer.Tick    += TimerTick;
            timer.Interval = new TimeSpan(0, 0, rs.GetValue("UpdateTimerDelay", 60));

            this.IsPreview = IsPreview;
            this.IsSilence = IsSilence;

            SetupNotifyIcon();
            SetupCollections();

            if (!IsPreview)
            {
                timer.Start();
            }
            else
            {
                Title += " [Preview mode]";
            }
        }
示例#2
0
//        void FormatHtml(Expression<Func<SettingsMessagesModel, string>> o)
//        {
//            var expr = (MemberExpression)o.Body;
//            var prop = (PropertyInfo)expr.Member;
//            var s = prop.GetValue(this) as string;
//            if (!s.HasValue())
//                return;
//            prop.SetValue(this, TidyLib.FormatHtml(s));
//        }
        public void Update()
        {
            this.CopyPropertiesTo(Org, typeof(OrgAttribute));
            this.CopyPropertiesTo(RegSettings, typeof(RegAttribute));
            var os = DbUtil.Db.CreateRegistrationSettings(RegSettings.ToString(), Id);

            Org.UpdateRegSetting(os);
            DbUtil.Db.SubmitChanges();
        }
示例#3
0
        public void Update()
        {
            this.CopyPropertiesTo(Org, typeof(OrgAttribute));
            RegSettings.OrgFees.Clear();
            this.CopyPropertiesTo(RegSettings, typeof(RegAttribute));
            var os = CurrentDatabase.CreateRegistrationSettings(RegSettings.ToString(), Id);

            Org.UpdateRegSetting(os);
            CurrentDatabase.SubmitChanges();
        }
示例#4
0
        public MainWindow()
        {
            InitializeComponent();

            settings = new RegSettings("WeatherWidget");

            if (string.IsNullOrWhiteSpace(Key) && string.IsNullOrWhiteSpace(Login))
            {
                if (new Login(this).ShowDialog().Value)
                {
                    Init();
                }
            }
            else
            {
                Init();
            }
        }
        public void Update()
        {
            this.CopyPropertiesTo(Org, typeof(OrgAttribute));
            RegSettings.AgeGroups.Clear();
            if (Org.OrgPickList.HasValue() && Org.RegistrationTypeId == RegistrationTypeCode.JoinOrganization)
            {
                Org.OrgPickList = null;
            }
            this.CopyPropertiesTo(RegSettings, typeof(RegAttribute));
            var os = DbUtil.Db.CreateRegistrationSettings(RegSettings.ToString(), Id);

            if (Org.RegistrationTypeId > 0)
            {
                if (!Org.NotifyIds.HasValue())
                {
                    Org.NotifyIds = Util.UserPeopleId.ToString();
                }
            }
            Org.UpdateRegSetting(os);
            DbUtil.Db.SubmitChanges();
        }
 public Form1()
 {
     this._reg = new RegSettings("SimpleWorldSettingsEditor");
     this.InitializeComponent();
 }
 public Form1()
 {
     this._reg = new RegSettings("SimpleWorldSettingsEditor");
     this.InitializeComponent();
 }