Ejemplo n.º 1
0
        private void addMilestone_Recognition(object sender, Microsoft.Ink.InkEditRecognitionEventArgs e)
        {
            string title = e.RecognitionResult.ToString();

            AddMilestoneDialog dlg = new AddMilestoneDialog(CurrentProject, title);

            if (DialogResult.OK == dlg.ShowDialog(this))
            {
                HourglassDialog dialog = new HourglassDialog();
                dialog.Message = "Creating milestone...";
                dialog.Show();
                Application.DoEvents();

                using (dialog)
                {
                    CurrentProject.CreateMilestone(title, dlg.Deadline, dlg.Responsible,
                    dlg.Notify);
                }

                RefreshMilestones();
            }

            ClearInput();
        }
Ejemplo n.º 2
0
        private void ok_Click(object sender, EventArgs e)
        {
            HourglassDialog dialog = new HourglassDialog();
            dialog.Message = "Posting message...";
            dialog.Show();
            Application.DoEvents();

            using (dialog)
            {
                if (inkPicture1.Visible)
                {
                    byte[] gif = inkPicture1.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif);
                    filename = "picture.jpg";
                    Image bitmap = Image.FromStream(new MemoryStream(gif));
                    bitmap.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg);
                    inkPicture1.Dispose();
                }
            }

            DialogResult = DialogResult.OK;
        }
Ejemplo n.º 3
0
        public Hourglass(string message)
        {
            try
            {
                if (message != null)
                {
                    dlg = new HourglassDialog(message);
                    dlg.Show();
                    Application.DoEvents();
                }
                else if (Form.ActiveForm != null)
                    Form.ActiveForm.Cursor = Cursors.WaitCursor;

            }

            catch
            {
            }
        }