private void SetVisible(string str)
 {
     if (this.InvokeRequired)
     {
         MessageShow d = new MessageShow(SetVisible);
         this.Invoke(d, new object[] { str });
     }
     else
     {
         this.Visible = true;
         base.Text = str;
     }
 }
        //TODO
        // private OutlookConnection OutlookConnection { get; set; }

        #endregion

        #region Ctor

        public SettingsDialogUC(RSSFeedsContainer feedsGroup, AppSettings settings, bool gotoRSSPanel = false)
        {
            InitializeComponent();

            FeedsContainer             = feedsGroup;
            Settings                   = settings;
            pnlGeneralSettings.Visible = true;
            pnlGeneralSettings.Dock    = DockStyle.Fill;

            pnlRSSSettings.Visible = false;
            pnlRSSSettings.Dock    = DockStyle.Fill;

            pnlRSScategories.Visible = false;
            pnlRSScategories.Dock    = DockStyle.Fill;

            pnlOutlook.Visible = false;
            pnlOutlook.Dock    = DockStyle.Fill;


            cbCodepages.DisplayMember = Util.GetPropertyName((EncodingsCodes.DisplayItem <int> list) => list.FullName);
            cbCodepages.ValueMember   = Util.GetPropertyName((EncodingsCodes.DisplayItem <int> list) => list.Value);
            cbCodepages.DataSource    = EncodingsCodes.EncodingsCodeList;
            LoadSettings();
            LoadFeeds();
            LoadFeedsForCategories();

            if (gotoRSSPanel)
            {
                lvItems.Items[1].Selected = true;
            }

            #region Events subscribing
            btnSaveSettings.Click += (sener, e) =>
            {
                try
                {
                    SaveSettings(true);
                    MessageShow.ShowMessage(this, "The settings were saved successfully.",
                                            "Operation completed successfully",
                                            MessageBoxButtons.OK,
                                            MessageBoxIcon.Information);
                    Hide();
                }
                catch (System.Exception ex)
                {
                    MessageShow.ShowException(this, ex);
                }
            };

            cbCodepages.Click          += (sender, e) => rbcodepage.Checked = true;
            btnUnselectAll.Click       += (sender, e) => SelectDeselectAllFeeds(false);
            btnSelectAll.Click         += (sender, e) => SelectDeselectAllFeeds(true);
            btnClearAllHistories.Click += (sender, e) =>
            {
                DialogResult result = MessageShow.ShowMessage(this,
                                                              "Are you sure you want to clear all the feeds cached posts?",
                                                              "Erasing confirmation",
                                                              MessageBoxButtons.YesNo,
                                                              MessageBoxIcon.
                                                              Exclamation);
                if (result == DialogResult.Yes)
                {
                    ClearHistories();
                }
            };

            #endregion
        }
Example #3
0
        public ActionResult DeleteMethod(string idArray)
        {
            MessageShow msg = bll.DeleteMethod(idArray);

            return(Json(new { success = msg.success, message = msg.message }, JsonRequestBehavior.AllowGet));
        }
        public MainFormOutlook(AppSettings settings)
        {
            InitializeComponent();

            this.TransparencyKey    = transparentColor;
            BlurBehindWindowEnabled = false;
            blurRegion = null;
            errorLIst  = new ErrorsForm();
            logLIst    = new LogsForm();
            dgvUnreadMails.DataSource = new List <MyOutlookItem>(0);

            Settings      = settings;
            OutlookCount  = 0;
            ShowInTaskbar = Settings.AppGUISettings.ShowTaskbarIcon;
            OutlooktimeToRefreshSecondsCountdown = OutlookTimeRefreshSeconds = Settings.AppOutlookSettings.IntervalMinutes * 60;

            if (OutlookTimeRefreshSeconds < 120)
            {
                OutlooktimeToRefreshSecondsCountdown = OutlookTimeRefreshSeconds = 120;
            }

            try
            {
                //OutlookConnection = new OutlookConnection();
            }
            catch (System.Exception ex)
            {
                MessageShow.ShowException(this, ex, true);
            }

            #region Events Subscribings

            #region MenuItems Subscribings

            tsmiVersion.Click           += (sender, args) => new VersionHistoryDialog().ShowDialog();
            tsmiAbout.Click             += (sender, args) => new AboutBoxDesktopAggregator().ShowDialog();
            tsmiStatistics.Click        += (sender, e) => new NetworkStatistics().Show();
            tsmiErrorsList.Click        += (sender, args) => errorLIst.ShowDialog();
            tsmiViewLogOperations.Click += (sender, args) => logLIst.Show();
            tsmiRefresh.Click           += (sender, args) => OutlooktimeToRefreshSecondsCountdown = 0;


            tsmiClose.Click += (sender, args) =>
            {
                cancelExit = false;
                Close();
            };
            tsmiClose2.Click += (sender, args) =>
            {
                cancelExit = false;
                Close();
            };
            tsmiApplicationSettings.Click += (sender, args) =>
            {
                //var settingdlg = new SettingsDialog(FeedsGroup.FirstOrDefault(), Settings);
                //settingdlg.OnSettingsSaved += (s, a) => LoadSettings();
                //settingdlg.ShowDialog();
            };
            #endregion

            btnRefreshMail.Click += (sender, e) => OutlooktimeToRefreshSecondsCountdown = 0;

            notifyIconStatus.Click += (sender, args) =>
            {
                Visible = !Visible;
                if (Visible)
                {
                    Activate();
                }
            };

            notifyIconStatus.BalloonTipClicked += (sender, args) => { Visible = true; Activate(); };

            MessageShow.OnExceptionLogin += (sender, e) => errorLIst.AddError(e.Message);
            OnLogOperation += (sender, args) => logLIst.AddOperation(args.Message + "\n");

            #endregion
        }
Example #5
0
        public ActionResult EditSaveMethod(RoleInfo data)
        {
            MessageShow msg = bll.EditSaveMethod(data);

            return(Json(new { success = msg.success, message = msg.message }, JsonRequestBehavior.AllowGet));
        }
Example #6
0
        public decimal GenerateTotal(MentionDiscount mentionDiscount, DiscountTotal calculateDiscount, MessageShow tellUserWeAreDiscounting)
        {
            decimal subTotal = Items.Sum(x => x.Price);

            mentionDiscount(subTotal);
            tellUserWeAreDiscounting("We are applying discount");
            return(calculateDiscount(Items, subTotal));
        }
Example #7
0
        public ActionResult EditSaveMethod(PlantStockBin editSaveInfo)
        {
            MessageShow msg = bll.EditSaveMethod(editSaveInfo);

            return(Json(new { success = msg.success, message = msg.message }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult EditSaveMethod(Rfid_tag theRfid_tag)
        {
            MessageShow msg = bll.EditSaveMethod(theRfid_tag);

            return(Json(new { success = msg.success, message = msg.message }, JsonRequestBehavior.AllowGet));
        }