public EditMonument(ObservableCollection <Type> types, ObservableCollection <Tag> tags, onEditMonument editMonumentCallback, Monument oldMonument, onAddType addTypeCallback, onAddTag addTagCallback) { InitializeComponent(); Root.DataContext = this; this.OldMonument = oldMonument; this.NewMonument = new Monument(); this.copyOldMonument(); this.initializeEraList(); this.initializeTouristicList(); this.DateCollection = getDateCollection(); this.Tags = tags; this.TagListBox.ItemsSource = this.Tags; this.Types = types; this.AddTypeCallBack = addTypeCallback; this.AddTagCallback = addTagCallback; this.EditMonumentCallback = editMonumentCallback; setTagFlags(); setEraComboBoxValue(); setTouristicComboBoxValue(); setDiscoveryDate(); TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public MainWindow() { //Set up background thread M6502WorkerThread = new Thread(() => { Thread.CurrentThread.IsBackground = true; vm.Processor.Run(); }); #region events #endregion //Set up viewmodel vm.Processor = new M6502(); vm.DisplayGrid = new AppleDisplay(); vm.DisassembledOpcodes = new ObservableCollection <Disassembly.DisassembledOpcode>(); //Set up events vm.Processor.ProcessorStepCompleted += new M6502.ProcessorStepCompletedEventHandler(AfterProcessorStepCompleted); vm.Processor.ToggleCursor += new M6502.ToggleCursorEventHandler(vm.DisplayGrid.onToggleCursor); vm.Processor.UpdateDisplay += new M6502.UpdateDisplayEventHandler(vm.DisplayGrid.onUpdateDisplay); vm.Processor.ExecutionStopped += new M6502.ExecutionStoppedEventHandler(onExecutionStopped); TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); basicRomPath = @"C:\apple\apple1basic.bin"; monitorRomPath = @"C:\apple\apple1.rom"; characterRomPath = @"C:\apple\apple1.vid"; //Set up window InitializeComponent(); binaryLoadedStatus.SetBinding(ContentProperty, new Binding("LoadSuccess")); DataContext = vm; }
public MainWindow() { InitializeComponent(); TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); this.WindowState = WindowState.Maximized; this.Title = "Emlekmu"; }
public AddTag(onAddTag addTagCallback, ObservableCollection <Tag> tags) { this.AddTagCallback = addTagCallback; this.Tags = tags; NewTag = new models.Tag(); InitializeComponent(); Root.DataContext = this; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public TypeSection(ObservableCollection <Type> types, onAddType addTypeCallback, onEditType editTypeCallback, onRemoveType removeTypeCallback) { InitializeComponent(); EnlargenedTypes = new ObservableCollection <int>(); Root.DataContext = this; TypeClickedCallback = new onTypeClicked(typeClicked); Types = types; AddTypeCallback = addTypeCallback; EditTypeCallback = editTypeCallback; RemoveTypeCallback = removeTypeCallback; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public AddType(onAddType addTypeCallback, ObservableCollection <Type> types) { InitializeComponent(); this.NewType = new Type(); this.AddTypeCallback = addTypeCallback; this.Types = types; this.NewType.Id = findNextId(); Root.DataContext = this; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public EditTag(Tag tagToEdit, onEditTag editTagCallback) { InitializeComponent(); Root.DataContext = this; EditTagCallback = editTagCallback; NewTag = new models.Tag(); NewTag.Id = tagToEdit.Id; NewTag.Description = tagToEdit.Description; NewTag.Color = tagToEdit.Color; TagColor = System.Windows.Media.Color.FromRgb((byte)newTag.Color.Red, (byte)newTag.Color.Green, (byte)newTag.Color.Blue); TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public TagSection(ObservableCollection <Tag> tags, onAddTag addTagCallback, onEditTag editTagCallback, onRemoveTag removeTagCallback) { InitializeComponent(); EnlargenedTags = new ObservableCollection <string>(); Root.DataContext = this; TagClickedCallback = new onTagClicked(tagClicked); Tags = tags; AddTagCallback = addTagCallback; EditTagCallback = editTagCallback; RemoveTagCallback = removeTagCallback; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public MainWindow() { InitializeComponent(); SetDecimalSeparator(DetectDecimalSeparator()); entry = "0"; lastEntry = dLastEntry; history = dtHistory; operation = dOperation; hasSeparator = false; toReset = false; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); UpdateEntry(); UpdateHistory(); }
public EditType(Type typeToEdit, onEditType editTypeCallback) { InitializeComponent(); this.NewType = new Type(); this.newType.Id = typeToEdit.Id; this.newType.Name = typeToEdit.Name; this.NewType.Description = typeToEdit.Description; this.NewType.Icon = typeToEdit.Icon; Root.DataContext = this; EditTypeCallback = editTypeCallback; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }
public HudWindow() { InitializeComponent(); if (DesignerProperties.GetIsInDesignMode(this)) { } else { tmr = new DispatcherTimer(); tmr.Tick += tmr_Tick; tmr.Interval = TimeSpan.FromMilliseconds(20); tmr.Start(); TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(Main.KeyBoardKeyPressed)); Sensitivity_DirectionSlider.Value = Properties.Settings.Default.DefaultLRFBSpeed; Sensitivity_YawSlider.Value = Properties.Settings.Default.DefaultYawSpeed; Sensitivity_GazSlider.Value = Properties.Settings.Default.DefaultGazSpeed; } }
public AddMonument( ObservableCollection <Monument> monuments, ObservableCollection <Type> types, ObservableCollection <Tag> tags, onAddMonument addMonumentCallback, onAddType addTypeCallback, onAddTag addTagCallback) { InitializeComponent(); Root.DataContext = this; initializeEraList(); initializeTouristicList(); this.dateCollection = getDateCollection(); this.Monument = new Monument(); this.Monuments = monuments; this.Monument.Id = findNextId(); this.Types = types; this.Tags = tags; this.AddMonumentCallback = addMonumentCallback; this.AddTypeCallBack = addTypeCallback; this.AddTagCallback = addTagCallback; TextCompositionManager.AddTextInputHandler(this, new TextCompositionEventHandler(OnTextComposition)); }