Ejemplo n.º 1
0
        private void init()
        {
            Log.Debug();
            InitializeComponent();

            _filterByProcess = null;

            CreateTaskTable();

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            this.Load        += new EventHandler(TaskSwitcherForm_Load);
            this.FormClosing += new FormClosingEventHandler(TaskSwitcherForm_FormClosing);

            _dialogCommon.GetAnimationManager().EvtResolveWidgetChildren +=
                new AnimationManager.ResolveWidgetChildren(TaskSwitcherForm_EvtResolveWidgetChildren);

            Title.FlatAppearance.BorderSize = 0;

            Log.Debug("returning");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);

            Cancel = false;

            return(_dialogCommon.Initialize(startupArg));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);

            Add                = false;
            Delete             = false;
            OutputAbbreviation = new Abbreviation(String.Empty, String.Empty, Abbreviation.AbbreviationMode.Speak);
            Cancel             = false;

            return(_dialogCommon.Initialize(startupArg));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);
            bool retVal = _dialogCommon.Initialize(startupArg);

            if (retVal)
            {
                initWidgetSettings(Common.AppPreferences);
            }

            return(retVal);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize(startupArg))
            {
                return(false);
            }

            populateUI();

            return(true);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize(startupArg))
            {
                return(false);
            }

            initWidgetSettings(Common.AppPreferences);

            return(true);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes the form
        /// </summary>
        /// <returns>true on success</returns>
        public bool Init()
        {
            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            Load        += Form_Load;
            FormClosing += Form_Closing;

            return(true);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public WindowMoveResizeScannerForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);
            Title.Hide();

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            Load        += ResizeScannerScreen_Load;
            FormClosing += ResizeScannerScreen_FormClosing;
        }
        public AlternatePronunciationDataForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                MessageBox.Show("Initialization error");
            }

            this.KeyPreview = true;
            listViewAP.KeyPress += new KeyPressEventHandler(listViewAP_KeyPress);
            this.Load += new EventHandler(AlternatePronunciationDataForm_Load);
            this.FormClosing += new FormClosingEventHandler(AlternatePronunciationDataForm_FormClosing);
        }
Ejemplo n.º 10
0
        public AlternatePronunciationDataForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                MessageBox.Show("Initialization error");
            }

            this.KeyPreview      = true;
            listViewAP.KeyPress += new KeyPressEventHandler(listViewAP_KeyPress);
            this.Load           += new EventHandler(AlternatePronunciationDataForm_Load);
            this.FormClosing    += new FormClosingEventHandler(AlternatePronunciationDataForm_FormClosing);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public WordPredictionSettingsForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            initWidgetSettings(Common.AppPreferences);

            Load        += ScannerSettingsForm_Load;
            FormClosing += ScannerSettingsForm_FormClosing;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Intitializes the class
        /// </summary>
        /// <param name="startupArg">startup param</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _dialogCommon = new DialogCommon(this);

            _initialWindowPosition = Context.AppWindowPosition;

            _dialogCommon.AutoDockScanner = false;

            if (!_dialogCommon.Initialize(startupArg))
            {
                return(false);
            }

            subscribeToButtonEvents();

            return(true);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Initializes the class
        /// </summary>
        private void init()
        {
            _dialogCommon = new DialogCommon(this);

            Add                = false;
            Delete             = false;
            OutputAbbreviation = new Abbreviation(String.Empty, String.Empty, Abbreviation.AbbreviationMode.Speak);
            Cancel             = false;

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            Load        += AbbreviationsEditorForm_Load;
            FormClosing += AbbreviationsEditorForm_FormClosing;
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public AboutBoxForm(string titleText)
        {
            InitializeComponent();

            _attributions = new List <string>();

            _invoker = new ExtensionInvoker(this);

            _dialogCommon = new DialogCommon(this);
            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            Load        += Form_Load;
            FormClosing += Form_Closing;
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Initializes an instance of hte class
        /// </summary>
        public ACATGettingStartedForm()
        {
            InitializeComponent();

            textBoxEntry.TextChanged += TextBoxEntryOnTextChanged;
            _dialogCommon             = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                return;
            }

            setNextWord();

            Load        += AsterLaunchpad_Load;
            FormClosing += AsterLaunchpad_FormClosing;
        }
        void init(String originalTerm, String replacementTerm)
        {
            _dialogCommon = new DialogCommon(this);

            // _windowActiveWatchdog = new WindowActiveWatchdog(this);

            _originalTerm    = originalTerm;
            _replacementTerm = replacementTerm;
            _hasTerm         = false;

            if (!_dialogCommon.Initialize())
            {
                MessageBox.Show("Initialization error");
            }

            this.Load        += new EventHandler(AsterScreenTemplateForm_Load);
            this.FormClosing += new FormClosingEventHandler(AsterScreenTemplateForm_FormClosing);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public MuteScreenSettingsForm()
        {
            InitializeComponent();

            _windowActiveWatchdog = new WindowActiveWatchdog(this);

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            initWidgetSettings();

            Load        += MuteScreenSettingsForm_Load;
            FormClosing += MuteScreenSettingsForm_FormClosing;
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Initializes an instance of hte class
        /// </summary>
        public ACATTryoutForm()
        {
            InitializeComponent();

            updateToolbar();

            textBoxEntry.TextChanged += TextBoxEntryOnTextChanged;
            _dialogCommon             = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                return;
            }

            setNextWord();

            Load        += ACATTryoutForm_Load;
            FormClosing += ACATTryoutForm_FormClosing;
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public TimedDialogForm()
        {
            InitializeComponent();

            _invoker = new ExtensionInvoker(this);

            _dialogCommon = new DialogCommon(this);
            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            ShowButton  = true;
            Text        = _titleText;
            MessageText = _message;

            Load        += Form_Load;
            FormClosing += Form_Closing;
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public ResizeScannerForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);

            _initialWindowPosition = Context.AppWindowPosition;

            _dialogCommon.AutoDockScanner = false;

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            Load        += ResizeScannerScreen_Load;
            FormClosing += ResizeScannerScreen_FormClosing;

            subscribeToButtonEvents();
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public ResizeScannerForm()
        {
            InitializeComponent();

            _dialogCommon = new DialogCommon(this);

            _initialWindowPosition = Context.AppWindowPosition;

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            FormBorderStyle = FormBorderStyle.None;

            Load              += ResizeScannerScreen_Load;
            FormClosing       += ResizeScannerScreen_FormClosing;
            BorderPanel.Paint += BorderPanel_Paint;

            subscribeToButtonEvents();
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public TextToSpeechSettingsForm()
        {
            InitializeComponent();

            saveInitalValues();

            _dialogCommon = new DialogCommon(this);

            if (!_dialogCommon.Initialize())
            {
                Log.Debug("Initialization error");
            }

            populateUI();

            tbPitch.TextChanged  += tbPitch_TextChanged;
            tbRate.TextChanged   += tbRate_TextChanged;
            tbVolume.TextChanged += tbVolume_TextChanged;
            Load        += TextToSpeechSettingsForm_Load;
            FormClosing += TextToSpeechSettingsForm_FormClosing;
        }
Ejemplo n.º 23
0
        private string generate_page(WPost post)
        {
            StringBuilder dialog_page = DialogCommon.GetDialogTemplate();

            dialog_page.Replace("{DialogTitle}", Language.Lang.deletefiles);

            StringBuilder deletefile_page = new StringBuilder(TemplateProvider.DeletePostFilePage);

            //Bad password notice
            deletefile_page.Replace("{notice:badpassword}", Request["bp"] == "1" ? string.Format("<span class=\"notice\">{0}</span>", Language.Lang.badpassword) : "");

            //No file selected notice
            deletefile_page.Replace("{notice:nofileselected}", Request["ns"] == "1" ? string.Format("<span class=\"notice\">{0}</span>", Language.Lang.nofileselected) : "");

            //Captcha HTML container and notice

            deletefile_page.Replace("{captcha}", DialogCommon.GetCaptcha_ForDialogs())
            .Replace("{notice:wrongcaptcha}", Request["wc"] == "1" ? string.Format("<span class=\"notice\">{0}</span>", Language.Lang.wrongcaptcha) : "");

            deletefile_page.Replace("{ID}", post.PostID.ToString())
            .Replace("{lang:password}", Language.Lang.password)
            .Replace("{lang:deletefile}", Language.Lang.deletefiles);

            //Files elements

            StringBuilder files = new StringBuilder();

            foreach (WPostFile file in post.Files)
            {
                files.AppendFormat("<il><input id='{0}' type='checkbox' name='file{0}' value='file' /><label for='{0}'><img class='icon' src='{1}'/><span>{2}</span></label></il><br/>", file.Hash, file.ImageThumbnailWebPath, file.RealName);
            }

            deletefile_page.Replace("{Files}", files.ToString());

            dialog_page.Replace("{DialogBody}", deletefile_page.ToString());
            return(dialog_page.ToString());
        }
Ejemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //ReportReason[] data = ReportHelper.ReportReasons;

            //for (int i = 0; i < data.Length; i++)
            //{
            //    this.Response.Write(string.Format(" * Report id :{0} <br/> * Report Description: '{1}' <br/> * Report Severity {2}  <br/> <b>-----------</b> <br/>", i, data[i].Description, data[i].Severity.ToString()));
            //}
            ReportReason[] report_reasons = ReportHelper.ReportReasons;

            bool do_action = !(string.IsNullOrEmpty(this.Request["id"]) || string.IsNullOrEmpty(this.Request["rr"]));

            if (do_action)
            {
                int post_id = -1;

                Int32.TryParse(this.Request["id"], out post_id);

                int report_reason = -1;

                Int32.TryParse(this.Request["rr"], out report_reason);


                if (post_id > 0)
                {
                    if (report_reason >= 0 & (report_reason <= report_reasons.Length - 1))
                    {
                        using (DbConnection con = Database.DatabaseEngine.GetDBConnection())
                        {
                            con.Open();

                            try
                            {
                                if (BoardCommon.IPAlreadyReportedPost(post_id, this.Request.UserHostAddress, con))
                                {
                                    this.Response.Write("Your IP already reported this post");
                                }
                                else
                                {
                                    BoardCommon.InsertReport(report_reason, report_reasons[report_reason], this.Request.UserHostAddress, post_id, con);
                                    this.Response.Write("Report successful");
                                }
                            }
                            catch (Exception)
                            {
                                //  this.Response.Write("Unable to report post");
                                throw;
                            }
                        }
                    }
                    else
                    {
                        this.Response.Write("Invalid report reason");
                        this.Response.End();
                    }
                }
                else
                {
                    this.Response.Write("Invalid ID specified");
                    this.Response.End();
                }
            }
            else
            {
                //show page
                StringBuilder dialog_page = DialogCommon.GetDialogTemplate();

                dialog_page.Replace("{DialogTitle}", Language.Lang.report);

                //--------------

                StringBuilder report_page = new StringBuilder(TemplateProvider.ReportPage);

                report_page.Replace("{lang:report}", Language.Lang.report)
                .Replace("{lang:reportreason}", Language.Lang.reportreason)
                .Replace("{ID}", Convert.ToString(this.Request["id"]))
                .Replace("{notice:wrongcaptcha}", Request["wc"] == "1" ? string.Format("<span class=\"notice\">{0}</span>", Language.Lang.wrongcaptcha) : "")
                .Replace("{captcha}", DialogCommon.GetCaptcha_ForDialogs());

                StringBuilder reasons = new StringBuilder();

                for (int i = 0; i < report_reasons.Length; i++)
                {
                    reasons.AppendFormat("<option value=\"{0}\">{1}</option>", i, report_reasons[i].Description);
                }

                report_page.Replace("{ReportReasons}", reasons.ToString());

                //--------------

                dialog_page.Replace("{DialogBody}", report_page.ToString());


                this.Response.Write(dialog_page.ToString());
            }
        }