Exemplo n.º 1
0
		private void gridEobs_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			FormEtrans835Edit Form835=new FormEtrans835Edit();
			Form835.EtransCur=_etrans;
			Form835.MessageText835=_messageText835;
			Form835.TranSetId835=_listEobTranIds[gridEobs.SelectedIndices[0]];
			Form835.Show();
		}
Exemplo n.º 2
0
        public void Display_view_model()
        {
            var vm = new ViewModel
                {
                    GameScore = 12,
                    GameFinished = true
                };

            var frames = new List<ListViewItem>();
            for (var i = 12; i > 0; i--)
            {
                var lvm = new ListViewItem(i.ToString());
                lvm.SubItems.Add(i.ToString());
                lvm.SubItems.Add((i+1).ToString());
                lvm.SubItems.Add((i + i + 1).ToString());
                frames.Add(lvm);
            }
            vm.Frames = frames;

            var sut = new UI();

            sut.Display(vm);

            sut.ShowDialog();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Adds the properties to the solidworks page
 /// </summary>
 /// <param name="page">The page to be added to</param>
 /// <param name="id">The starting Id for the controls. Will be updated to the next avalible id</param>
 /// <param name="mark">The starting mark for the selection boxes.Will be updated to the next avalible mark</param>
 public override void AddPropertiesToSWPage(UI.JointPMPage page, ref int id, ref int mark)
 {
     modelDoc.ClearSelection2(true);
     Axis1.AddAxisToPage(ref id, ref mark, page, ref AxisSelBoxID);
     if (!Axis1.UseCustomMovementLimits)
         Axis1.AddLimitsToPage(ref id, ref mark, page);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="scene"></param>
        public SoundManagerForm(UI.GUIScene scene)
        {
            InitializeComponent();

            mScene = scene;

            UpdateListView(scene.Sounds);
        }
Exemplo n.º 5
0
        public void Drop_number()
        {
            var ui = new UI();

            ui.Number_dropped += () => MessageBox.Show("Drop number!");

            ui.ShowDialog();
        }
Exemplo n.º 6
0
		private void gridMain_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {			
			//SelectedWikiPage=listWikiPages[e.Row];
			if(checkDeletedOnly.Checked) {
				return;
			}
			wikiPageTitleSelected=listWikiPageTitles[e.Row];
			DialogResult=DialogResult.OK;
		}
Exemplo n.º 7
0
        public void Receive_events()
        {
            var ui = new UI();
            ui.On_Clear += () => MessageBox.Show("clearing requested");
            ui.On_Pins += pins => MessageBox.Show(pins.ToString() + " pins submitted");

            ui.ShowDialog();
        }
Exemplo n.º 8
0
		private void gridMain_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			SelectedPatNum=listPats[e.Row].PatNum;
			//Security log for patient select.
			Patient pat=Patients.GetPat(SelectedPatNum);
			SecurityLogs.MakeLogEntry(Permissions.SheetEdit,SelectedPatNum,"In the 'Pick Patient for Web Form', this user double clicked a name in the suggested list.  "
				+"This caused the web form for this patient: "+LnameEntered+", "+FnameEntered+" "+BdateEntered.ToShortDateString()+"  "
				+"to be manually attached to this other patient: "+pat.LName+", "+pat.FName+" "+pat.Birthdate.ToShortDateString());
			DialogResult=DialogResult.OK;
		}
Exemplo n.º 9
0
		private void gridMain_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {			
			//SelectedWikiPage=listWikiPages[e.Row];
			if(checkDeletedOnly.Checked) {
				return;
			}
			wikiPageTitleSelected=listWikiPageTitles[e.Row];
			NavToPage(wikiPageTitleSelected);
			Close();
		}
Exemplo n.º 10
0
		private void gridObservations_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			EhrAptObs obs=(EhrAptObs)gridObservations.Rows[e.Row].Tag;
			FormEhrAptObsEdit formE=new FormEhrAptObsEdit(obs);
			if(formE.ShowDialog()==DialogResult.OK) {
				if(obs.EhrAptObsNum!=0) {//Was not deleted.
					EhrAptObses.Update(obs);
				}
				FillGridObservations();
			}
		}
Exemplo n.º 11
0
 public LayoutSettingsDialog(Options.LayoutSettings settings, UI.ILayout layout, IComponent tabComponent = null)
 {
     InitializeComponent();
     Settings = settings;
     Layout = layout;
     ComponentSettings = new List<XmlNode>();
     Components = new List<IComponent>();
     AddNewTab("Layout", new LayoutSettingsControl(settings, layout));
     AddComponents(tabComponent);
 }
 private void runFeedback_GoToType(object sender, UI.GoToTypeArgs e)
 {
     try
     {
         new TypeNavigation().GoToType(_application, e.Assembly, e.TypeName);
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 13
0
 public Context(
   Core.BuildingBlocks.Setup setup,
   Core.BuildingBlocks.FrameGrabber fg,
   Core.BuildingBlocks.RenderLoop rl, 
   UI.Concrete.EmbeddableStream es) 
 {
   _es = es;
   _setup = setup;
   _fg = fg;
   _rl = rl;
 }
Exemplo n.º 14
0
        public void Press_operator()
        {
            var ui = new UI();

            ui.Operator_pressed += req =>
                {
                    var opnum = (int) req.Item1[0];
                    ui.Display_result(new Tuple<IEnumerable<int>, int>(new[]{opnum}, req.Item2));
                };

            ui.ShowDialog();
        }
Exemplo n.º 15
0
        public void Enter_number_and_display_stack()
        {
            var ui = new UI();

            var list = new List<int>();
            ui.Number_entered += n =>
                {
                    list.Add(n);
                    ui.Display_result(new Tuple<IEnumerable<int>, int>(list, n*10));
                };

            ui.ShowDialog();
        }
 private void runFeedback_GoToReference(object sender, UI.GoToReferenceArgs e)
 {
     try
     {
         var window = _application.OpenFile(EnvDTE.Constants.vsViewKindCode, e.Position.File);
         window.Activate();
         var selection = (TextSelection)_application.ActiveDocument.Selection;
         selection.MoveToDisplayColumn(e.Position.LineNumber, e.Position.Column, false);
     }
     catch
     {
     }
 }
Exemplo n.º 17
0
 //------------------------------------------------------------------------------
 // Constructor
 //------------------------------------------------------------------------------
 public Program()
 {
     try
     {
         theSession = Session.GetSession();
         theUI = UI.GetUI();
         theUFSession = UFSession.GetUFSession();
         isDisposeCalled = false;
     }
     catch (NXOpen.NXException ex)
     {
         // ---- Enter your exception handling code here -----
         UI.GetUI().NXMessageBox.Show("Message", NXMessageBox.DialogType.Error, ex.Message);
     }
 }
        public void SetBtnMenu( UI.Ctrl.Btn.TopMenuBtn btn, List<XToolStripMenuItem> lstItem )
        {
            System.Windows.Forms.ContextMenuStrip menu = new ContextMenuStrip();

            foreach ( XToolStripMenuItem Item in lstItem )
            {
                menu.Items.Add( Item );
                Item.dlgtAction = DealAction;
            }

            btn.Tag = menu;  //把菜单保存起来。
            btn.Click += new System.EventHandler( ShowMenu );                                     //左键点击显示菜单
            btn.MouseDown += new System.Windows.Forms.MouseEventHandler( this.DisbleMenu );     //右键点击无效
            btn.Cursor = Cursors.Hand;
        }
Exemplo n.º 19
0
        public void checkVersion()
        {
            try
            {

            WebClient client = new WebClient();
            client.DownloadFile(VersionCheckURL, LocalFile);

            client.Dispose();

              if (File.Exists(LocalFile))
                {
                    using (FileStream file = new FileStream("version.txt", FileMode.Open, FileAccess.Read, FileShare.Read))
                    {

                        using (StreamReader reader = new StreamReader(file))
                        {
                            onlineVersion = (string)reader.ReadLine().Trim();
                            reader.Close();
                        }
                        file.Close();

                    } //EndofStream

                   localVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();

                    if (localVersion != onlineVersion)
                    {
                        MessageBox.Show("A different version has been found!\n New Version: " + onlineVersion + "\n Current Version: " + localVersion, "Updater", MessageBoxButtons.OK);
                       DownloadNewLoader();

                    }

                    else
                    {
                        MessageBox.Show("Loader lastest version is already installed.", "Updater", MessageBoxButtons.OK);
                    }
                }

                UI ui1 = new UI();
                ui1.ShowDialog();
            }

            catch (Exception)
            {
                MessageBox.Show("Connection has failed. \n Please try again later.","File Updater");
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="scene"></param>
        public TextureManagerForm(UI.GUIScene scene, bool selectMode)
        {
            mSelectMode = selectMode;

            InitializeComponent();

            mReferencesListView.Groups.Clear();
            mReferencesListView.Items.Clear();

            mScene = scene;
            mTextureList.AllowNullTexture = mSelectMode;
            if (mScene != null)
                mTextureList.Textures = mScene.Textures.ToArray();

            mRefreshButton.Enabled = false;

            mPaddingTypeComboBox.Items.Add(TextureInfo.AtlasBorder.Default);
            mPaddingTypeComboBox.Items.Add(TextureInfo.AtlasBorder.Clear);
            mPaddingTypeComboBox.Items.Add(TextureInfo.AtlasBorder.RepeatPixel);
        }
Exemplo n.º 21
0
		private void gridEmailMessages_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			if(e.Row==-1) {
				return;
			}
			EmailMessage emailMessage=(EmailMessage)gridEmailMessages.Rows[e.Row].Tag;
			if(emailMessage.SentOrReceived==EmailSentOrReceived.WebMailReceived
					|| emailMessage.SentOrReceived==EmailSentOrReceived.WebMailRecdRead
					|| emailMessage.SentOrReceived==EmailSentOrReceived.WebMailSent
					|| emailMessage.SentOrReceived==EmailSentOrReceived.WebMailSentRead) 
			{
				//web mail uses special secure messaging portal
				FormWebMailMessageEdit FormWMME=new FormWebMailMessageEdit(emailMessage.PatNum,emailMessage.EmailMessageNum);
				if(FormWMME.ShowDialog()!=DialogResult.Abort) { //will only return Abort if validation fails on load, in which case the message will remain unread
					EmailMessages.UpdateSentOrReceivedRead(emailMessage);//Mark the message read.
				}				
			}
			else {
				//When an email is read from the database for display in the inbox, the BodyText is limited to 50 characters and the RawEmailIn is blank.
				emailMessage=EmailMessages.GetOne(emailMessage.EmailMessageNum);//Refresh the email from the database to include the full BodyText and RawEmailIn.
				FormEmailMessageEdit formEME=new FormEmailMessageEdit(emailMessage);
				formEME.ShowDialog();
				emailMessage=EmailMessages.GetOne(emailMessage.EmailMessageNum);//Fetch from DB, in case changed due to decrypt.
				if(emailMessage!=null && emailMessage.SentOrReceived!=EmailSentOrReceived.ReceivedEncrypted) {//emailMessage could be null if the message was deleted in FormEmailMessageEdit().
					EmailMessages.UpdateSentOrReceivedRead(emailMessage);
				}
			}
			FillGridEmailMessages();//To show the email is read.
		}
 public override void AddChildControl(UI.Control<SharpDXRenderer, Color, Vector2, SharpDX.DirectWrite.TextFormat> control)
 {
     base.AddChildControl(control);
     control.Visible = this.SelectedIndex == this.ChildControls.IndexOf(control);
 }
Exemplo n.º 23
0
 internal static async Task DoSendMessageTasks(UI.MainForm sender)
 {
     /* Error handling code and HTTP status message checking is yet to be implemented */
     
     var response = await PostStartMessaging();
 }
Exemplo n.º 24
0
		private void gridNotes_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			FormEhrLabNoteEdit FormLNE=new FormEhrLabNoteEdit();
			FormLNE.IsImport=IsImport;
			FormLNE.IsViewOnly=IsViewOnly;
			FormLNE.LabNoteCur=EhrLabResultCur.ListEhrLabResultNotes[e.Row];
			FormLNE.ShowDialog();
			if(IsImport || IsViewOnly || FormLNE.DialogResult!=DialogResult.OK) {
				return;
			}
			EhrLabResultCur.ListEhrLabResultNotes[e.Row]=FormLNE.LabNoteCur;
			FillGridNotes();
		}
Exemplo n.º 25
0
 private void runFeedback_GoToReference(object sender, UI.GoToReferenceArgs e)
 {
     _launcher.LaunchEditor(e.Position.File, e.Position.LineNumber, e.Position.Column);
 }
Exemplo n.º 26
0
		private void gridMain_CellClick(object sender,UI.ODGridClickEventArgs e) {
			try {
				PaintPreviewPicture();
				if(e.Col!=0) {
					return;
				}
				Document doc=GetSelectedDocument();
				int existingIndex=-1;
				for(int i=0;i<_listAttached.Count;i++) {
					if(_listAttached[i].EhrLabNum==_ehrLabNum && _listAttached[i].DocNum==doc.DocNum) {
						//found it, mark it for delete
						existingIndex=i;
						break;
					}
				}
				if(existingIndex>=0) { //it exists so delete it
					_listAttached.RemoveAt(existingIndex);
				}
				else { //it doesn't exist so add it
					EhrLabImage labImage=new EhrLabImage();
					labImage.EhrLabNum=_ehrLabNum;
					labImage.DocNum=doc.DocNum;
					_listAttached.Add(labImage);
				}
				FillGrid();	
			}
			catch { }
		}
Exemplo n.º 27
0
		private void gridCarePlans_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			FormEhrCarePlanEdit formEdit=new FormEhrCarePlanEdit(_listCarePlans[e.Row]);
			if(formEdit.ShowDialog()==DialogResult.OK) {
				FillCarePlans();
			}
		}
Exemplo n.º 28
0
		private void gridObservations_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) {
			VaccineObs vaccineObs=(VaccineObs)gridObservations.Rows[e.Row].Tag;
			FormVaccineObsEdit form=new FormVaccineObsEdit(vaccineObs);
			form.ShowDialog();
			if(vaccineObs.VaccinePatNum==0) {//Was deleted
				//If the observation identifying the group is deleted, then we need to reassign a new group.
				List<int> listRegroupIndicies=new List<int>();
				for(int i=0;i<_listVaccineObservations.Count;i++) {
					if(i!=e.Row && _listVaccineObservationGroups[i]==_listVaccineObservationGroups[e.Row]) {
						listRegroupIndicies.Add(i);
					}
				}
				if(listRegroupIndicies.Count>0) {
					VaccineObs vaccineObsGroup=_listVaccineObservations[listRegroupIndicies[0]];
					for(int i=0;i<listRegroupIndicies.Count;i++) {
						_listVaccineObservationGroups[listRegroupIndicies[i]]=vaccineObsGroup;
					}
				}
				//Delete the observation and corresponding group reference.
				_listVaccineObservations.RemoveAt(e.Row);
				_listVaccineObservationGroups.RemoveAt(e.Row);
			}
			FillObservations();
		}
Exemplo n.º 29
0
		private void gridObservations_CellClick(object sender,UI.ODGridClickEventArgs e) {
			if(gridObservations.SelectedIndices.Length>1) {
				return;//Do not select group if the user has selected more than one item (otherwise it would deselect some of the rows the user clicked, which would make using the group button impossible).
			}
			//Select all observations which are in the same group.
			VaccineObs vaccineObsGroup=_listVaccineObservationGroups[e.Row];
			gridObservations.SetSelected(false);//Deselect all.
			for(int i=0;i<_listVaccineObservationGroups.Count;i++) {
				if(_listVaccineObservationGroups[i]==vaccineObsGroup) {
					gridObservations.SetSelected(i,true);
				}
			}
		}
Exemplo n.º 30
0
 public Collector(UI.Window.ErrorsAndInfos MessageCollectorForm)
 {
     this._MCForm = MessageCollectorForm;
     CreateTimer();
 }