Пример #1
0
        private void editMenuAction(object sender, RoutedEventArgs e)
        {
            EditType editTypeDialog = new EditType(new Type(Id, TypeName, Icon, Description), EditTypeCallback);

            editTypeDialog.Height = 590;
            editTypeDialog.Width  = 450;
            editTypeDialog.ShowDialog();
        }
        private void EditTypeCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            int      toEdit = EnlargenedTypes.First();
            Type     m      = this.Types.SingleOrDefault(x => x.Id == toEdit);
            EditType dialog = new EditType(m, this.EditTypeCallback);

            dialog.Owner = Application.Current.MainWindow;
            dialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            dialog.Height    = 490;
            dialog.Width     = 350;
            dialog.MinHeight = 420;
            dialog.MinWidth  = 280;
            dialog.ShowDialog();
        }
Пример #3
0
 public static void EditTypeDemon(EditType form)
 {
     System.Windows.Point absolutePos = new System.Windows.Point(0, 0);
     absolutePos    = getElementPos(form.DescriptionTextBox);
     absolutePos.X += 10;
     absolutePos.Y += 10;
     MoveCursorSlowly((int)absolutePos.X, (int)absolutePos.Y);
     MouseEvent(MouseEventFlags.LeftDown);
     Thread.Sleep(200);
     MouseEvent(MouseEventFlags.LeftUp);
     slowlyDeleteTextBox(form.DescriptionTextBox);
     fillTextBox(form.DescriptionTextBox, "Perhaps its angelic");
     absolutePos    = getElementPos(form.EditTypeButton);
     absolutePos.X += 10;
     absolutePos.Y += 10;
     MoveCursorSlowly((int)absolutePos.X, (int)absolutePos.Y);
     MouseEvent(MouseEventFlags.LeftDown);
     Thread.Sleep(200);
     MouseEvent(MouseEventFlags.LeftUp);
 }