public MainWindowVM() { CurrentSign = new PLSign(); EffectCommand = new RelayCommand <SignEffect>(s => { int oldIndex = Window.MessageBoxCaretIndex; MessageText = MessageText.Insert(oldIndex, s.Text); Window.MessageBoxCaretIndex = oldIndex + s.Text.Length; }); SendMessageCommand = new RelayCommand(() => { if (!string.IsNullOrEmpty(msg)) { CurrentSign.SendMessage(msg, SelectedPage); } }); NewGraphicCommand = new RelayCommand(() => { graphicsWindow = new GraphicEditor(); GraphicEditorVM vm = graphicsWindow.DataContext as GraphicEditorVM; vm.CurrentSign = CurrentSign; vm.MainWindow = this; graphicsWindow.Show(); }); RefreshComPortsCommand = new RelayCommand(() => { OpenComPorts = SerialSign.OpenComPorts(); RaisePropertyChanged(""); }); }
private void openGraphics_Click(object sender, EventArgs e) { if (graphicEditor == null) { LoadGraphicEditor(); } graphicEditor.Show(); }
private void openSpriteGraphics_Click(object sender, EventArgs e) { if (spriteGraphicEditor == null) { LoadSpriteGraphicEditor(); } spriteGraphicEditor.Show(); }
private void openGraphicsLogos_Click(object sender, EventArgs e) { if (logoGraphicEditor == null) { LoadLogoGraphicEditor(); } logoGraphicEditor.Show(this); }
private void battleMenuGraphicsToolStripMenuItem_Click(object sender, EventArgs e) { menuGraphicEditor.Show(); }
private void numeralGraphicsToolStripMenuItem_Click(object sender, EventArgs e) { numeralGraphicEditor.Show(); }
private void spriteGraphicsToolStripMenuItem_Click(object sender, EventArgs e) { spriteGraphicEditor.Show(); }
private void openGraphics_Click(object sender, EventArgs e) { graphicEditor.Show(); }