예제 #1
0
        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("");
            });
        }
예제 #2
0
 private void openGraphics_Click(object sender, EventArgs e)
 {
     if (graphicEditor == null)
     {
         LoadGraphicEditor();
     }
     graphicEditor.Show();
 }
예제 #3
0
 private void openSpriteGraphics_Click(object sender, EventArgs e)
 {
     if (spriteGraphicEditor == null)
     {
         LoadSpriteGraphicEditor();
     }
     spriteGraphicEditor.Show();
 }
예제 #4
0
 private void openGraphicsLogos_Click(object sender, EventArgs e)
 {
     if (logoGraphicEditor == null)
     {
         LoadLogoGraphicEditor();
     }
     logoGraphicEditor.Show(this);
 }
예제 #5
0
 private void battleMenuGraphicsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     menuGraphicEditor.Show();
 }
예제 #6
0
 private void numeralGraphicsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     numeralGraphicEditor.Show();
 }
예제 #7
0
 private void spriteGraphicsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     spriteGraphicEditor.Show();
 }
예제 #8
0
 private void openGraphics_Click(object sender, EventArgs e)
 {
     graphicEditor.Show();
 }