/// <summary>Creates a new SharpDXInputSystem.</summary>
        /// <param name="control">The control to associate with DirectInput.</param>
        public SharpDXInputSystem(WF.Control control)
        {
            _directInput = new DI.DirectInput();

            InitialiseKeyboard(control);

            InitialiseJoystick();
        }
Beispiel #2
0
        public ParteHandler(Element.ComboBox cboTipoDoc, Element.MaskedTextBox txtNroDni, Element.ComboBox cboSexo,
                            Element.TextBox txtNombre, Element.TextBox txtApellido, Element.MaskedTextBox txtCuit,
                            Element.DateTimePicker dpFecNac, Element.ComboBox cboECivil, Element.TextBox txtDomicilio,
                            Element.ComboBox cboCiudad, Element.ComboBox cboDepartamento, Element.ComboBox cboProvincia,
                            Element.ComboBox cboNacionalidad)
        {
            this.cboTipoDoc = cboTipoDoc;
            this.txtNroDni = txtNroDni;
            this.cboSexo = cboSexo;
            this.txtNombre = txtNombre;
            this.txtApellido = txtApellido;
            this.txtCuit = txtCuit;
            this.dpFecNac = dpFecNac;
            this.cboECivil = cboECivil;
            this.txtDomicilio = txtDomicilio;
            this.cboCiudad = cboCiudad;
            this.cboDepartamento = cboDepartamento;
            this.cboProvincia = cboProvincia;
            this.cboNacionalidad = cboNacionalidad;

            formatoPartes();

            con.Connect();
            ds1 = con.fillDs("SELECT * FROM DOCUMENTOS;", "PARTES");
            ds2 = con.fillDs("SELECT * FROM SEXOS;", "SEXOS");
            ds3 = con.fillDs("SELECT * FROM ESTADOS_CIVILES;", "ESTADOS");
            ds7 = con.fillDs("SELECT * FROM NACIONALIDADES;", "NACIONALIDADES");
            cboTipoDoc.DataSource = ds1.Tables[0];
            cboSexo.DataSource = ds2.Tables[0];
            cboECivil.DataSource = ds3.Tables[0];
            cboNacionalidad.DataSource = ds7.Tables[0];
        }
Beispiel #3
0
        public void Test01_10までのFizzBuzz結果の確認()
        {
            var target = new FizzBuzzForm();
            target.Show();

            new TextBoxTester("maxNumberTextBox", target).Enter("10");
            new ButtonTester("fizzBuzzButton", target).Click();
            var dataGrid = new Finder<DataGridView>("fizzBuzzDataGridView", target).Find();

            var expectedList = new[] {
                new { Number = 1, Text = "1" },
                new { Number = 2, Text = "2" },
                new { Number = 3, Text = "Fizz" },
                new { Number = 4, Text = "4" },
                new { Number = 5, Text = "Buzz" },
                new { Number = 6, Text = "Fizz" },
                new { Number = 7, Text = "7" },
                new { Number = 8, Text = "8" },
                new { Number = 9, Text = "Fizz" },
                new { Number = 10, Text = "Buzz" },
            };

            foreach (var expected in expectedList)
                AssertForOneRow(dataGrid, expected.Number, expected.Text);
        }
		private void OnItemChecked (object sender, SWF.ItemCheckEventArgs args)
		{
			if (args.Index == ((ListItemProvider) Provider).Index) {
				newValue = args.NewValue;
				RaiseAutomationPropertyChangedEvent ();
			}
		}
 public WinForms.DragDropEffects GetDragDropEffect(WinForms.IDataObject dragData)
 {
    if (this.IsValidDropTarget(dragData))
       return System.Windows.Forms.DragDropEffects.Move;
    else
       return Tree.TreeView.NoneDragDropEffects;
 }
Beispiel #6
0
 public ExitButton(Vec2 loc, Vec2 size, Image parent, Forms.Form parf)
 {
     if (size.X == 0 || size.Y == 0)
     {
         throw new Exception("No dimention of size can be zero!");
     }
     this.X = loc.X;
     this.Y = loc.Y;
     this.Size = size;
     this.iSize = new Vec2(size.X - 1, size.Y - 1);
     this.parent = parent;
     this.parForm = parf;
     this.bounds = new BoundingBox(this.X, this.X + Size.X, this.Y + Size.Y, this.Y);
     Click = new ObjectClick(this.ExitButtonClicked);
     MouseEnter = new ObjectClick(this.ExitButtonEnter);
     MouseLeave = new ObjectClick(this.ExitButtonLeave);
     MouseDown = new ObjectClick(this.ExitButtonMouseDown);
     MouseUp = new ObjectClick(this.ExitButtonMouseUp);
     evnts = new ObjectEvents(
         new ObjectClick(Click),
         new ObjectClick(MouseEnter),
         new ObjectClick(MouseLeave),
         new ObjectClick(MouseDown),
         new ObjectClick(MouseUp),
         new DrawMethod(Draw),
         bounds);
     i = new Image(size);
     this.DrawDefault();
 }
partial         void AddAgilent()
        {
            PSetReferences[] pset_references = new[] { new PSetReferences() };
            PSetFileLocations pset_file_locations = new PSetFileLocations();
            pset_file_locations.SelectedFiles = new CoreList<string>();
            pset_references[0].OriginalPSet = pset_file_locations;
            pset_references[0].CurrentPSet = pset_file_locations.Clone();

            QualFileDialogOptionsControl options = new QualFileDialogOptionsControl();
            options.Initialize(LABEL, '*' + EXTENSION, CoreUtilities.GetDADefaultDataPath(), new[] { string.Empty });
            options.ParameterSets = pset_references;

            AgtDialog afsd = new AgtDialog();
            afsd.AllowMultiSelect = true;
            afsd.AppPlugIn = options;
            afsd.Initialize(DialogMode.Open);

            if(afsd.ShowDialog() == DialogResult.OK)
            {
                foreach(string data_filepath in afsd.SelectedFilePaths)
                {
                    if(!lstData.Items.Contains(data_filepath))
                    {
                        lstData.Items.Add(data_filepath);
                        tspbProgress.Value = tspbProgress.Minimum;
                    }
                }
            }
        }
		private void OnCellValueChanged (object sender, SWF.DataGridViewCellEventArgs args)
		{
			if (args.ColumnIndex == provider.ComboboxProvider.ComboBoxCell.ColumnIndex
			    && args.RowIndex == provider.ComboboxProvider.ComboBoxCell.RowIndex
			    && provider.IsItemSelected (itemProvider))
				RaiseAutomationPropertyChangedEvent ();
		}
 public WinForms::DragDropEffects GetDragDropEffect(WinForms::IDataObject dragData)
 {
    if (IsValidDropTarget(dragData))
       return WinForms::DragDropEffects.Move;
    else
       return TreeView.NoneDragDropEffects;
 }
		private void OnUIATextChanged (object sender, SWF.LabelEditEventArgs args)
		{
			if (args.Item == editProvider.ItemProvider.ListView.Columns.IndexOf (editProvider.ColumnHeader)) {
				newText = (string) editProvider.GetPropertyValue (ValuePatternIdentifiers.ValueProperty.Id);
				RaiseAutomationPropertyChangedEvent ();
			}
		}
 public override WinForms.DragDropEffects GetDragDropEffect(WinForms.IDataObject dragData)
 {
    if (this.IsValidDropTarget(dragData))
       return WinForms.DragDropEffects.Copy;
    else
       return TreeView.NoneDragDropEffects;
 }
Beispiel #12
0
        /// <summary>
        /// Converts a System.Windows.Forms.MouseButtons to OForms.MouseButtons
        /// </summary>
        /// <param name="b">Object to convert.</param>
        /// <returns>Converted buttons.</returns>
        public static OForms.MouseButtons GetButtons(Forms.MouseButtons b)
        {
            OForms.MouseButtons buttons = OForms.MouseButtons.None;

            if (b.HasFlag(Forms.MouseButtons.Left))
            {
                buttons |= OForms.MouseButtons.Left;
            }
            else if (b.HasFlag(Forms.MouseButtons.Middle))
            {
                buttons |= OForms.MouseButtons.Middle;
            }
            else if (b.HasFlag(Forms.MouseButtons.Right))
            {
                buttons |= OForms.MouseButtons.Right;
            }
            else if (b.HasFlag(Forms.MouseButtons.XButton1))
            {
                buttons |= OForms.MouseButtons.XButton1;
            }
            else if (b.HasFlag(Forms.MouseButtons.XButton2))
            {
                buttons |= OForms.MouseButtons.XButton2;
            }

            return buttons;
        }
   public void HandleDrop(WinForms::IDataObject dragData)
   {
      if (!this.IsValidDropTarget(dragData))
         return;

      IEnumerable<TreeNode> draggedNodes = TreeView.GetTreeNodesFromDragData(dragData);
      if (draggedNodes == null)
         return;

      List<SelectionSetWrapper> selSets = new List<SelectionSetWrapper>();
      foreach (TreeNode tn in draggedNodes)
      {
         if (tn.Parent == null)
            continue;

         SelectionSetWrapper selSet = TreeMode.GetMaxNode(tn.Parent) as SelectionSetWrapper;
         if (selSet != null && !selSets.Contains(selSet))
            selSets.Add(selSet);
      }

      IEnumerable<IMaxNode> draggedMaxNodes = TreeMode.GetMaxNodes(draggedNodes);
      foreach (SelectionSetWrapper selSet in selSets)
      {
         IEnumerable<IMaxNode> newNodes = selSet.ChildNodes.Except(draggedMaxNodes);
         ModifySelectionSetCommand cmd = new ModifySelectionSetCommand(selSet, newNodes);
         cmd.Execute();
      }
   }
Beispiel #14
0
 //Constructor
 public LibroHandler(Element.NumericUpDown updwLibro, Element.NumericUpDown updwRenglon, Element.MaskedTextBox txtNroFolio, Element.TextBox txtDescripcion)
 {
     this.updwLibro = updwLibro;
     this.updwRenglon = updwRenglon;
     this.txtNroFolio = txtNroFolio;
     this.txtDescripcion = txtDescripcion;
 }
   public override void HandleDrop(WinForms::IDataObject dragData)
   {
      if (!this.IsValidDropTarget(dragData))
         return;

      IEnumerable<TreeNode> draggedNodes = TreeView.GetTreeNodesFromDragData(dragData);
      if (draggedNodes == null)
         return;

      IEnumerable<IMaxNode> draggedMaxNodes = TreeMode.GetMaxNodes(draggedNodes);
      SelectionSetWrapper targetSelSet = (SelectionSetWrapper)this.MaxNode;

      IEnumerable<IMaxNode> combinedNodes = targetSelSet.ChildNodes.Union(draggedMaxNodes);
      ModifySelectionSetCommand cmd = new ModifySelectionSetCommand(targetSelSet, combinedNodes);
      cmd.Execute();

      if (!ControlHelpers.ShiftPressed)
      {
         IEnumerable<SelectionSetWrapper> selSets = draggedNodes.Select(tn => TreeMode.GetMaxNode(tn.Parent))
                                                                .OfType<SelectionSetWrapper>()
                                                                .Where(n => !n.Equals(targetSelSet))
                                                                .Distinct();
         foreach (SelectionSetWrapper selSet in selSets)
         {
            IEnumerable<IMaxNode> newNodes = selSet.ChildNodes.Except(draggedMaxNodes);
            ModifySelectionSetCommand moveCmd = new ModifySelectionSetCommand(selSet, newNodes);
            moveCmd.Execute();
         }
      }
   }
Beispiel #16
0
		private static void OnUIAHelpRequested (object sender, SWF.ControlEventArgs args)
		{
			SWF.HelpProvider helpProvider = (SWF.HelpProvider) sender;
			HelpProvider provider 
				= (HelpProvider) ProviderFactory.GetProvider (helpProvider);
			provider.Show (args.Control);
		}
Beispiel #17
0
        private void Notify_Click(object sender, WinForms.MouseEventArgs e)
        {
            if (e.Button != WinForms.MouseButtons.Left)
                return;

            mainWindow.ShowApp();
        }
Beispiel #18
0
        protected override void OnPaint(WinForms.PaintEventArgs pe)
        {
            base.OnPaint(pe);

            Pen pen1 = new System.Drawing.Pen(Color.LightGray, 2f);
            Pen pen2 = new System.Drawing.Pen(Color.LightGray, 2f);
            Brush background = new SolidBrush(Color.DarkGray);
            Brush brushFont = new SolidBrush(Color.White);
            Font font = new Font("Arial", 14);
            StringFormat format = new StringFormat();
            format.Alignment = StringAlignment.Near;
            format.LineAlignment = StringAlignment.Near;

            Point p00 = new Point(0, 0);
            Point p01 = new Point(0, this.Size.Height - 1);
            Point p10 = new Point(this.Size.Width - 1, 0);
            Point p11 = new Point(this.Size.Width - 1, this.Size.Height - 1);
            Rectangle area = new Rectangle(Point.Empty, this.Size - new Size(1, 1));

            pe.Graphics.FillRectangle(background, area);

            pe.Graphics.DrawLine(pen1, p10, p11);
            pe.Graphics.DrawLine(pen1, p11, p01);
            pe.Graphics.DrawLine(pen2, p00, p10);
            pe.Graphics.DrawLine(pen2, p01, p00);

            pe.Graphics.DrawString(Text, font, brushFont, area, format);
        }
		private void OnAfterLabelEdit (object sender, SWF.LabelEditEventArgs args)
		{
			if (viewItem.ListView.Items.IndexOf (viewItem) == args.Item) {
				newText = args.Label;
				RaiseAutomationPropertyChangedEvent ();
			}
		}
		private void OnValueProperty (object sender, 
		                              SWF.DataGridViewCellEventArgs args)
		{
			if (args.ColumnIndex == provider.Cell.ColumnIndex
			    && args.RowIndex == provider.Cell.RowIndex)
				RaiseAutomationPropertyChangedEvent ();
		}
		private void OnUIASubItemTextChanged (object sender, SWF.LabelEditEventArgs args)
		{
			if (args.Item == 0) {
				newText = viewItem.Text;
				RaiseAutomationPropertyChangedEvent ();
			}
		}
        Element.TextBox txtPrefijo; // txt prefijo del vehiculo

        #endregion Fields

        #region Constructors

        public VehiculoHandler(Element.ComboBox cboDesc, Element.ComboBox cboMarca, Element.MaskedTextBox txtDominio, Element.TextBox txtPrefijo)
        {
            this.cboDesc = cboDesc;
            this.cboMarca = cboMarca;
            this.txtDominio = txtDominio;
            this.txtPrefijo = txtPrefijo;
        }
		private void OnColumnHeaderMouseClick (object sender, 
		                                       SWF.DataGridViewCellMouseEventArgs args)
		{
			if (args.Button == SWF.MouseButtons.Left
			    && args.ColumnIndex == provider.Column.Index)
					RaiseAutomationEvent ();
		}
Beispiel #24
0
      public void InitializeGridView()
      {
         uxGridViewMotif.Columns.Add("0", "0");
         uxGridViewMotif.Columns.Add("1", "1");
         uxGridViewMotif.Columns.Add("2", "2");
         uxGridViewMotif.Columns.Add("3", "3");
         uxGridViewMotif.Columns.Add("4", "4");
         uxGridViewMotif.Columns.Add("5", "5");
         uxGridViewMotif.Columns.Add("6", "6");
         uxGridViewMotif.Columns.Add("7", "7");
         uxGridViewMotif.Columns.Add("8", "8");
         uxGridViewMotif.Columns.Add("9", "9");
         uxGridViewMotif.Columns.Add("10", "10");
         uxGridViewMotif.Columns.Add("11", "1");
         uxGridViewMotif.Columns.Add("12", "12");

         var temp = new[] {"8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33", "8.33"};
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         uxGridViewMotif.Rows.Add(temp);
         for (var i = 0; i < 12; i++)
         {
            uxGridViewMotif.Rows[i].HeaderCell.Value = i.ToString();
         }
      }
      protected override bool Checked(WinForms::ToolStripMenuItem clickedItem, TreeView treeView, TreeNode clickedTn)
      {
         IEnumerable<IMaxNode> selNodes = TreeMode.GetMaxNodes(treeView.SelectedNodes);

         return selNodes.OfType<XRefSceneRecord>()
                        .Any(x => x.HasFlags(this.Flags));
      }
		private void OnSelectedGridItemChanged (object o,
		                                        SWF.SelectedGridItemChangedEventArgs args)
		{
			bool selected = provider.PropertyGridViewProvider.IsItemSelected (provider);
			if (selected != isSelected) 
				RaiseAutomationPropertyChangedEvent ();
		}
Beispiel #27
0
        public static extern bool PeekMessage(
			out Wfx.Message msg,
			IntPtr hWnd,
			uint min,
			uint max,
			uint flags
		);
Beispiel #28
0
        public bool Prepare(wnd.IDataObject ido)
        {
            currentDishes = SelectDishes(ido);
            PrepareDishes(currentDishes);

            return currentDishes.Any();
        }
Beispiel #29
0
 /// <summary>
 /// Hàm này đặt dữ liệu được lưu dạng BLOB lấy từ hàm GetData
 /// vào RichTextBox.
 /// </summary>
 public static void SetData(object arraybyte, RichTextFormat.RichTextBox rtb)
 {
     try
     {
         rtb.Rtf = Encoding.UTF8.GetString(ToBytes(arraybyte));
     }
     catch { }
 }
Beispiel #30
0
		protected override void WndProc( ref SWF.Message m )
		{
            if (this.renderWindow != null)
            {
                if (!Win32MessageHandling.WndProc(renderWindow, ref m))
                    base.WndProc(ref m);
            }
		}